Merge branch 'main' into sdfs
This commit is contained in:
commit
edf1c155f1
13 changed files with 55 additions and 59 deletions
|
|
@ -12,7 +12,6 @@ StyledRect {
|
|||
|
||||
required property string label
|
||||
property int expandedZ: 100
|
||||
property bool enabled: true
|
||||
|
||||
property alias menuItems: splitButton.menuItems
|
||||
property alias active: splitButton.active
|
||||
|
|
|
|||
|
|
@ -13,15 +13,15 @@ Item {
|
|||
property var validator: null
|
||||
property bool readOnly: false
|
||||
property int horizontalAlignment: TextInput.AlignHCenter
|
||||
property int implicitWidth: 70
|
||||
property bool enabled: true
|
||||
|
||||
// Expose activeFocus through alias to avoid FINAL property override
|
||||
readonly property alias hasFocus: inputField.activeFocus
|
||||
|
||||
signal textEdited(string text)
|
||||
|
||||
signal editingFinished
|
||||
|
||||
implicitWidth: 70
|
||||
implicitHeight: inputField.implicitHeight + Appearance.padding.small * 2
|
||||
|
||||
StyledRect {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ StyledRect {
|
|||
|
||||
required property string label
|
||||
required property bool checked
|
||||
property bool enabled: true
|
||||
property var onToggled: function (checked) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Item {
|
|||
required property real absX
|
||||
required property real absY
|
||||
|
||||
property real scale: Config.background.desktopClock.scale
|
||||
property real clockScale: Config.background.desktopClock.scale
|
||||
readonly property bool bgEnabled: Config.background.desktopClock.background.enabled
|
||||
readonly property bool blurEnabled: bgEnabled && Config.background.desktopClock.background.blur && !GameMode.enabled
|
||||
readonly property bool invertColors: Config.background.desktopClock.invertColors
|
||||
|
|
@ -23,8 +23,8 @@ Item {
|
|||
readonly property color safeSecondary: useLightSet ? Colours.palette.m3secondaryContainer : Colours.palette.m3secondary
|
||||
readonly property color safeTertiary: useLightSet ? Colours.palette.m3tertiaryContainer : Colours.palette.m3tertiary
|
||||
|
||||
implicitWidth: layout.implicitWidth + (Appearance.padding.large * 4 * root.scale)
|
||||
implicitHeight: layout.implicitHeight + (Appearance.padding.large * 2 * root.scale)
|
||||
implicitWidth: layout.implicitWidth + (Appearance.padding.large * 4 * root.clockScale)
|
||||
implicitHeight: layout.implicitHeight + (Appearance.padding.large * 2 * root.clockScale)
|
||||
|
||||
Item {
|
||||
id: clockContainer
|
||||
|
|
@ -63,7 +63,7 @@ Item {
|
|||
|
||||
visible: root.bgEnabled
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.large * root.scale
|
||||
radius: Appearance.rounding.large * root.clockScale
|
||||
opacity: Config.background.desktopClock.background.opacity
|
||||
color: Colours.palette.m3surface
|
||||
|
||||
|
|
@ -74,29 +74,29 @@ Item {
|
|||
id: layout
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.larger * root.scale
|
||||
spacing: Appearance.spacing.larger * root.clockScale
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.small
|
||||
|
||||
StyledText {
|
||||
text: Time.hourStr
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
font.weight: Font.Bold
|
||||
color: root.safePrimary
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: ":"
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
color: root.safeTertiary
|
||||
opacity: 0.8
|
||||
Layout.topMargin: -Appearance.padding.large * 1.5 * root.scale
|
||||
Layout.topMargin: -Appearance.padding.large * 1.5 * root.clockScale
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: Time.minuteStr
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale
|
||||
font.weight: Font.Bold
|
||||
color: root.safeSecondary
|
||||
}
|
||||
|
|
@ -104,14 +104,14 @@ Item {
|
|||
Loader {
|
||||
asynchronous: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.topMargin: Appearance.padding.large * 1.4 * root.scale
|
||||
Layout.topMargin: Appearance.padding.large * 1.4 * root.clockScale
|
||||
|
||||
active: Config.services.useTwelveHourClock
|
||||
visible: active
|
||||
|
||||
sourceComponent: StyledText {
|
||||
text: Time.amPmStr
|
||||
font.pointSize: Appearance.font.size.large * root.scale
|
||||
font.pointSize: Appearance.font.size.large * root.clockScale
|
||||
color: root.safeSecondary
|
||||
}
|
||||
}
|
||||
|
|
@ -119,9 +119,9 @@ Item {
|
|||
|
||||
StyledRect {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 4 * root.scale
|
||||
Layout.topMargin: Appearance.spacing.larger * root.scale
|
||||
Layout.bottomMargin: Appearance.spacing.larger * root.scale
|
||||
Layout.preferredWidth: 4 * root.clockScale
|
||||
Layout.topMargin: Appearance.spacing.larger * root.clockScale
|
||||
Layout.bottomMargin: Appearance.spacing.larger * root.clockScale
|
||||
radius: Appearance.rounding.full
|
||||
color: root.safePrimary
|
||||
opacity: 0.8
|
||||
|
|
@ -132,7 +132,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("MMMM").toUpperCase()
|
||||
font.pointSize: Appearance.font.size.large * root.scale
|
||||
font.pointSize: Appearance.font.size.large * root.clockScale
|
||||
font.letterSpacing: 4
|
||||
font.weight: Font.Bold
|
||||
color: root.safeSecondary
|
||||
|
|
@ -140,7 +140,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("dd")
|
||||
font.pointSize: Appearance.font.size.extraLarge * root.scale
|
||||
font.pointSize: Appearance.font.size.extraLarge * root.clockScale
|
||||
font.letterSpacing: 2
|
||||
font.weight: Font.Medium
|
||||
color: root.safePrimary
|
||||
|
|
@ -148,7 +148,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
text: Time.format("dddd")
|
||||
font.pointSize: Appearance.font.size.larger * root.scale
|
||||
font.pointSize: Appearance.font.size.larger * root.clockScale
|
||||
font.letterSpacing: 2
|
||||
color: root.safeSecondary
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
Behavior on clockScale {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
component WrappedLoader: Loader {
|
||||
required property bool enabled
|
||||
required enabled
|
||||
required property string id
|
||||
required property int index
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Item {
|
|||
property alias currentName: popoutState.currentName
|
||||
property real currentCenter
|
||||
property alias hasCurrent: popoutState.hasCurrent
|
||||
readonly property PopoutState state: popoutState
|
||||
readonly property PopoutState popState: popoutState
|
||||
|
||||
property string detachedMode
|
||||
property string queuedMode
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Item {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
required property DashboardState state
|
||||
required property DashboardState dashState
|
||||
required property FileDialog facePicker
|
||||
|
||||
readonly property var dashboardTabs: {
|
||||
|
|
@ -70,7 +70,7 @@ Item {
|
|||
anchors.margins: Appearance.padding.large
|
||||
|
||||
nonAnimWidth: root.nonAnimWidth - anchors.margins * 2
|
||||
state: root.state
|
||||
dashState: root.dashState
|
||||
tabs: root.dashboardTabs
|
||||
}
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ Item {
|
|||
Flickable {
|
||||
id: view
|
||||
|
||||
readonly property int currentIndex: root.state.currentTab
|
||||
readonly property int currentIndex: root.dashState.currentTab
|
||||
readonly property Item currentItem: {
|
||||
repeater.count; // Trigger update on count change
|
||||
return repeater.itemAt(currentIndex);
|
||||
|
|
@ -112,9 +112,9 @@ Item {
|
|||
|
||||
const x = contentX - currentItem.x;
|
||||
if (x > currentItem.implicitWidth / 2)
|
||||
root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1);
|
||||
root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, tabs.count - 1);
|
||||
else if (x < -currentItem.implicitWidth / 2)
|
||||
root.state.currentTab = Math.max(root.state.currentTab - 1, 0);
|
||||
root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0);
|
||||
}
|
||||
|
||||
onDragEnded: {
|
||||
|
|
@ -123,9 +123,9 @@ Item {
|
|||
|
||||
const x = contentX - currentItem.x;
|
||||
if (x > currentItem.implicitWidth / 10)
|
||||
root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1);
|
||||
root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, tabs.count - 1);
|
||||
else if (x < -currentItem.implicitWidth / 10)
|
||||
root.state.currentTab = Math.max(root.state.currentTab - 1, 0);
|
||||
root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0);
|
||||
else
|
||||
contentX = Qt.binding(() => currentItem?.x ?? 0);
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ Item {
|
|||
|
||||
Dash {
|
||||
visibilities: root.visibilities
|
||||
state: root.state
|
||||
dashState: root.dashState
|
||||
facePicker: root.facePicker
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ GridLayout {
|
|||
id: root
|
||||
|
||||
required property DrawerVisibilities visibilities
|
||||
required property DashboardState state
|
||||
required property DashboardState dashState
|
||||
required property FileDialog facePicker
|
||||
|
||||
rowSpacing: Appearance.spacing.normal
|
||||
|
|
@ -27,7 +27,6 @@ GridLayout {
|
|||
id: user
|
||||
|
||||
visibilities: root.visibilities
|
||||
state: root.state
|
||||
facePicker: root.facePicker
|
||||
}
|
||||
}
|
||||
|
|
@ -67,7 +66,7 @@ GridLayout {
|
|||
Calendar {
|
||||
id: calendar
|
||||
|
||||
state: root.state
|
||||
dashState: root.dashState
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Item {
|
|||
id: root
|
||||
|
||||
required property real nonAnimWidth
|
||||
required property DashboardState state
|
||||
required property DashboardState dashState
|
||||
required property var tabs
|
||||
|
||||
readonly property alias count: bar.count
|
||||
|
|
@ -27,10 +27,10 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
currentIndex: root.state.currentTab
|
||||
currentIndex: root.dashState.currentTab
|
||||
background: null
|
||||
|
||||
onCurrentIndexChanged: root.state.currentTab = currentIndex
|
||||
onCurrentIndexChanged: root.dashState.currentTab = currentIndex
|
||||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
|
|
@ -113,9 +113,9 @@ Item {
|
|||
|
||||
function onWheel(event: WheelEvent): void {
|
||||
if (event.angleDelta.y < 0)
|
||||
root.state.currentTab = Math.min(root.state.currentTab + 1, bar.count - 1);
|
||||
root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, bar.count - 1);
|
||||
else if (event.angleDelta.y > 0)
|
||||
root.state.currentTab = Math.max(root.state.currentTab - 1, 0);
|
||||
root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0);
|
||||
}
|
||||
|
||||
implicitWidth: Math.max(icon.width, label.width)
|
||||
|
|
@ -124,7 +124,7 @@ Item {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onPressed: event => {
|
||||
root.state.currentTab = tab.TabBar.index;
|
||||
root.dashState.currentTab = tab.TabBar.index;
|
||||
|
||||
const stateY = stateWrapper.y;
|
||||
rippleAnim.x = event.x;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ Item {
|
|||
|
||||
sourceComponent: Content {
|
||||
visibilities: root.visibilities
|
||||
state: root.dashState
|
||||
dashState: root.dashState
|
||||
facePicker: root.facePicker
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,16 +12,16 @@ import qs.config
|
|||
CustomMouseArea {
|
||||
id: root
|
||||
|
||||
required property var state
|
||||
required property DashboardState dashState
|
||||
|
||||
readonly property int currMonth: state.currentDate.getMonth()
|
||||
readonly property int currYear: state.currentDate.getFullYear()
|
||||
readonly property int currMonth: dashState.currentDate.getMonth()
|
||||
readonly property int currYear: dashState.currentDate.getFullYear()
|
||||
|
||||
function onWheel(event: WheelEvent): void {
|
||||
if (event.angleDelta.y > 0)
|
||||
root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
|
||||
root.dashState.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
|
||||
else if (event.angleDelta.y < 0)
|
||||
root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
|
||||
root.dashState.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
|
|
@ -29,7 +29,7 @@ CustomMouseArea {
|
|||
implicitHeight: inner.implicitHeight + inner.anchors.margins * 2
|
||||
|
||||
acceptedButtons: Qt.MiddleButton
|
||||
onClicked: root.state.currentDate = new Date()
|
||||
onClicked: root.dashState.currentDate = new Date()
|
||||
|
||||
ColumnLayout {
|
||||
id: inner
|
||||
|
|
@ -52,7 +52,7 @@ CustomMouseArea {
|
|||
id: prevMonthStateLayer
|
||||
|
||||
function onClicked(): void {
|
||||
root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
|
||||
root.dashState.currentDate = new Date(root.currYear, root.currMonth - 1, 1);
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
|
|
@ -77,7 +77,7 @@ CustomMouseArea {
|
|||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
root.state.currentDate = new Date();
|
||||
root.dashState.currentDate = new Date();
|
||||
}
|
||||
|
||||
anchors.fill: monthYearDisplay
|
||||
|
|
@ -112,7 +112,7 @@ CustomMouseArea {
|
|||
id: nextMonthStateLayer
|
||||
|
||||
function onClicked(): void {
|
||||
root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
|
||||
root.dashState.currentDate = new Date(root.currYear, root.currMonth + 1, 1);
|
||||
}
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Row {
|
|||
id: root
|
||||
|
||||
required property DrawerVisibilities visibilities
|
||||
required property DashboardState state
|
||||
required property FileDialog facePicker
|
||||
|
||||
padding: Appearance.padding.large
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ Singleton {
|
|||
|
||||
function executeCommand(args: list<string>, callback: var): void {
|
||||
const proc = commandProc.createObject(root);
|
||||
proc.command = ["nmcli", ...args];
|
||||
proc.cmdArgs = ["nmcli", ...args];
|
||||
proc.callback = callback;
|
||||
|
||||
activeProcesses.push(proc);
|
||||
|
|
@ -181,7 +181,7 @@ Singleton {
|
|||
});
|
||||
|
||||
Qt.callLater(() => {
|
||||
proc.exec(proc.command);
|
||||
proc.exec(proc.cmdArgs);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -840,7 +840,7 @@ Singleton {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!isConnectionCommand(proc.command) || !root.pendingConnection || !root.pendingConnection.callback) {
|
||||
if (!isConnectionCommand(proc.cmdArgs) || !root.pendingConnection || !root.pendingConnection.callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1117,7 +1117,7 @@ Singleton {
|
|||
if (proc && proc.stderr && proc.stderr.text) {
|
||||
const error = proc.stderr.text.trim();
|
||||
if (error && error.length > 0) {
|
||||
if (root.isConnectionCommand(proc.command)) {
|
||||
if (root.isConnectionCommand(proc.cmdArgs)) {
|
||||
const needsPassword = root.detectPasswordRequired(error);
|
||||
|
||||
if (needsPassword && !proc.callbackCalled && root.pendingConnection) {
|
||||
|
|
@ -1204,7 +1204,7 @@ Singleton {
|
|||
if (proc && proc.stderr && proc.stderr.text) {
|
||||
const error = proc.stderr.text.trim();
|
||||
if (error && error.length > 0) {
|
||||
if (root.isConnectionCommand(proc.command)) {
|
||||
if (root.isConnectionCommand(proc.cmdArgs)) {
|
||||
const needsPassword = root.detectPasswordRequired(error);
|
||||
|
||||
if (needsPassword && !proc.callbackCalled && root.pendingConnection && root.pendingConnection.callback) {
|
||||
|
|
@ -1281,7 +1281,7 @@ Singleton {
|
|||
id: proc
|
||||
|
||||
property var callback: null
|
||||
property list<string> command: []
|
||||
property list<string> cmdArgs: []
|
||||
property bool callbackCalled: false
|
||||
property int exitCode: 0
|
||||
|
||||
|
|
@ -1321,7 +1321,7 @@ Singleton {
|
|||
const output = (stdoutCollector && stdoutCollector.text) ? stdoutCollector.text : "";
|
||||
const error = (stderrCollector && stderrCollector.text) ? stderrCollector.text : "";
|
||||
const success = exitCode === 0;
|
||||
const cmdIsConnection = isConnectionCommand(proc.command);
|
||||
const cmdIsConnection = isConnectionCommand(proc.cmdArgs);
|
||||
|
||||
if (root.handlePasswordRequired(proc, error, output, exitCode)) {
|
||||
processFinished();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue