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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user