forked from Shinonome/dots-hyprland
hefty: bar: put popups in loaders
This commit is contained in:
@@ -14,7 +14,7 @@ GridLayout {
|
||||
readonly property int count: choreographableChildren.length
|
||||
children: choreographableChildren
|
||||
|
||||
property bool shown: true
|
||||
property bool shown: false
|
||||
onShownChanged: {
|
||||
// When hiding, hide all at once
|
||||
if (!shown) {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
|
||||
FadeLoader {
|
||||
id: root
|
||||
onActiveChanged: item.shown = true
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import QtQuick.Layouts
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property alias textWidget: textWidget
|
||||
property alias text: textWidget.text
|
||||
property alias horizontalAlignment: textWidget.horizontalAlignment
|
||||
property alias verticalAlignment: textWidget.verticalAlignment
|
||||
@@ -27,7 +28,10 @@ Item {
|
||||
|
||||
StyledText {
|
||||
id: textWidget
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
y: {
|
||||
const value = (parent.height - textMetrics.height) / 2;
|
||||
return root.lowerBias ? Math.ceil(value) : Math.round(value);
|
||||
|
||||
Reference in New Issue
Block a user