Commit 0e1e35e4 authored by David Edmundson's avatar David Edmundson

Restore original formatButtonsRow.opacity

p-w wasn't ready for using a focus scope on the applet so it got
reverted. We need the original proposed focus detection in here.

Differential Revision: https://phabricator.kde.org/D6150
parent 6d941381
......@@ -239,7 +239,25 @@ PlasmaCore.SvgItem {
id: formatButtonsRow
spacing: units.smallSpacing
// show format buttons if TextField or any of the buttons have focus
opacity: fontButtons.showFormatButtons && root.Plasmoid.activeFocus ? 1 : 0
opacity: {
if (!fontButtons.showFormatButtons) {
return 0;
}
if (mainTextArea.activeFocus || settingsButton.activeFocus) {
return 1;
}
for (var i = 0; i < children.length; ++i) {
if (children[i].activeFocus) {
return 1;
}
}
return 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