diff options
Diffstat (limited to 'desktop/modules/qtmaildir/Setting.qml')
| -rw-r--r-- | desktop/modules/qtmaildir/Setting.qml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/desktop/modules/qtmaildir/Setting.qml b/desktop/modules/qtmaildir/Setting.qml index 59e9c1b..66d0a46 100644 --- a/desktop/modules/qtmaildir/Setting.qml +++ b/desktop/modules/qtmaildir/Setting.qml @@ -26,6 +26,8 @@ Column { property string kind: "text" property real min: -Infinity property real max: Infinity + // A #rrggbb key: a swatch beside the field opens a colour dialog. + property bool colour: false // What a search hit scrolls to. objectName: section + "/" + key width: parent ? parent.width : 0 @@ -61,8 +63,17 @@ Column { color: Theme.subtext font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 } } + ColourPick { + id: pick + anchors { right: parent.right; verticalCenter: parent.verticalCenter } + visible: s.colour + width: s.colour ? 34 : 0 + colour: s.value + onPicked: hex => s.commit(hex) + } Rectangle { - anchors { left: lbl.right; leftMargin: 8; right: parent.right; top: parent.top; bottom: parent.bottom } + anchors { left: lbl.right; leftMargin: 8; right: pick.left; rightMargin: s.colour ? 8 : 0 + top: parent.top; bottom: parent.bottom } radius: 8 color: Theme.surface TextInput { |
