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 QtQuick
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Common.Styled
|
import qs.Common.Styled
|
||||||
@@ -74,6 +75,8 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: root.getLocalizedDayHeaders()
|
model: root.getLocalizedDayHeaders()
|
||||||
StyledText {
|
StyledText {
|
||||||
|
required property var modelData
|
||||||
|
|
||||||
text: modelData
|
text: modelData
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
width: 18
|
width: 18
|
||||||
@@ -84,6 +87,7 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: root.layoutData.days
|
model: root.layoutData.days
|
||||||
StyledText {
|
StyledText {
|
||||||
|
required property var modelData
|
||||||
text: modelData
|
text: modelData
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
width: 18
|
width: 18
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ BackgroundRectangle {
|
|||||||
|
|
||||||
height: collapsed ? 0 : contentHeight
|
height: collapsed ? 0 : contentHeight
|
||||||
|
|
||||||
Component.onCompleted: { root.collapsed = false }
|
Component.onCompleted: {
|
||||||
|
root.collapsed = false;
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
@@ -49,7 +51,7 @@ BackgroundRectangle {
|
|||||||
root.timedout();
|
root.timedout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
@@ -65,7 +67,7 @@ BackgroundRectangle {
|
|||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: notifTimer
|
id: notifTimer
|
||||||
interval: timerDuration
|
interval: root.timerDuration
|
||||||
running: root.startTimer
|
running: root.startTimer
|
||||||
repeat: false
|
repeat: false
|
||||||
|
|
||||||
@@ -86,7 +88,6 @@ BackgroundRectangle {
|
|||||||
margins: 10
|
margins: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
id: iconImage
|
id: iconImage
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id:root
|
id: root
|
||||||
|
|
||||||
readonly property string time: "oi"
|
readonly property string time: "oi"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ pragma Singleton
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Wayland
|
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Common
|
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
@@ -24,15 +22,18 @@ Singleton {
|
|||||||
const sorted = topLevels.sort((a, b) => {
|
const sorted = topLevels.sort((a, b) => {
|
||||||
if (a.monitor && b.monitor) {
|
if (a.monitor && b.monitor) {
|
||||||
const monitorCompare = a.monitor.name.localeCompare(b.monitor.name);
|
const monitorCompare = a.monitor.name.localeCompare(b.monitor.name);
|
||||||
if (monitorCompare !== 0) return monitorCompare;
|
if (monitorCompare !== 0)
|
||||||
|
return monitorCompare;
|
||||||
}
|
}
|
||||||
if (a.workspace && b.workspace) {
|
if (a.workspace && b.workspace) {
|
||||||
const workspaceCompare = a.workspace.id - b.workspace.id;
|
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) {
|
if (a.lastIpcObject?.at && b.lastIpcObject?.at) {
|
||||||
const xCompare = a.lastIpcObject.at[0] - b.lastIpcObject.at[0];
|
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];
|
return a.lastIpcObject.at[1] - b.lastIpcObject.at[1];
|
||||||
}
|
}
|
||||||
if (a.title && b.title)
|
if (a.title && b.title)
|
||||||
@@ -52,11 +53,11 @@ Singleton {
|
|||||||
id: retryTimer
|
id: retryTimer
|
||||||
interval: 300
|
interval: 300
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: refreshSortedDesktopApplications()
|
onTriggered: root.refreshSortedDesktopApplications()
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshSortedDesktopApplications() {
|
function refreshSortedDesktopApplications() {
|
||||||
if (!Hyprland.toplevels || Hyprland.toplevels.size === 0)
|
if (!Hyprland.toplevels)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -73,8 +74,6 @@ Singleton {
|
|||||||
desktopEntry: entry
|
desktopEntry: entry
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
retryTimer.restart();
|
retryTimer.restart();
|
||||||
}
|
}
|
||||||
@@ -109,4 +108,3 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Singleton {
|
|||||||
|
|
||||||
readonly property var notificationServer: notificationServer
|
readonly property var notificationServer: notificationServer
|
||||||
readonly property var notificationsNumber: notificationServer.trackedNotifications.values.length
|
readonly property var notificationsNumber: notificationServer.trackedNotifications.values.length
|
||||||
readonly property var maxShown: 3
|
readonly property int maxShown: 3
|
||||||
|
|
||||||
property bool receivingLock: false
|
property bool receivingLock: false
|
||||||
property bool manualNotificationsMuted: false
|
property bool manualNotificationsMuted: false
|
||||||
@@ -31,7 +31,7 @@ Singleton {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
notif.tracked = true;
|
notif.tracked = true;
|
||||||
root.addNotification(trackedNotifications, notif);
|
root.addNotification(root.trackedNotifications, notif);
|
||||||
|
|
||||||
if (notif.lastGeneration)
|
if (notif.lastGeneration)
|
||||||
return;
|
return;
|
||||||
@@ -150,7 +150,6 @@ Singleton {
|
|||||||
Quickshell.screens.filter(screen => screen.name == HyprlandService.focusedMon.name)[0];
|
Quickshell.screens.filter(screen => screen.name == HyprlandService.focusedMon.name)[0];
|
||||||
}
|
}
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
margins.top: screen.height / 100
|
|
||||||
exclusiveZone: 0
|
exclusiveZone: 0
|
||||||
implicitWidth: 400
|
implicitWidth: 400
|
||||||
implicitHeight: screen.height
|
implicitHeight: screen.height
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ PanelWindow {
|
|||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||||
|
|
||||||
exclusionMode:ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
|
||||||
ScreencopyView {
|
ScreencopyView {
|
||||||
id: raveel
|
id: raveel
|
||||||
@@ -43,7 +43,7 @@ PanelWindow {
|
|||||||
blurEnabled: true
|
blurEnabled: true
|
||||||
blurMax: 32
|
blurMax: 32
|
||||||
blur: 1.0
|
blur: 1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -59,7 +59,6 @@ PanelWindow {
|
|||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listview
|
id: listview
|
||||||
|
|
||||||
@@ -136,7 +135,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property int workspaceId: parent.modelData.topLevel.workspace.id
|
property int workspaceId: parent.modelData.topLevel.workspace.id
|
||||||
property var desktopEntry: parent.modelData.desktopEntry? parent.modelData.desktopEntry:null
|
property var desktopEntry: parent.modelData.desktopEntry ? parent.modelData.desktopEntry : null
|
||||||
|
|
||||||
width: 30
|
width: 30
|
||||||
height: 30
|
height: 30
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ WrapperMouseArea {
|
|||||||
if (workspacesRectangle.workspace.id === Hyprland.focusedWorkspace.id) {
|
if (workspacesRectangle.workspace.id === Hyprland.focusedWorkspace.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
Hyprland.dispatch("workspace " + workspacesRectangle.workspace.id);
|
Hyprland.dispatch("workspace " + workspacesRectangle.workspace.id);
|
||||||
PopUpHover.exit();
|
PopUpHover.exit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user