parent
c09d5a6c03
commit
252f19ec0e
6 changed files with 24 additions and 5 deletions
|
|
@ -15,9 +15,10 @@ Item {
|
||||||
required property PersistentProperties state
|
required property PersistentProperties state
|
||||||
required property FileDialog facePicker
|
required property FileDialog facePicker
|
||||||
readonly property real nonAnimWidth: view.implicitWidth + viewWrapper.anchors.margins * 2
|
readonly property real nonAnimWidth: view.implicitWidth + viewWrapper.anchors.margins * 2
|
||||||
|
readonly property real nonAnimHeight: tabs.implicitHeight + tabs.anchors.topMargin + view.implicitHeight + viewWrapper.anchors.margins * 2
|
||||||
|
|
||||||
implicitWidth: nonAnimWidth
|
implicitWidth: nonAnimWidth
|
||||||
implicitHeight: tabs.implicitHeight + tabs.anchors.topMargin + view.implicitHeight + viewWrapper.anchors.margins * 2
|
implicitHeight: nonAnimHeight
|
||||||
|
|
||||||
Tabs {
|
Tabs {
|
||||||
id: tabs
|
id: tabs
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly property real nonAnimHeight: state === "visible" ? (content.item?.nonAnimHeight ?? 0) : 0
|
||||||
|
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
implicitHeight: 0
|
implicitHeight: 0
|
||||||
implicitWidth: content.implicitWidth
|
implicitWidth: content.implicitWidth
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ Item {
|
||||||
Launcher.Wrapper {
|
Launcher.Wrapper {
|
||||||
id: launcher
|
id: launcher
|
||||||
|
|
||||||
|
screen: root.screen
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
panels: root
|
panels: root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ Item {
|
||||||
|
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
required property var panels
|
required property var panels
|
||||||
|
required property real maxHeight
|
||||||
|
|
||||||
readonly property int padding: Appearance.padding.large
|
readonly property int padding: Appearance.padding.large
|
||||||
readonly property int rounding: Appearance.rounding.large
|
readonly property int rounding: Appearance.rounding.large
|
||||||
|
|
@ -36,6 +37,7 @@ Item {
|
||||||
content: root
|
content: root
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
panels: root.panels
|
panels: root.panels
|
||||||
|
maxHeight: root.maxHeight - searchWrapper.implicitHeight - root.padding * 3
|
||||||
search: search
|
search: search
|
||||||
padding: root.padding
|
padding: root.padding
|
||||||
rounding: root.rounding
|
rounding: root.rounding
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ Item {
|
||||||
required property var content
|
required property var content
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
required property var panels
|
required property var panels
|
||||||
|
required property real maxHeight
|
||||||
required property StyledTextField search
|
required property StyledTextField search
|
||||||
required property int padding
|
required property int padding
|
||||||
required property int rounding
|
required property int rounding
|
||||||
|
|
@ -33,7 +34,7 @@ Item {
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
root.implicitWidth: Config.launcher.sizes.itemWidth
|
root.implicitWidth: Config.launcher.sizes.itemWidth
|
||||||
root.implicitHeight: appList.implicitHeight > 0 ? appList.implicitHeight : empty.implicitHeight
|
root.implicitHeight: Math.min(root.maxHeight, appList.implicitHeight > 0 ? appList.implicitHeight : empty.implicitHeight)
|
||||||
appList.active: true
|
appList.active: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,8 +79,7 @@ Item {
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.fill: parent
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
sourceComponent: AppList {
|
sourceComponent: AppList {
|
||||||
search: root.search
|
search: root.search
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,22 @@ import QtQuick
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
required property ShellScreen screen
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
required property var panels
|
required property var panels
|
||||||
|
|
||||||
readonly property bool shouldBeActive: visibilities.launcher && Config.launcher.enabled
|
readonly property bool shouldBeActive: visibilities.launcher && Config.launcher.enabled
|
||||||
property int contentHeight
|
property int contentHeight
|
||||||
|
|
||||||
|
readonly property real maxHeight: {
|
||||||
|
let max = screen.height - Config.border.thickness * 2 - Appearance.spacing.large;
|
||||||
|
if (visibilities.dashboard)
|
||||||
|
max -= panels.dashboard.nonAnimHeight;
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMaxHeightChanged: timer.start()
|
||||||
|
|
||||||
visible: height > 0
|
visible: height > 0
|
||||||
implicitHeight: 0
|
implicitHeight: 0
|
||||||
implicitWidth: content.implicitWidth
|
implicitWidth: content.implicitWidth
|
||||||
|
|
@ -84,7 +94,7 @@ Item {
|
||||||
|
|
||||||
interval: Appearance.anim.durations.extraLarge
|
interval: Appearance.anim.durations.extraLarge
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
if (running) {
|
if (running && !root.shouldBeActive) {
|
||||||
content.visible = false;
|
content.visible = false;
|
||||||
content.active = true;
|
content.active = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -108,6 +118,9 @@ Item {
|
||||||
sourceComponent: Content {
|
sourceComponent: Content {
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
panels: root.panels
|
panels: root.panels
|
||||||
|
maxHeight: root.maxHeight
|
||||||
|
|
||||||
|
Component.onCompleted: root.contentHeight = implicitHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue