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 d6ce5af55c - Show all commits
+11 -6
View File
@@ -11,12 +11,15 @@ Item {
required property var bar
property color colour: DynamicColors.palette.m3primary
property Title current: text1
readonly property int maxWidth: 300
// readonly property int maxWidth: {
// const otherModules = bar.children.filter(c => c.id && c.item !== this && c.id !== "spacer");
// const otherWidth = otherModules.reduce((acc, curr) => acc + (curr.item.nonAnimWidth ?? curr.width), 0);
// return bar.width - otherWidth - bar.spacing * (bar.children.length - 1) - bar.hPadding * 2;
// }
// readonly property int maxWidth: 300
readonly property int maxWidth: {
const otherModules = bar.children.filter(c => c.enabled && c.id && c.item !== this && c.id !== "spacer");
otherModules.forEach(m => console.log(m.id, m.item));
const otherWidth = otherModules.reduce((acc, curr) => {
return acc + (curr.item?.nonAnimWidth ?? curr.width ?? 0);
}, 0);
return bar.width - otherWidth - bar.spacing * (bar.children.length - 1) - bar.vPadding * 2;
}
required property Brightness.Monitor monitor
clip: true
@@ -43,6 +46,8 @@ Item {
TextMetrics {
id: metrics
elide: Qt.ElideRight
elideWidth: root.maxWidth
font.family: "Rubik"
font.pointSize: 12
text: Hypr.activeToplevel?.title ?? qsTr("Desktop")