Make PlasmaComponents3 Tooltips use the typical tooltip style
Without this, the tooltips are light when using a light theme. This is contrary to other tooltips, which are always dark no matter which coloration of theme you're using. BUG: 424506 FIXED-IN: 5.75
This commit is contained in:
parent
b40a1fbdf0
commit
b532fd2f20
@ -20,14 +20,14 @@ T.ToolTip {
|
|||||||
delay: Kirigami.Units.toolTipDelay
|
delay: Kirigami.Units.toolTipDelay
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|
||||||
implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)
|
||||||
implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
|
||||||
|
|
||||||
margins: units.gridUnit
|
margins: units.gridUnit
|
||||||
leftPadding: background.margins.left
|
leftPadding: backgroundItem.margins.left
|
||||||
topPadding: background.margins.top
|
topPadding: backgroundItem.margins.top
|
||||||
rightPadding: background.margins.right
|
rightPadding: backgroundItem.margins.right
|
||||||
bottomPadding: background.margins.bottom
|
bottomPadding: backgroundItem.margins.bottom
|
||||||
|
|
||||||
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
|
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
|
||||||
|
|
||||||
@ -36,12 +36,34 @@ T.ToolTip {
|
|||||||
// those used to determine the alt key shortcut
|
// those used to determine the alt key shortcut
|
||||||
text: control.text.replace(/&(?=\S)/g, "")
|
text: control.text.replace(/&(?=\S)/g, "")
|
||||||
font: control.font
|
font: control.font
|
||||||
color: PlasmaCore.ColorScope.textColor
|
PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.ToolTipColorGroup
|
||||||
|
PlasmaCore.ColorScope.inherit: false
|
||||||
}
|
}
|
||||||
|
|
||||||
background: PlasmaCore.FrameSvgItem {
|
background: Item {
|
||||||
height: Math.max(implicitHeight, control.height)
|
implicitHeight: PlasmaCore.Units.gridUnit + backgroundItem.margins.top + backgroundItem.margins.bottom
|
||||||
width: Math.max(implicitWidth, control.width)
|
implicitWidth: PlasmaCore.Units.gridUnit + backgroundItem.margins.left + backgroundItem.margins.right
|
||||||
imagePath: "widgets/background"
|
|
||||||
|
PlasmaCore.FrameSvgItem {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: -margins.left
|
||||||
|
anchors.rightMargin: -margins.right
|
||||||
|
anchors.topMargin: -margins.top
|
||||||
|
anchors.bottomMargin: -margins.bottom
|
||||||
|
imagePath: "widgets/tooltip"
|
||||||
|
prefix: "shadow"
|
||||||
|
colorGroup: PlasmaCore.Theme.ToolTipColorGroup
|
||||||
|
PlasmaCore.ColorScope.inherit: false
|
||||||
|
}
|
||||||
|
|
||||||
|
PlasmaCore.FrameSvgItem {
|
||||||
|
id: backgroundItem
|
||||||
|
anchors.fill: parent
|
||||||
|
// Because the transparent one doesn't match the appearance of all
|
||||||
|
// other ones
|
||||||
|
imagePath: "opaque/widgets/tooltip"
|
||||||
|
colorGroup: PlasmaCore.Theme.ToolTipColorGroup
|
||||||
|
PlasmaCore.ColorScope.inherit: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user