1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 05:55:37 -05:00

General code cleanups

This commit is contained in:
bbedward
2025-08-02 16:18:12 -04:00
parent 2cf7497324
commit 599118c63e
68 changed files with 102 additions and 1241 deletions

View File

@@ -39,11 +39,9 @@ PanelWindow {
radius: Theme.cornerRadiusLarge
border.color: Theme.outlineMedium
border.width: 1
// Material 3 animations
opacity: showContextMenu ? 1 : 0
scale: showContextMenu ? 1 : 0.85
// Material 3 drop shadow
Rectangle {
anchors.fill: parent
anchors.topMargin: 4
@@ -65,11 +63,9 @@ PanelWindow {
menu: currentTrayItem && currentTrayItem.hasMenu ? currentTrayItem.menu : null
}
// Custom menu styling using ListView
ListView {
id: menuList
// Calculate maximum text width for dynamic menu sizing
property real maxTextWidth: {
let maxWidth = 0;
if (model && model.values) {
@@ -101,7 +97,6 @@ PanelWindow {
radius: modelData.isSeparator ? 0 : Theme.cornerRadiusSmall
color: modelData.isSeparator ? "transparent" : (menuItemArea.containsMouse ? Theme.primaryHover : "transparent")
// Separator line
Rectangle {
visible: modelData.isSeparator
anchors.centerIn: parent
@@ -110,7 +105,6 @@ PanelWindow {
color: Theme.surfaceVariantAlpha
}
// Menu item content
Row {
visible: !modelData.isSeparator
anchors.left: parent.left
@@ -176,7 +170,6 @@ PanelWindow {
}
// Click outside to close
MouseArea {
anchors.fill: parent
z: -1