1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-04 12:38:31 -04:00

refactor(launcher): invert framemode emerge from top position

This commit is contained in:
purian23
2026-07-02 11:18:33 -04:00
parent 2128e6f14e
commit 4ae8ef927c
4 changed files with 174 additions and 101 deletions
@@ -15,6 +15,8 @@ Rectangle {
property bool canChangeViewMode: true
property bool canCollapse: true
property bool isSticky: false
property bool popupAbove: false
property Item popupAboveItem: null
signal viewModeToggled
@@ -122,9 +124,10 @@ Rectangle {
if (categoryPopup.visible) {
categoryPopup.close();
} else {
const pos = categoryChip.mapToItem(Overlay.overlay, 0, 0);
categoryPopup.x = pos.x;
categoryPopup.y = pos.y + categoryChip.height + 4;
const chipPos = categoryChip.mapToItem(Overlay.overlay, 0, 0);
const abovePos = (root.popupAboveItem ?? categoryChip).mapToItem(Overlay.overlay, 0, 0);
categoryPopup.x = chipPos.x;
categoryPopup.y = root.popupAbove ? abovePos.y - categoryPopup.height - 4 : chipPos.y + categoryChip.height + 4;
categoryPopup.open();
}
}
@@ -325,7 +328,7 @@ Rectangle {
anchors.fill: parent
anchors.rightMargin: rightContent.width + Theme.spacingS
cursorShape: root.canCollapse ? Qt.PointingHandCursor : Qt.ArrowCursor
enabled: root.canCollapse
enabled: root.canCollapse && !leftContent.hasAppCategories
onClicked: {
if (root.canCollapse && root.controller && root.section) {
root.controller.toggleSection(root.section.id);