Theme tooltips inside popups

PillButton's attached ToolTip is now a styled instance — uses the
widget's foreground color for text + border and a configurable
tooltipBackground (defaults to a near-black, overridable to
bar.background). No more stock OS chrome inside our popups.

Bluetooth panel passes bar.background/foreground through to its
header pills and replaces the row tooltip with the same themed style.
This commit is contained in:
Ryan Hughes
2026-05-14 02:21:48 -04:00
parent ab701f7c49
commit 84e8a42813
2 changed files with 59 additions and 6 deletions
@@ -11,6 +11,8 @@ Rectangle {
property color background: "transparent"
property color hoverBackground: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.12)
property color pressedBackground: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.22)
property color tooltipBackground: "#101315"
property color tooltipForeground: foreground
property string fontFamily: "JetBrainsMono Nerd Font"
property real fontSize: 12
property real iconSize: 14
@@ -19,9 +21,31 @@ Rectangle {
property bool active: false
property color activeBackground: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.18)
ToolTip.visible: tooltipText !== "" && mouseArea.containsMouse
ToolTip.text: tooltipText
ToolTip.delay: 400
ToolTip {
visible: root.tooltipText !== "" && mouseArea.containsMouse
text: root.tooltipText
delay: 400
padding: 0
background: Rectangle {
color: root.tooltipBackground
border.color: root.tooltipForeground
border.width: 1
radius: 0
opacity: 0.97
}
contentItem: Text {
text: root.tooltipText
color: root.tooltipForeground
font.family: root.fontFamily
font.pixelSize: 11
leftPadding: 10
rightPadding: 10
topPadding: 6
bottomPadding: 6
}
}
signal clicked()
signal rightClicked()