aboutsummaryrefslogtreecommitdiffstats
path: root/config/quickshell/overview/common/widgets/StyledToolTipContent.qml
diff options
context:
space:
mode:
authorDonald Williams <129223418+dwilliam62@users.noreply.github.com>2025-12-11 12:32:33 -0500
committerGitHub <noreply@github.com>2025-12-11 12:32:33 -0500
commit1d67791220aacb211a84d90ef030a352e402bd80 (patch)
treefc87b1a5e413e906bcc47cf8abf389c2bbd51b71 /config/quickshell/overview/common/widgets/StyledToolTipContent.qml
parentbcfd5e7c2b67f0a62b1ceeb62d20b0a80ca55a70 (diff)
parentbd5ca3f57c5c2b4a9c8602025cc38e4140b1d5a3 (diff)
Merge pull request #881 from JaKooLit/development
Development to main Major update v2.3.18
Diffstat (limited to 'config/quickshell/overview/common/widgets/StyledToolTipContent.qml')
-rw-r--r--config/quickshell/overview/common/widgets/StyledToolTipContent.qml49
1 files changed, 49 insertions, 0 deletions
diff --git a/config/quickshell/overview/common/widgets/StyledToolTipContent.qml b/config/quickshell/overview/common/widgets/StyledToolTipContent.qml
new file mode 100644
index 00000000..b8c29c1a
--- /dev/null
+++ b/config/quickshell/overview/common/widgets/StyledToolTipContent.qml
@@ -0,0 +1,49 @@
+import QtQuick
+import "."
+import "../"
+
+Item {
+ id: root
+ required property string text
+ property bool shown: false
+ property real horizontalPadding: 10
+ property real verticalPadding: 5
+ implicitWidth: tooltipTextObject.implicitWidth + 2 * root.horizontalPadding
+ implicitHeight: tooltipTextObject.implicitHeight + 2 * root.verticalPadding
+
+ property bool isVisible: backgroundRectangle.implicitHeight > 0
+
+ Rectangle {
+ id: backgroundRectangle
+ anchors {
+ bottom: root.bottom
+ horizontalCenter: root.horizontalCenter
+ }
+ color: Appearance?.colors.colTooltip ?? "#3C4043"
+ radius: Appearance?.rounding.verysmall ?? 7
+ opacity: shown ? 1 : 0
+ implicitWidth: shown ? (tooltipTextObject.implicitWidth + 2 * root.horizontalPadding) : 0
+ implicitHeight: shown ? (tooltipTextObject.implicitHeight + 2 * root.verticalPadding) : 0
+ clip: true
+
+ Behavior on implicitWidth {
+ animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this)
+ }
+ Behavior on implicitHeight {
+ animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this)
+ }
+ Behavior on opacity {
+ animation: Appearance?.animation.elementMoveFast.numberAnimation.createObject(this)
+ }
+
+ StyledText {
+ id: tooltipTextObject
+ anchors.centerIn: parent
+ text: root.text
+ font.pixelSize: Appearance?.font.pixelSize.smaller ?? 14
+ font.hintingPreference: Font.PreferNoHinting
+ color: Appearance?.colors.colOnTooltip ?? "#FFFFFF"
+ wrapMode: Text.Wrap
+ }
+ }
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage