fix tooltips inconsistencies in Settings window

pull/5/head
Michail Vourlakos 6 years ago
parent f497d4ae62
commit 441e38a730

@ -107,12 +107,12 @@ Item {
} }
} }
MouseArea { PlasmaComponents.Button {
id: textMouseArea //tooltip ghost
anchors.fill: textElement anchors.fill: parent
hoverEnabled: true tooltip: item.tooltip
opacity: 0
onClicked: item.pressed(); onPressedChanged: item.pressed();
} }
} }
@ -124,19 +124,12 @@ Item {
style: Private.SwitchStyle {} style: Private.SwitchStyle {}
MouseArea { PlasmaComponents.Button {
id: switchMouseArea //tooltip ghost
anchors.fill: parent anchors.fill: parent
hoverEnabled: true tooltip: item.tooltip
opacity: 0
onClicked: item.pressed(); onPressedChanged: item.pressed();
} }
} }
ToolTip{
parent: itemSwitch
text: item.tooltip
visible: (switchMouseArea.containsMouse || textMouseArea.containsMouse) && text !==""
delay: 7 * units.longDuration
}
} }

@ -247,13 +247,6 @@ FocusScope {
width: Qt.application.layoutDirection !== Qt.RightToLeft ? logo.width + latteTxt.width + units.smallSpacing : logo.width + units.smallSpacing width: Qt.application.layoutDirection !== Qt.RightToLeft ? logo.width + latteTxt.width + units.smallSpacing : logo.width + units.smallSpacing
height: logo.height height: logo.height
LatteComponents.ToolTip{
parent: logo
text: i18n("Open Latte settings window")
visible: aboutMouseArea.containsMouse
delay: 7 * units.longDuration
}
Latte.IconItem { Latte.IconItem {
id: logo id: logo
@ -264,8 +257,9 @@ FocusScope {
source: "latte-dock" source: "latte-dock"
// animated: true // animated: true
usesPlasmaTheme: false usesPlasmaTheme: false
active: aboutMouseArea.containsMouse active: aboutArea.hovered
} }
PlasmaComponents.Label { PlasmaComponents.Label {
id: latteTxtMetrics id: latteTxtMetrics
text: "Latte" text: "Latte"
@ -290,14 +284,17 @@ FocusScope {
} }
} }
MouseArea { PlasmaComponents.Button{
id: aboutMouseArea id: aboutArea
acceptedButtons: Qt.LeftButton //! Used as tooltip
anchors.fill: parent anchors.fill: parent
hoverEnabled: true opacity: 0
tooltip: i18n("Open Latte settings window")
readonly property int preferencesPage: Latte.Types.PreferencesPage onPressedChanged: {
onClicked: layoutManager.showLatteSettingsDialog(preferencesPage) if (pressed) {
layoutManager.showLatteSettingsDialog(Latte.Types.PreferencesPage)
}
}
} }
Rectangle { Rectangle {
@ -307,7 +304,7 @@ FocusScope {
width: parent.width + 4 width: parent.width + 4
height: 2 height: 2
color: theme.highlightColor color: theme.highlightColor
visible: aboutMouseArea.containsMouse visible: aboutArea.hovered
} }
} }

Loading…
Cancel
Save