Commit 9abedfec authored by David Edmundson's avatar David Edmundson

[applets/notes] Only show configure button when focussed

Summary:
This makes the behaviour of the entire bottom panel consistent with how
the font buttons currently behave.

BUG: 417608

Test Plan:
Focussed widget, button appeared
Left focus, all buttons disappeared
Shrinking the widget hid the fonts buttons as expected

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27394
parent 15d1af04
......@@ -348,6 +348,9 @@ PlasmaCore.SvgItem {
right: parent.right
}
opacity: focusScope.activeFocus ? 1 : 0
Behavior on opacity { NumberAnimation { duration: units.longDuration } }
readonly property int requiredWidth: formatButtonsRow.width + spacing + settingsButton.width
readonly property bool showFormatButtons: width > requiredWidth
......@@ -355,9 +358,6 @@ PlasmaCore.SvgItem {
id: formatButtonsRow
spacing: units.smallSpacing
// show format buttons if TextField or any of the buttons have focus
opacity: fontButtons.showFormatButtons && focusScope.activeFocus ? 1 : 0
Behavior on opacity { NumberAnimation { duration: units.longDuration } }
enabled: opacity > 0
visible: fontButtons.showFormatButtons
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment