Settings window #20

Merged
Zacharias-Brohn merged 83 commits from settingsWindow into main 2026-03-06 23:27:24 +01:00
Showing only changes of commit 6e967f8fd6 - Show all commits
+7 -17
View File
@@ -11,17 +11,17 @@ Item {
required property var bar required property var bar
property color colour: DynamicColors.palette.m3primary property color colour: DynamicColors.palette.m3primary
property Title current: text1 property Title current: text1
readonly property int maxHeight: { readonly property int maxWidth: 300
const otherModules = bar.children.filter(c => c.id && c.item !== this && c.id !== "spacer"); // readonly property int maxWidth: {
const otherHeight = otherModules.reduce((acc, curr) => acc + (curr.item.nonAnimHeight ?? curr.height), 0); // const otherModules = bar.children.filter(c => c.id && c.item !== this && c.id !== "spacer");
// Length - 2 cause repeater counts as a child // const otherWidth = otherModules.reduce((acc, curr) => acc + (curr.item.nonAnimWidth ?? curr.width), 0);
return bar.height - otherHeight - bar.spacing * (bar.children.length - 1) - bar.vPadding * 2; // return bar.width - otherWidth - bar.spacing * (bar.children.length - 1) - bar.hPadding * 2;
} // }
required property Brightness.Monitor monitor required property Brightness.Monitor monitor
clip: true clip: true
implicitHeight: current.implicitHeight implicitHeight: current.implicitHeight
implicitWidth: current.implicitWidth + current.anchors.leftMargin implicitWidth: Math.min(current.implicitWidth, root.maxWidth)
Behavior on implicitWidth { Behavior on implicitWidth {
Anim { Anim {
@@ -30,16 +30,6 @@ Item {
} }
} }
// MaterialIcon {
// id: icon
//
// anchors.verticalCenter: parent.verticalCenter
//
// animate: true
// text: Icons.getAppCategoryIcon(Hypr.activeToplevel?.lastIpcObject.class, "desktop_windows")
// color: root.colour
// }
Title { Title {
id: text1 id: text1