Fix some styling, make some components bound
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// CalendarComponent.qml (For one month)
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Common.Styled
|
||||
@@ -74,6 +75,8 @@ Item {
|
||||
Repeater {
|
||||
model: root.getLocalizedDayHeaders()
|
||||
StyledText {
|
||||
required property var modelData
|
||||
|
||||
text: modelData
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: 18
|
||||
@@ -84,6 +87,7 @@ Item {
|
||||
Repeater {
|
||||
model: root.layoutData.days
|
||||
StyledText {
|
||||
required property var modelData
|
||||
text: modelData
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
width: 18
|
||||
|
||||
@@ -33,7 +33,9 @@ BackgroundRectangle {
|
||||
|
||||
height: collapsed ? 0 : contentHeight
|
||||
|
||||
Component.onCompleted: { root.collapsed = false }
|
||||
Component.onCompleted: {
|
||||
root.collapsed = false;
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
SequentialAnimation {
|
||||
@@ -65,7 +67,7 @@ BackgroundRectangle {
|
||||
|
||||
Timer {
|
||||
id: notifTimer
|
||||
interval: timerDuration
|
||||
interval: root.timerDuration
|
||||
running: root.startTimer
|
||||
repeat: false
|
||||
|
||||
@@ -86,7 +88,6 @@ BackgroundRectangle {
|
||||
margins: 10
|
||||
}
|
||||
|
||||
|
||||
IconImage {
|
||||
id: iconImage
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
@@ -7,6 +6,4 @@ Singleton {
|
||||
id: root
|
||||
|
||||
readonly property string time: "oi"
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
|
||||
@@ -3,9 +3,7 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
@@ -24,15 +22,18 @@ Singleton {
|
||||
const sorted = topLevels.sort((a, b) => {
|
||||
if (a.monitor && b.monitor) {
|
||||
const monitorCompare = a.monitor.name.localeCompare(b.monitor.name);
|
||||
if (monitorCompare !== 0) return monitorCompare;
|
||||
if (monitorCompare !== 0)
|
||||
return monitorCompare;
|
||||
}
|
||||
if (a.workspace && b.workspace) {
|
||||
const workspaceCompare = a.workspace.id - b.workspace.id;
|
||||
if (workspaceCompare !== 0) return workspaceCompare;
|
||||
if (workspaceCompare !== 0)
|
||||
return workspaceCompare;
|
||||
}
|
||||
if (a.lastIpcObject?.at && b.lastIpcObject?.at) {
|
||||
const xCompare = a.lastIpcObject.at[0] - b.lastIpcObject.at[0];
|
||||
if (Math.abs(xCompare) > 10) return xCompare;
|
||||
if (Math.abs(xCompare) > 10)
|
||||
return xCompare;
|
||||
return a.lastIpcObject.at[1] - b.lastIpcObject.at[1];
|
||||
}
|
||||
if (a.title && b.title)
|
||||
@@ -52,11 +53,11 @@ Singleton {
|
||||
id: retryTimer
|
||||
interval: 300
|
||||
repeat: false
|
||||
onTriggered: refreshSortedDesktopApplications()
|
||||
onTriggered: root.refreshSortedDesktopApplications()
|
||||
}
|
||||
|
||||
function refreshSortedDesktopApplications() {
|
||||
if (!Hyprland.toplevels || Hyprland.toplevels.size === 0)
|
||||
if (!Hyprland.toplevels)
|
||||
return;
|
||||
|
||||
try {
|
||||
@@ -73,8 +74,6 @@ Singleton {
|
||||
desktopEntry: entry
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} catch (err) {
|
||||
retryTimer.restart();
|
||||
}
|
||||
@@ -109,4 +108,3 @@ Singleton {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Singleton {
|
||||
|
||||
readonly property var notificationServer: notificationServer
|
||||
readonly property var notificationsNumber: notificationServer.trackedNotifications.values.length
|
||||
readonly property var maxShown: 3
|
||||
readonly property int maxShown: 3
|
||||
|
||||
property bool receivingLock: false
|
||||
property bool manualNotificationsMuted: false
|
||||
@@ -31,7 +31,7 @@ Singleton {
|
||||
return;
|
||||
|
||||
notif.tracked = true;
|
||||
root.addNotification(trackedNotifications, notif);
|
||||
root.addNotification(root.trackedNotifications, notif);
|
||||
|
||||
if (notif.lastGeneration)
|
||||
return;
|
||||
@@ -150,7 +150,6 @@ Singleton {
|
||||
Quickshell.screens.filter(screen => screen.name == HyprlandService.focusedMon.name)[0];
|
||||
}
|
||||
anchors.top: true
|
||||
margins.top: screen.height / 100
|
||||
exclusiveZone: 0
|
||||
implicitWidth: 400
|
||||
implicitHeight: screen.height
|
||||
|
||||
@@ -59,7 +59,6 @@ PanelWindow {
|
||||
|
||||
color: "transparent"
|
||||
|
||||
|
||||
ListView {
|
||||
id: listview
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ WrapperMouseArea {
|
||||
if (workspacesRectangle.workspace.id === Hyprland.focusedWorkspace.id) {
|
||||
return;
|
||||
}
|
||||
;
|
||||
Hyprland.dispatch("workspace " + workspacesRectangle.workspace.id);
|
||||
PopUpHover.exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user