parent
5687a216ca
commit
b5883441df
1 changed files with 41 additions and 4 deletions
|
|
@ -20,6 +20,7 @@ Item {
|
||||||
|
|
||||||
onShouldBeActiveChanged: {
|
onShouldBeActiveChanged: {
|
||||||
if (shouldBeActive) {
|
if (shouldBeActive) {
|
||||||
|
timer.stop();
|
||||||
hideAnim.stop();
|
hideAnim.stop();
|
||||||
showAnim.start();
|
showAnim.start();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -57,16 +58,52 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Config.launcher
|
||||||
|
|
||||||
|
function onEnabledChanged(): void {
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onMaxShownChanged(): void {
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: DesktopEntries.applications
|
||||||
|
|
||||||
|
function onValuesChanged(): void {
|
||||||
|
if (DesktopEntries.applications.values.length < Config.launcher.maxShown)
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: timer
|
||||||
|
|
||||||
|
interval: Appearance.anim.durations.extraLarge
|
||||||
|
onRunningChanged: {
|
||||||
|
if (running) {
|
||||||
|
content.visible = false;
|
||||||
|
content.active = true;
|
||||||
|
} else {
|
||||||
|
root.contentHeight = content.implicitHeight;
|
||||||
|
content.active = Qt.binding(() => root.shouldBeActive || root.visible);
|
||||||
|
content.visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Component.onCompleted: {
|
visible: false
|
||||||
root.contentHeight = implicitHeight;
|
active: false
|
||||||
active = Qt.binding(() => root.shouldBeActive || root.visible);
|
Component.onCompleted: timer.start()
|
||||||
}
|
|
||||||
|
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue