Lots of uncommitted changes
This commit is contained in:
parent
daace49bfc
commit
497ca48ada
27 changed files with 909 additions and 134 deletions
31
modules/user/modules/quickshell/shell/bar/TooltipItem.qml
Normal file
31
modules/user/modules/quickshell/shell/bar/TooltipItem.qml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
Item {
|
||||
id: root
|
||||
required property var tooltip;
|
||||
required property Item owner;
|
||||
property bool isMenu: false;
|
||||
property bool animateSize: true;
|
||||
property bool show: false;
|
||||
|
||||
property real targetRelativeY: owner.height / 2;
|
||||
property real hangTime: isMenu ? 0 : 200;
|
||||
|
||||
signal close();
|
||||
|
||||
onShowChanged: {
|
||||
if (show) {
|
||||
hangTimer.stop();
|
||||
tooltip.setItem(this);
|
||||
} else if (hangTime == 0) {
|
||||
tooltip.removeItem(this);
|
||||
} else hangTimer.start();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: hangTimer
|
||||
interval: hangTime
|
||||
onTriggered: tooltip.removeItem(root);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue