From ce7e17cc0c9f69687db2d355f0a7bf344aeb0334 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 8 Jul 2020 15:30:15 -0700 Subject: [PATCH] Add Description to Settings Widget --- EllipsisLabel.qml | 1 + Setting.qml | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/EllipsisLabel.qml b/EllipsisLabel.qml index a5b5331..f5dada2 100644 --- a/EllipsisLabel.qml +++ b/EllipsisLabel.qml @@ -16,6 +16,7 @@ Item { property alias weight: label.font.weight property alias strikeout: label.font.strikeout property alias font: label.font + property alias topPadding: label.topPadding property int extraPadding: 0 property Item container: parent diff --git a/Setting.qml b/Setting.qml index d00e69d..02dfef4 100644 --- a/Setting.qml +++ b/Setting.qml @@ -23,6 +23,7 @@ Column { property bool last: false property alias label: settingLabel.text + property alias description: settingDescriptionLabel.text property alias field: fieldContainer.children @@ -39,12 +40,24 @@ Column { anchors.horizontalCenter: parent.horizontalCenter - Opaque.EllipsisLabel { - id: settingLabel - width: container.gridWidth - color: Theme.mainTextColor - size: Theme.secondaryTextSize * gcd.themeScale - font.weight: Font.Bold + Column { + Opaque.EllipsisLabel { + id: settingLabel + width: container.gridWidth + color: Theme.mainTextColor + size: Theme.secondaryTextSize * gcd.themeScale + font.weight: Font.Bold + } + + + Opaque.ScalingLabel { + id: settingDescriptionLabel + width: container.gridWidth + color: Theme.mainTextColor + size: Theme.chatMetaTextSize * gcd.themeScale + visible: settingDescriptionLabel.text != "" + topPadding:10 + } }