fix tooltips inconsistencies in Settings window

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

@ -107,12 +107,12 @@ Item {
}
}
MouseArea {
id: textMouseArea
anchors.fill: textElement
hoverEnabled: true
onClicked: item.pressed();
PlasmaComponents.Button {
//tooltip ghost
anchors.fill: parent
tooltip: item.tooltip
opacity: 0
onPressedChanged: item.pressed();
}
}
@ -124,19 +124,12 @@ Item {
style: Private.SwitchStyle {}
MouseArea {
id: switchMouseArea
PlasmaComponents.Button {
//tooltip ghost
anchors.fill: parent
hoverEnabled: true
onClicked: item.pressed();
tooltip: item.tooltip
opacity: 0
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
height: logo.height
LatteComponents.ToolTip{
parent: logo
text: i18n("Open Latte settings window")
visible: aboutMouseArea.containsMouse
delay: 7 * units.longDuration
}
Latte.IconItem {
id: logo
@ -264,8 +257,9 @@ FocusScope {
source: "latte-dock"
// animated: true
usesPlasmaTheme: false
active: aboutMouseArea.containsMouse
active: aboutArea.hovered
}
PlasmaComponents.Label {
id: latteTxtMetrics
text: "Latte"
@ -290,14 +284,17 @@ FocusScope {
}
}
MouseArea {
id: aboutMouseArea
acceptedButtons: Qt.LeftButton
PlasmaComponents.Button{
id: aboutArea
//! Used as tooltip
anchors.fill: parent
hoverEnabled: true
readonly property int preferencesPage: Latte.Types.PreferencesPage
onClicked: layoutManager.showLatteSettingsDialog(preferencesPage)
opacity: 0
tooltip: i18n("Open Latte settings window")
onPressedChanged: {
if (pressed) {
layoutManager.showLatteSettingsDialog(Latte.Types.PreferencesPage)
}
}
}
Rectangle {
@ -307,7 +304,7 @@ FocusScope {
width: parent.width + 4
height: 2
color: theme.highlightColor
visible: aboutMouseArea.containsMouse
visible: aboutArea.hovered
}
}

Loading…
Cancel
Save