styled tooltip

This commit is contained in:
Benjamin Palko 2025-08-27 09:49:16 -04:00
parent 13e6345b1d
commit b75a2a12c7
2 changed files with 30 additions and 1 deletions

View file

@ -0,0 +1,19 @@
import qs.config
import QtQuick
import QtQuick.Controls
ToolTip {
id: control
text: qsTr("A descriptive tool tip of what the button does")
contentItem: Text {
text: control.text
font: control.font
color: Theme.palette.basecontent
}
background: Rectangle {
radius: 8
color: Theme.palette.base200
}
}

View file

@ -8,6 +8,7 @@ import Quickshell.Hyprland
import Quickshell.Wayland
import Quickshell.Widgets
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
StyledWindow {
@ -39,6 +40,15 @@ StyledWindow {
}
}
ColumnLayout {}
ColumnLayout {
Button {
id: toolTipButton
text: "Hello world!"
StyledToolTip {
visible: toolTipButton.hovered
text: qsTr("Save the active project")
}
}
}
}
}