internal: format
This commit is contained in:
parent
6c1765c2e1
commit
9d7f0c48ce
74 changed files with 1635 additions and 1517 deletions
|
|
@ -29,4 +29,3 @@ ColumnLayout {
|
|||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,4 +57,3 @@ ColumnLayout {
|
|||
Layout.maximumWidth: parent.width
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,4 +24,3 @@ ColumnLayout {
|
|||
font.pointSize: Appearance.font.size.small
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@ StyledRect {
|
|||
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
||||
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.transparency.enabled
|
||||
? Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
: Colours.palette.m3surfaceContainerHigh
|
||||
color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : Colours.palette.m3surfaceContainerHigh
|
||||
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
|
|
@ -32,4 +30,3 @@ StyledRect {
|
|||
spacing: root.contentSpacing
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,3 @@ ColumnLayout {
|
|||
color: Colours.palette.m3outline
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,9 +88,7 @@ ColumnLayout {
|
|||
id: backgroundRect
|
||||
anchors.fill: parent
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.transparency.enabled
|
||||
? Colours.layer(Colours.palette.m3surfaceContainer, root.nested ? 3 : 2)
|
||||
: (root.nested ? Colours.palette.m3surfaceContainerHigh : Colours.palette.m3surfaceContainer)
|
||||
color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, root.nested ? 3 : 2) : (root.nested ? Colours.palette.m3surfaceContainerHigh : Colours.palette.m3surfaceContainer)
|
||||
opacity: root.showBackground && root.expanded ? 1.0 : 0.0
|
||||
visible: root.showBackground
|
||||
|
||||
|
|
@ -132,4 +130,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ StyledRect {
|
|||
required property real min
|
||||
required property real max
|
||||
property real step: 1
|
||||
property var onValueModified: function(value) {}
|
||||
property var onValueModified: function (value) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.large * 2
|
||||
|
|
@ -50,4 +50,3 @@ StyledRect {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ StyledRect {
|
|||
menu.z: 1
|
||||
|
||||
stateLayer.onClicked: {
|
||||
splitButton.expanded = !splitButton.expanded
|
||||
splitButton.expanded = !splitButton.expanded;
|
||||
}
|
||||
|
||||
menu.onItemSelected: (item) => {
|
||||
menu.onItemSelected: item => {
|
||||
root.selected(item);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Item {
|
|||
readonly property alias hasFocus: inputField.activeFocus
|
||||
|
||||
signal textEdited(string text)
|
||||
signal editingFinished()
|
||||
signal editingFinished
|
||||
|
||||
implicitHeight: inputField.implicitHeight + Appearance.padding.small * 2
|
||||
|
||||
|
|
@ -28,18 +28,18 @@ Item {
|
|||
id: container
|
||||
|
||||
anchors.fill: parent
|
||||
color: inputHover.containsMouse || inputField.activeFocus
|
||||
? Colours.layer(Colours.palette.m3surfaceContainer, 3)
|
||||
: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
color: inputHover.containsMouse || inputField.activeFocus ? Colours.layer(Colours.palette.m3surfaceContainer, 3) : Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
radius: Appearance.rounding.small
|
||||
border.width: 1
|
||||
border.color: inputField.activeFocus
|
||||
? Colours.palette.m3primary
|
||||
: Qt.alpha(Colours.palette.m3outline, 0.3)
|
||||
border.color: inputField.activeFocus ? Colours.palette.m3primary : Qt.alpha(Colours.palette.m3outline, 0.3)
|
||||
opacity: root.enabled ? 1 : 0.5
|
||||
|
||||
Behavior on color { CAnim {} }
|
||||
Behavior on border.color { CAnim {} }
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
Behavior on border.color {
|
||||
CAnim {}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: inputHover
|
||||
|
|
@ -77,4 +77,3 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ StyledRect {
|
|||
required property string label
|
||||
required property bool checked
|
||||
property bool enabled: true
|
||||
property var onToggled: function(checked) {}
|
||||
property var onToggled: function (checked) {}
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.large * 2
|
||||
|
|
@ -46,4 +46,3 @@ StyledRect {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,4 +122,3 @@ StyledRect {
|
|||
Layout.minimumHeight: 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,4 +26,3 @@ RowLayout {
|
|||
cLayer: 2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,18 +55,32 @@ Popup {
|
|||
}
|
||||
Connections {
|
||||
target: root.target
|
||||
function onXChanged() { if (root.tooltipVisible) root.updatePosition(); }
|
||||
function onYChanged() { if (root.tooltipVisible) root.updatePosition(); }
|
||||
function onWidthChanged() { if (root.tooltipVisible) root.updatePosition(); }
|
||||
function onHeightChanged() { if (root.tooltipVisible) root.updatePosition(); }
|
||||
function onXChanged() {
|
||||
if (root.tooltipVisible)
|
||||
root.updatePosition();
|
||||
}
|
||||
function onYChanged() {
|
||||
if (root.tooltipVisible)
|
||||
root.updatePosition();
|
||||
}
|
||||
function onWidthChanged() {
|
||||
if (root.tooltipVisible)
|
||||
root.updatePosition();
|
||||
}
|
||||
function onHeightChanged() {
|
||||
if (root.tooltipVisible)
|
||||
root.updatePosition();
|
||||
}
|
||||
}
|
||||
|
||||
function updatePosition() {
|
||||
if (!target || !parent) return;
|
||||
if (!target || !parent)
|
||||
return;
|
||||
|
||||
// Wait for tooltipRect to have its size calculated
|
||||
Qt.callLater(() => {
|
||||
if (!target || !parent || !tooltipRect) return;
|
||||
if (!target || !parent || !tooltipRect)
|
||||
return;
|
||||
|
||||
// Get target position in parent's coordinate system
|
||||
const targetPos = target.mapToItem(parent, 0, 0);
|
||||
|
|
@ -169,4 +183,3 @@ Popup {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,9 +101,15 @@ Singleton {
|
|||
|
||||
function serializeAppearance(): var {
|
||||
return {
|
||||
rounding: { scale: appearance.rounding.scale },
|
||||
spacing: { scale: appearance.spacing.scale },
|
||||
padding: { scale: appearance.padding.scale },
|
||||
rounding: {
|
||||
scale: appearance.rounding.scale
|
||||
},
|
||||
spacing: {
|
||||
scale: appearance.spacing.scale
|
||||
},
|
||||
padding: {
|
||||
scale: appearance.padding.scale
|
||||
},
|
||||
font: {
|
||||
family: {
|
||||
sans: appearance.font.family.sans,
|
||||
|
|
@ -111,10 +117,14 @@ Singleton {
|
|||
material: appearance.font.family.material,
|
||||
clock: appearance.font.family.clock
|
||||
},
|
||||
size: { scale: appearance.font.size.scale }
|
||||
size: {
|
||||
scale: appearance.font.size.scale
|
||||
}
|
||||
},
|
||||
anim: {
|
||||
durations: { scale: appearance.anim.durations.scale }
|
||||
durations: {
|
||||
scale: appearance.anim.durations.scale
|
||||
}
|
||||
},
|
||||
transparency: {
|
||||
enabled: appearance.transparency.enabled,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ Loader {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Loader {
|
||||
id: clockLoader
|
||||
active: Config.background.desktopClock.enabled
|
||||
|
|
@ -77,7 +76,8 @@ Loader {
|
|||
AnchorChanges {
|
||||
target: clockLoader
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right }
|
||||
anchors.right: parent.right
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "middle-left"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,3 @@ Item {
|
|||
font.pointSize: Appearance.font.size.normal
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,3 @@ Item {
|
|||
font.pointSize: Appearance.font.size.normal
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ StyledRect {
|
|||
// Network icon
|
||||
WrappedLoader {
|
||||
name: "network"
|
||||
active: Config.bar.status.showNetwork && (! Nmcli.activeEthernet || Config.bar.status.showWifi)
|
||||
active: Config.bar.status.showNetwork && (!Nmcli.activeEthernet || Config.bar.status.showWifi)
|
||||
|
||||
sourceComponent: MaterialIcon {
|
||||
animate: true
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ Item {
|
|||
property list<var> pills: []
|
||||
|
||||
onOccupiedChanged: {
|
||||
if (!occupied) return;
|
||||
if (!occupied)
|
||||
return;
|
||||
let count = 0;
|
||||
const start = groupOffset;
|
||||
const end = start + Config.bar.workspaces.shown;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Popout {
|
||||
name: "lockstatus"
|
||||
sourceComponent: LockStatus {}
|
||||
|
|
|
|||
|
|
@ -603,4 +603,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,13 @@ ColumnLayout {
|
|||
spacing: Appearance.spacing.small
|
||||
width: Config.bar.sizes.kbLayoutWidth
|
||||
|
||||
KbLayoutModel { id: kb }
|
||||
KbLayoutModel {
|
||||
id: kb
|
||||
}
|
||||
|
||||
function refresh() { kb.refresh() }
|
||||
function refresh() {
|
||||
kb.refresh();
|
||||
}
|
||||
Component.onCompleted: kb.start()
|
||||
|
||||
StyledText {
|
||||
|
|
@ -46,12 +50,39 @@ ColumnLayout {
|
|||
spacing: Appearance.spacing.small
|
||||
|
||||
add: Transition {
|
||||
NumberAnimation { properties: "opacity"; from: 0; to: 1; duration: 140 }
|
||||
NumberAnimation { properties: "y"; duration: 180; easing.type: Easing.OutCubic }
|
||||
NumberAnimation {
|
||||
properties: "opacity"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: 140
|
||||
}
|
||||
NumberAnimation {
|
||||
properties: "y"
|
||||
duration: 180
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
remove: Transition {
|
||||
NumberAnimation {
|
||||
properties: "opacity"
|
||||
to: 0
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
move: Transition {
|
||||
NumberAnimation {
|
||||
properties: "y"
|
||||
duration: 180
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
displaced: Transition {
|
||||
NumberAnimation {
|
||||
properties: "y"
|
||||
duration: 180
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
remove: Transition { NumberAnimation { properties: "opacity"; to: 0; duration: 100 } }
|
||||
move: Transition { NumberAnimation { properties: "y"; duration: 180; easing.type: Easing.OutCubic } }
|
||||
displaced: Transition { NumberAnimation { properties: "y"; duration: 180; easing.type: Easing.OutCubic } }
|
||||
|
||||
delegate: Item {
|
||||
required property int layoutIndex
|
||||
|
|
@ -145,13 +176,35 @@ ColumnLayout {
|
|||
running: false
|
||||
|
||||
ParallelAnimation {
|
||||
NumberAnimation { target: activeRow; property: "opacity"; to: 0.0; duration: 70 }
|
||||
NumberAnimation { target: activeRow; property: "scale"; to: 0.92; duration: 70 }
|
||||
NumberAnimation {
|
||||
target: activeRow
|
||||
property: "opacity"
|
||||
to: 0.0
|
||||
duration: 70
|
||||
}
|
||||
NumberAnimation {
|
||||
target: activeRow
|
||||
property: "scale"
|
||||
to: 0.92
|
||||
duration: 70
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
NumberAnimation { target: activeRow; property: "opacity"; to: 1.0; duration: 160; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { target: activeRow; property: "scale"; to: 1.0; duration: 220; easing.type: Easing.OutBack }
|
||||
NumberAnimation {
|
||||
target: activeRow
|
||||
property: "opacity"
|
||||
to: 1.0
|
||||
duration: 160
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
NumberAnimation {
|
||||
target: activeRow
|
||||
property: "scale"
|
||||
to: 1.0
|
||||
duration: 220
|
||||
easing.type: Easing.OutBack
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ Item {
|
|||
id: model
|
||||
visible: false
|
||||
|
||||
ListModel { id: _visibleModel }
|
||||
ListModel {
|
||||
id: _visibleModel
|
||||
}
|
||||
property alias visibleModel: _visibleModel
|
||||
|
||||
property string activeLabel: ""
|
||||
|
|
@ -33,7 +35,9 @@ Item {
|
|||
_switchProc.running = true;
|
||||
}
|
||||
|
||||
ListModel { id: _layoutsModel }
|
||||
ListModel {
|
||||
id: _layoutsModel
|
||||
}
|
||||
|
||||
property var _xkbMap: ({})
|
||||
property bool _notifiedLimit: false
|
||||
|
|
@ -41,14 +45,19 @@ Item {
|
|||
Process {
|
||||
id: _xkbXmlBase
|
||||
command: ["xmllint", "--xpath", "//layout/configItem[name and description]", "/usr/share/X11/xkb/rules/base.xml"]
|
||||
stdout: StdioCollector { onStreamFinished: _buildXmlMap(text) }
|
||||
onRunningChanged: if (!running && (typeof exitCode !== "undefined") && exitCode !== 0) _xkbXmlEvdev.running = true
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: _buildXmlMap(text)
|
||||
}
|
||||
onRunningChanged: if (!running && (typeof exitCode !== "undefined") && exitCode !== 0)
|
||||
_xkbXmlEvdev.running = true
|
||||
}
|
||||
|
||||
Process {
|
||||
id: _xkbXmlEvdev
|
||||
command: ["xmllint", "--xpath", "//layout/configItem[name and description]", "/usr/share/X11/xkb/rules/evdev.xml"]
|
||||
stdout: StdioCollector { onStreamFinished: _buildXmlMap(text) }
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: _buildXmlMap(text)
|
||||
}
|
||||
}
|
||||
|
||||
function _buildXmlMap(xml) {
|
||||
|
|
@ -60,7 +69,8 @@ Item {
|
|||
while ((m = re.exec(xml)) !== null) {
|
||||
const code = (m[1] || "").trim();
|
||||
const desc = (m[2] || "").trim();
|
||||
if (!code || !desc) continue;
|
||||
if (!code || !desc)
|
||||
continue;
|
||||
map[code] = _short(desc);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +83,11 @@ Item {
|
|||
const tmp = [];
|
||||
for (let i = 0; i < _layoutsModel.count; i++) {
|
||||
const it = _layoutsModel.get(i);
|
||||
tmp.push({ layoutIndex: it.layoutIndex, token: it.token, label: _pretty(it.token) });
|
||||
tmp.push({
|
||||
layoutIndex: it.layoutIndex,
|
||||
token: it.token,
|
||||
label: _pretty(it.token)
|
||||
});
|
||||
}
|
||||
_layoutsModel.clear();
|
||||
tmp.forEach(t => _layoutsModel.append(t));
|
||||
|
|
@ -83,7 +97,8 @@ Item {
|
|||
|
||||
function _short(desc) {
|
||||
const m = desc.match(/^(.*)\((.*)\)$/);
|
||||
if (!m) return desc;
|
||||
if (!m)
|
||||
return desc;
|
||||
const lang = m[1].trim();
|
||||
const region = m[2].trim();
|
||||
const code = (region.split(/[,\s-]/)[0] || region).slice(0, 2).toUpperCase();
|
||||
|
|
@ -118,7 +133,8 @@ Item {
|
|||
const dev = JSON.parse(text);
|
||||
const kb = dev?.keyboards?.find(k => k.main) || dev?.keyboards?.[0];
|
||||
const raw = (kb?.layout || "").trim();
|
||||
if (raw.length) _setLayouts(raw);
|
||||
if (raw.length)
|
||||
_setLayouts(raw);
|
||||
} catch (e) {}
|
||||
_fetchActiveLayouts.running = true;
|
||||
}
|
||||
|
|
@ -136,10 +152,7 @@ Item {
|
|||
const idx = kb?.active_layout_index ?? -1;
|
||||
|
||||
activeIndex = idx >= 0 ? idx : -1;
|
||||
activeLabel =
|
||||
(idx >= 0 && idx < _layoutsModel.count)
|
||||
? _layoutsModel.get(idx).label
|
||||
: "";
|
||||
activeLabel = (idx >= 0 && idx < _layoutsModel.count) ? _layoutsModel.get(idx).label : "";
|
||||
} catch (e) {
|
||||
activeIndex = -1;
|
||||
activeLabel = "";
|
||||
|
|
@ -152,7 +165,8 @@ Item {
|
|||
|
||||
Process {
|
||||
id: _switchProc
|
||||
onRunningChanged: if (!running) _fetchActiveLayouts.running = true
|
||||
onRunningChanged: if (!running)
|
||||
_fetchActiveLayouts.running = true
|
||||
}
|
||||
|
||||
function _setLayouts(raw) {
|
||||
|
|
@ -163,9 +177,14 @@ Item {
|
|||
let idx = 0;
|
||||
|
||||
for (const p of parts) {
|
||||
if (seen.has(p)) continue;
|
||||
if (seen.has(p))
|
||||
continue;
|
||||
seen.add(p);
|
||||
_layoutsModel.append({ layoutIndex: idx, token: p, label: _pretty(p) });
|
||||
_layoutsModel.append({
|
||||
layoutIndex: idx,
|
||||
token: p,
|
||||
label: _pretty(p)
|
||||
});
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
|
@ -184,17 +203,14 @@ Item {
|
|||
return;
|
||||
|
||||
if (_layoutsModel.count > 4) {
|
||||
Toaster.toast(
|
||||
qsTr("Keyboard layout limit"),
|
||||
qsTr("XKB supports only 4 layouts at a time"),
|
||||
"warning"
|
||||
);
|
||||
Toaster.toast(qsTr("Keyboard layout limit"), qsTr("XKB supports only 4 layouts at a time"), "warning");
|
||||
}
|
||||
}
|
||||
|
||||
function _pretty(token) {
|
||||
const code = token.replace(/\(.*\)$/, "").trim();
|
||||
if (_xkbMap[code]) return code.toUpperCase() + " - " + _xkbMap[code];
|
||||
if (_xkbMap[code])
|
||||
return code.toUpperCase() + " - " + _xkbMap[code];
|
||||
return code.toUpperCase() + " - " + code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,4 +84,3 @@ QtObject {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ ClippingRectangle {
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
z: -1
|
||||
onPressed: function(mouse) {
|
||||
onPressed: function (mouse) {
|
||||
root.focus = true;
|
||||
mouse.accepted = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,5 +18,6 @@ QtObject {
|
|||
readonly property VpnState vpn: VpnState {}
|
||||
|
||||
onActiveChanged: activeIndex = Math.max(0, panes.indexOf(active))
|
||||
onActiveIndexChanged: if (panes[activeIndex]) active = panes[activeIndex]
|
||||
onActiveIndexChanged: if (panes[activeIndex])
|
||||
active = panes[activeIndex]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,15 +73,15 @@ Item {
|
|||
|
||||
Config.background.desktopClock.enabled = root.desktopClockEnabled;
|
||||
Config.background.enabled = root.backgroundEnabled;
|
||||
Config.background.desktopClock.scale = root.desktopClockScale
|
||||
Config.background.desktopClock.position = root.desktopClockPosition
|
||||
Config.background.desktopClock.shadow.enabled = root.desktopClockShadowEnabled
|
||||
Config.background.desktopClock.shadow.opacity = root.desktopClockShadowOpacity
|
||||
Config.background.desktopClock.shadow.blur = root.desktopClockShadowBlur
|
||||
Config.background.desktopClock.background.enabled = root.desktopClockBackgroundEnabled
|
||||
Config.background.desktopClock.background.opacity = root.desktopClockBackgroundOpacity
|
||||
Config.background.desktopClock.background.blur = root.desktopClockBackgroundBlur
|
||||
Config.background.desktopClock.invertColors = root.desktopClockInvertColors
|
||||
Config.background.desktopClock.scale = root.desktopClockScale;
|
||||
Config.background.desktopClock.position = root.desktopClockPosition;
|
||||
Config.background.desktopClock.shadow.enabled = root.desktopClockShadowEnabled;
|
||||
Config.background.desktopClock.shadow.opacity = root.desktopClockShadowOpacity;
|
||||
Config.background.desktopClock.shadow.blur = root.desktopClockShadowBlur;
|
||||
Config.background.desktopClock.background.enabled = root.desktopClockBackgroundEnabled;
|
||||
Config.background.desktopClock.background.opacity = root.desktopClockBackgroundOpacity;
|
||||
Config.background.desktopClock.background.blur = root.desktopClockBackgroundBlur;
|
||||
Config.background.desktopClock.invertColors = root.desktopClockInvertColors;
|
||||
|
||||
Config.background.visualiser.enabled = root.visualiserEnabled;
|
||||
Config.background.visualiser.autoHide = root.visualiserAutoHide;
|
||||
|
|
@ -155,7 +155,6 @@ Item {
|
|||
flickableDirection: Flickable.VerticalFlick
|
||||
contentHeight: sidebarLayout.height
|
||||
|
||||
|
||||
StyledScrollBar.vertical: StyledScrollBar {
|
||||
flickable: sidebarFlickable
|
||||
}
|
||||
|
|
@ -168,93 +167,84 @@ Item {
|
|||
|
||||
readonly property var rootPane: sidebarFlickable.rootPane
|
||||
|
||||
readonly property bool allSectionsExpanded:
|
||||
themeModeSection.expanded &&
|
||||
colorVariantSection.expanded &&
|
||||
colorSchemeSection.expanded &&
|
||||
animationsSection.expanded &&
|
||||
fontsSection.expanded &&
|
||||
scalesSection.expanded &&
|
||||
transparencySection.expanded &&
|
||||
borderSection.expanded &&
|
||||
backgroundSection.expanded
|
||||
readonly property bool allSectionsExpanded: themeModeSection.expanded && colorVariantSection.expanded && colorSchemeSection.expanded && animationsSection.expanded && fontsSection.expanded && scalesSection.expanded && transparencySection.expanded && borderSection.expanded && backgroundSection.expanded
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.smaller
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.smaller
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Appearance")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.weight: 500
|
||||
}
|
||||
StyledText {
|
||||
text: qsTr("Appearance")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
IconButton {
|
||||
icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
|
||||
type: IconButton.Text
|
||||
label.animate: true
|
||||
onClicked: {
|
||||
const shouldExpand = !sidebarLayout.allSectionsExpanded;
|
||||
themeModeSection.expanded = shouldExpand;
|
||||
colorVariantSection.expanded = shouldExpand;
|
||||
colorSchemeSection.expanded = shouldExpand;
|
||||
animationsSection.expanded = shouldExpand;
|
||||
fontsSection.expanded = shouldExpand;
|
||||
scalesSection.expanded = shouldExpand;
|
||||
transparencySection.expanded = shouldExpand;
|
||||
borderSection.expanded = shouldExpand;
|
||||
backgroundSection.expanded = shouldExpand;
|
||||
IconButton {
|
||||
icon: sidebarLayout.allSectionsExpanded ? "unfold_less" : "unfold_more"
|
||||
type: IconButton.Text
|
||||
label.animate: true
|
||||
onClicked: {
|
||||
const shouldExpand = !sidebarLayout.allSectionsExpanded;
|
||||
themeModeSection.expanded = shouldExpand;
|
||||
colorVariantSection.expanded = shouldExpand;
|
||||
colorSchemeSection.expanded = shouldExpand;
|
||||
animationsSection.expanded = shouldExpand;
|
||||
fontsSection.expanded = shouldExpand;
|
||||
scalesSection.expanded = shouldExpand;
|
||||
transparencySection.expanded = shouldExpand;
|
||||
borderSection.expanded = shouldExpand;
|
||||
backgroundSection.expanded = shouldExpand;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ThemeModeSection {
|
||||
id: themeModeSection
|
||||
}
|
||||
ThemeModeSection {
|
||||
id: themeModeSection
|
||||
}
|
||||
|
||||
ColorVariantSection {
|
||||
id: colorVariantSection
|
||||
}
|
||||
ColorVariantSection {
|
||||
id: colorVariantSection
|
||||
}
|
||||
|
||||
ColorSchemeSection {
|
||||
id: colorSchemeSection
|
||||
}
|
||||
ColorSchemeSection {
|
||||
id: colorSchemeSection
|
||||
}
|
||||
|
||||
AnimationsSection {
|
||||
id: animationsSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
AnimationsSection {
|
||||
id: animationsSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
|
||||
FontsSection {
|
||||
id: fontsSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
FontsSection {
|
||||
id: fontsSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
|
||||
ScalesSection {
|
||||
id: scalesSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
ScalesSection {
|
||||
id: scalesSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
|
||||
TransparencySection {
|
||||
id: transparencySection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
TransparencySection {
|
||||
id: transparencySection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
|
||||
BorderSection {
|
||||
id: borderSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
BorderSection {
|
||||
id: borderSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
|
||||
BackgroundSection {
|
||||
id: backgroundSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
BackgroundSection {
|
||||
id: backgroundSection
|
||||
rootPane: sidebarFlickable.rootPane
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rightContent: appearanceRightContentComponent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,15 @@ CollapsibleSection {
|
|||
to: 5.0
|
||||
decimals: 1
|
||||
suffix: "×"
|
||||
validator: DoubleValidator { bottom: 0.1; top: 5.0 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.1
|
||||
top: 5.0
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.animDurationsScale = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,14 +69,27 @@ CollapsibleSection {
|
|||
enabled: rootPane.desktopClockEnabled
|
||||
|
||||
menuItems: [
|
||||
MenuItem { text: qsTr("Top"); icon: "vertical_align_top"; property string val: "top" },
|
||||
MenuItem { text: qsTr("Middle"); icon: "vertical_align_center"; property string val: "middle" },
|
||||
MenuItem { text: qsTr("Bottom"); icon: "vertical_align_bottom"; property string val: "bottom" }
|
||||
MenuItem {
|
||||
text: qsTr("Top")
|
||||
icon: "vertical_align_top"
|
||||
property string val: "top"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Middle")
|
||||
icon: "vertical_align_center"
|
||||
property string val: "middle"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Bottom")
|
||||
icon: "vertical_align_bottom"
|
||||
property string val: "bottom"
|
||||
}
|
||||
]
|
||||
|
||||
Component.onCompleted: {
|
||||
for(let i=0; i < menuItems.length; i++) {
|
||||
if(menuItems[i].val === posContainer.currentV) active = menuItems[i];
|
||||
for (let i = 0; i < menuItems.length; i++) {
|
||||
if (menuItems[i].val === posContainer.currentV)
|
||||
active = menuItems[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -90,14 +103,27 @@ CollapsibleSection {
|
|||
expandedZ: 99
|
||||
|
||||
menuItems: [
|
||||
MenuItem { text: qsTr("Left"); icon: "align_horizontal_left"; property string val: "left" },
|
||||
MenuItem { text: qsTr("Center"); icon: "align_horizontal_center"; property string val: "center" },
|
||||
MenuItem { text: qsTr("Right"); icon: "align_horizontal_right"; property string val: "right" }
|
||||
MenuItem {
|
||||
text: qsTr("Left")
|
||||
icon: "align_horizontal_left"
|
||||
property string val: "left"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Center")
|
||||
icon: "align_horizontal_center"
|
||||
property string val: "center"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Right")
|
||||
icon: "align_horizontal_right"
|
||||
property string val: "right"
|
||||
}
|
||||
]
|
||||
|
||||
Component.onCompleted: {
|
||||
for(let i=0; i < menuItems.length; i++) {
|
||||
if(menuItems[i].val === posContainer.currentH) active = menuItems[i];
|
||||
for (let i = 0; i < menuItems.length; i++) {
|
||||
if (menuItems[i].val === posContainer.currentH)
|
||||
active = menuItems[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -143,11 +169,14 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "%"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.desktopClockShadowOpacity = newValue / 100;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -165,11 +194,14 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "%"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.desktopClockShadowBlur = newValue / 100;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -215,11 +247,14 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "%"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.desktopClockBackgroundOpacity = newValue / 100;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -227,7 +262,6 @@ CollapsibleSection {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
text: qsTr("Visualiser")
|
||||
|
|
@ -264,11 +298,14 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 10
|
||||
stepSize: 1
|
||||
validator: IntValidator { bottom: 0; top: 10 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 10
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.visualiserRounding = Math.round(newValue);
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -285,13 +322,15 @@ CollapsibleSection {
|
|||
value: rootPane.visualiserSpacing
|
||||
from: 0
|
||||
to: 2
|
||||
validator: DoubleValidator { bottom: 0; top: 2 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0
|
||||
top: 2
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.visualiserSpacing = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,12 @@ CollapsibleSection {
|
|||
to: 100
|
||||
decimals: 1
|
||||
suffix: "px"
|
||||
validator: DoubleValidator { bottom: 0.1; top: 100 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.1
|
||||
top: 100
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.borderRounding = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -51,13 +54,15 @@ CollapsibleSection {
|
|||
to: 100
|
||||
decimals: 1
|
||||
suffix: "px"
|
||||
validator: DoubleValidator { bottom: 0.1; top: 100 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.1
|
||||
top: 100
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.borderThickness = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,4 +143,3 @@ CollapsibleSection {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,4 +89,3 @@ CollapsibleSection {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -268,13 +268,15 @@ CollapsibleSection {
|
|||
to: 1.5
|
||||
decimals: 2
|
||||
suffix: "×"
|
||||
validator: DoubleValidator { bottom: 0.7; top: 1.5 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.7
|
||||
top: 1.5
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.fontSizeScale = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,12 @@ CollapsibleSection {
|
|||
to: 2.0
|
||||
decimals: 1
|
||||
suffix: "×"
|
||||
validator: DoubleValidator { bottom: 0.5; top: 2.0 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.5
|
||||
top: 2.0
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.paddingScale = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -51,9 +54,12 @@ CollapsibleSection {
|
|||
to: 5.0
|
||||
decimals: 1
|
||||
suffix: "×"
|
||||
validator: DoubleValidator { bottom: 0.1; top: 5.0 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.1
|
||||
top: 5.0
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.roundingScale = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -72,13 +78,15 @@ CollapsibleSection {
|
|||
to: 2.0
|
||||
decimals: 1
|
||||
suffix: "×"
|
||||
validator: DoubleValidator { bottom: 0.1; top: 2.0 }
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.1
|
||||
top: 2.0
|
||||
}
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.spacingScale = newValue;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ CollapsibleSection {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,14 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "%"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.transparencyBase = newValue / 100;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
|
|
@ -60,15 +63,17 @@ CollapsibleSection {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "%"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
rootPane.transparencyLayers = newValue / 100;
|
||||
rootPane.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -19,7 +19,7 @@ SplitPaneWithDetails {
|
|||
anchors.fill: parent
|
||||
|
||||
activeItem: session.bt.active
|
||||
paneIdGenerator: function(item) {
|
||||
paneIdGenerator: function (item) {
|
||||
return item ? (item.address || "") : "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,4 +68,3 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,4 +82,3 @@ ColumnLayout {
|
|||
clip: false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,4 +69,3 @@ SequentialAnimation {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,4 +35,3 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ ColumnLayout {
|
|||
text = root.formatValue(root.value);
|
||||
}
|
||||
|
||||
onTextEdited: (text) => {
|
||||
onTextEdited: text => {
|
||||
if (hasFocus) {
|
||||
const val = root.parseValue(text);
|
||||
if (!isNaN(val)) {
|
||||
|
|
@ -178,4 +178,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,4 +107,3 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ Item {
|
|||
required property Component rightSettingsComponent
|
||||
|
||||
property var activeItem: null
|
||||
property var paneIdGenerator: function(item) { return item ? String(item) : ""; }
|
||||
property var paneIdGenerator: function (item) {
|
||||
return item ? String(item) : "";
|
||||
}
|
||||
|
||||
property Component overlayComponent: null
|
||||
|
||||
|
|
@ -29,54 +31,54 @@ Item {
|
|||
leftContent: root.leftContent
|
||||
|
||||
rightContent: Component {
|
||||
Item {
|
||||
id: rightPaneItem
|
||||
Item {
|
||||
id: rightPaneItem
|
||||
|
||||
property var pane: root.activeItem
|
||||
property string paneId: root.paneIdGenerator(pane)
|
||||
property Component targetComponent: root.rightSettingsComponent
|
||||
property Component nextComponent: root.rightSettingsComponent
|
||||
property var pane: root.activeItem
|
||||
property string paneId: root.paneIdGenerator(pane)
|
||||
property Component targetComponent: root.rightSettingsComponent
|
||||
property Component nextComponent: root.rightSettingsComponent
|
||||
|
||||
function getComponentForPane() {
|
||||
return pane ? root.rightDetailsComponent : root.rightSettingsComponent;
|
||||
}
|
||||
function getComponentForPane() {
|
||||
return pane ? root.rightDetailsComponent : root.rightSettingsComponent;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
targetComponent = getComponentForPane();
|
||||
nextComponent = targetComponent;
|
||||
}
|
||||
Component.onCompleted: {
|
||||
targetComponent = getComponentForPane();
|
||||
nextComponent = targetComponent;
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: rightLoader
|
||||
Loader {
|
||||
id: rightLoader
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.fill: parent
|
||||
|
||||
opacity: 1
|
||||
scale: 1
|
||||
transformOrigin: Item.Center
|
||||
opacity: 1
|
||||
scale: 1
|
||||
transformOrigin: Item.Center
|
||||
|
||||
clip: false
|
||||
sourceComponent: rightPaneItem.targetComponent
|
||||
}
|
||||
clip: false
|
||||
sourceComponent: rightPaneItem.targetComponent
|
||||
}
|
||||
|
||||
Behavior on paneId {
|
||||
PaneTransition {
|
||||
target: rightLoader
|
||||
propertyActions: [
|
||||
PropertyAction {
|
||||
target: rightPaneItem
|
||||
property: "targetComponent"
|
||||
value: rightPaneItem.nextComponent
|
||||
}
|
||||
]
|
||||
Behavior on paneId {
|
||||
PaneTransition {
|
||||
target: rightLoader
|
||||
propertyActions: [
|
||||
PropertyAction {
|
||||
target: rightPaneItem
|
||||
property: "targetComponent"
|
||||
value: rightPaneItem.nextComponent
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
onPaneChanged: {
|
||||
nextComponent = getComponentForPane();
|
||||
paneId = root.paneIdGenerator(pane);
|
||||
}
|
||||
}
|
||||
|
||||
onPaneChanged: {
|
||||
nextComponent = getComponentForPane();
|
||||
paneId = root.paneIdGenerator(pane);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -89,4 +91,3 @@ Item {
|
|||
active: root.overlayComponent !== null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,189 +40,117 @@ GridView {
|
|||
readonly property real itemMargin: Appearance.spacing.normal / 2
|
||||
readonly property real itemRadius: Appearance.rounding.normal
|
||||
|
||||
StateLayer {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
radius: itemRadius
|
||||
StateLayer {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
radius: itemRadius
|
||||
|
||||
function onClicked(): void {
|
||||
Wallpapers.setWallpaper(modelData.path);
|
||||
}
|
||||
function onClicked(): void {
|
||||
Wallpapers.setWallpaper(modelData.path);
|
||||
}
|
||||
}
|
||||
|
||||
StyledClippingRect {
|
||||
id: image
|
||||
StyledClippingRect {
|
||||
id: image
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
radius: itemRadius
|
||||
antialiasing: true
|
||||
layer.enabled: true
|
||||
layer.smooth: true
|
||||
|
||||
CachingImage {
|
||||
id: cachingImage
|
||||
|
||||
path: modelData.path
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
color: Colours.tPalette.m3surfaceContainer
|
||||
radius: itemRadius
|
||||
antialiasing: true
|
||||
layer.enabled: true
|
||||
layer.smooth: true
|
||||
|
||||
CachingImage {
|
||||
id: cachingImage
|
||||
|
||||
path: modelData.path
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
cache: true
|
||||
visible: opacity > 0
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
sourceSize: Qt.size(width, height)
|
||||
|
||||
opacity: status === Image.Ready ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback if CachingImage fails to load
|
||||
Image {
|
||||
id: fallbackImage
|
||||
|
||||
anchors.fill: parent
|
||||
source: fallbackTimer.triggered && cachingImage.status !== Image.Ready ? modelData.path : ""
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
cache: true
|
||||
visible: opacity > 0
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
sourceSize: Qt.size(width, height)
|
||||
|
||||
opacity: status === Image.Ready && cachingImage.status !== Image.Ready ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: fallbackTimer
|
||||
|
||||
property bool triggered: false
|
||||
interval: 800
|
||||
running: cachingImage.status === Image.Loading || cachingImage.status === Image.Null
|
||||
onTriggered: triggered = true
|
||||
}
|
||||
|
||||
// Gradient overlay for filename
|
||||
Rectangle {
|
||||
id: filenameOverlay
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
implicitHeight: filenameText.implicitHeight + Appearance.padding.normal * 1.5
|
||||
radius: 0
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.0
|
||||
color: Qt.rgba(Colours.palette.m3surface.r,
|
||||
Colours.palette.m3surface.g,
|
||||
Colours.palette.m3surface.b, 0)
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.3
|
||||
color: Qt.rgba(Colours.palette.m3surface.r,
|
||||
Colours.palette.m3surface.g,
|
||||
Colours.palette.m3surface.b, 0.7)
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.6
|
||||
color: Qt.rgba(Colours.palette.m3surface.r,
|
||||
Colours.palette.m3surface.g,
|
||||
Colours.palette.m3surface.b, 0.9)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.0
|
||||
color: Qt.rgba(Colours.palette.m3surface.r,
|
||||
Colours.palette.m3surface.g,
|
||||
Colours.palette.m3surface.b, 0.95)
|
||||
}
|
||||
}
|
||||
|
||||
opacity: 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
opacity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
color: "transparent"
|
||||
radius: itemRadius + border.width
|
||||
border.width: isCurrent ? 2 : 0
|
||||
border.color: Colours.palette.m3primary
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
cache: true
|
||||
visible: opacity > 0
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
sourceSize: Qt.size(width, height)
|
||||
|
||||
Behavior on border.width {
|
||||
opacity: status === Image.Ready ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
duration: 1000
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Appearance.padding.small
|
||||
// Fallback if CachingImage fails to load
|
||||
Image {
|
||||
id: fallbackImage
|
||||
|
||||
visible: isCurrent
|
||||
text: "check_circle"
|
||||
color: Colours.palette.m3primary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
anchors.fill: parent
|
||||
source: fallbackTimer.triggered && cachingImage.status !== Image.Ready ? modelData.path : ""
|
||||
asynchronous: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
cache: true
|
||||
visible: opacity > 0
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
sourceSize: Qt.size(width, height)
|
||||
|
||||
opacity: status === Image.Ready && cachingImage.status !== Image.Ready ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: filenameText
|
||||
Timer {
|
||||
id: fallbackTimer
|
||||
|
||||
property bool triggered: false
|
||||
interval: 800
|
||||
running: cachingImage.status === Image.Loading || cachingImage.status === Image.Null
|
||||
onTriggered: triggered = true
|
||||
}
|
||||
|
||||
// Gradient overlay for filename
|
||||
Rectangle {
|
||||
id: filenameOverlay
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
|
||||
anchors.rightMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
|
||||
anchors.bottomMargin: Appearance.padding.normal
|
||||
|
||||
text: modelData.name
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.weight: 500
|
||||
color: isCurrent ? Colours.palette.m3primary : Colours.palette.m3onSurface
|
||||
elide: Text.ElideMiddle
|
||||
maximumLineCount: 1
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
implicitHeight: filenameText.implicitHeight + Appearance.padding.normal * 1.5
|
||||
radius: 0
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.0
|
||||
color: Qt.rgba(Colours.palette.m3surface.r, Colours.palette.m3surface.g, Colours.palette.m3surface.b, 0)
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.3
|
||||
color: Qt.rgba(Colours.palette.m3surface.r, Colours.palette.m3surface.g, Colours.palette.m3surface.b, 0.7)
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.6
|
||||
color: Qt.rgba(Colours.palette.m3surface.r, Colours.palette.m3surface.g, Colours.palette.m3surface.b, 0.9)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.0
|
||||
color: Qt.rgba(Colours.palette.m3surface.r, Colours.palette.m3surface.g, Colours.palette.m3surface.b, 0.95)
|
||||
}
|
||||
}
|
||||
|
||||
opacity: 0
|
||||
|
||||
|
|
@ -238,4 +166,68 @@ GridView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: itemMargin
|
||||
anchors.rightMargin: itemMargin
|
||||
anchors.topMargin: itemMargin
|
||||
anchors.bottomMargin: itemMargin
|
||||
color: "transparent"
|
||||
radius: itemRadius + border.width
|
||||
border.width: isCurrent ? 2 : 0
|
||||
border.color: Colours.palette.m3primary
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
|
||||
Behavior on border.width {
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Appearance.padding.small
|
||||
|
||||
visible: isCurrent
|
||||
text: "check_circle"
|
||||
color: Colours.palette.m3primary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: filenameText
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
|
||||
anchors.rightMargin: Appearance.padding.normal + Appearance.spacing.normal / 2
|
||||
anchors.bottomMargin: Appearance.padding.normal
|
||||
|
||||
text: modelData.name
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.weight: 500
|
||||
color: isCurrent ? Colours.palette.m3primary : Colours.palette.m3onSurface
|
||||
elide: Text.ElideMiddle
|
||||
maximumLineCount: 1
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
opacity: 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
opacity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ Item {
|
|||
Config.save();
|
||||
}
|
||||
|
||||
|
||||
AppDb {
|
||||
id: allAppsDb
|
||||
|
||||
|
|
@ -118,9 +117,7 @@ Item {
|
|||
scoreFn: r => r[0].score
|
||||
});
|
||||
|
||||
return results
|
||||
.sort((a, b) => b._score - a._score)
|
||||
.map(r => r.obj._item);
|
||||
return results.sort((a, b) => b._score - a._score).map(r => r.obj._item);
|
||||
}
|
||||
|
||||
property list<var> filteredApps: []
|
||||
|
|
@ -156,214 +153,214 @@ Item {
|
|||
spacing: Appearance.spacing.small
|
||||
|
||||
RowLayout {
|
||||
spacing: Appearance.spacing.smaller
|
||||
spacing: Appearance.spacing.smaller
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Launcher")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
toggled: !root.session.launcher.active
|
||||
icon: "settings"
|
||||
accent: "Primary"
|
||||
iconSize: Appearance.font.size.normal
|
||||
horizontalPadding: Appearance.padding.normal
|
||||
verticalPadding: Appearance.padding.smaller
|
||||
tooltip: qsTr("Launcher settings")
|
||||
|
||||
onClicked: {
|
||||
if (root.session.launcher.active) {
|
||||
root.session.launcher.active = null;
|
||||
} else {
|
||||
if (root.filteredApps.length > 0) {
|
||||
root.session.launcher.active = root.filteredApps[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: qsTr("Launcher")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
text: qsTr("Applications (%1)").arg(root.searchText ? root.filteredApps.length : allAppsDb.apps.length)
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
StyledText {
|
||||
text: qsTr("All applications available in the launcher")
|
||||
color: Colours.palette.m3outline
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
toggled: !root.session.launcher.active
|
||||
icon: "settings"
|
||||
accent: "Primary"
|
||||
iconSize: Appearance.font.size.normal
|
||||
horizontalPadding: Appearance.padding.normal
|
||||
verticalPadding: Appearance.padding.smaller
|
||||
tooltip: qsTr("Launcher settings")
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.bottomMargin: Appearance.spacing.small
|
||||
|
||||
onClicked: {
|
||||
if (root.session.launcher.active) {
|
||||
root.session.launcher.active = null;
|
||||
} else {
|
||||
if (root.filteredApps.length > 0) {
|
||||
root.session.launcher.active = root.filteredApps[0];
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
implicitHeight: Math.max(searchIcon.implicitHeight, searchField.implicitHeight, clearIcon.implicitHeight)
|
||||
|
||||
MaterialIcon {
|
||||
id: searchIcon
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
|
||||
text: "search"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
}
|
||||
|
||||
StyledTextField {
|
||||
id: searchField
|
||||
|
||||
anchors.left: searchIcon.right
|
||||
anchors.right: clearIcon.left
|
||||
anchors.leftMargin: Appearance.spacing.small
|
||||
anchors.rightMargin: Appearance.spacing.small
|
||||
|
||||
topPadding: Appearance.padding.normal
|
||||
bottomPadding: Appearance.padding.normal
|
||||
|
||||
placeholderText: qsTr("Search applications...")
|
||||
|
||||
onTextChanged: {
|
||||
root.searchText = text;
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
id: clearIcon
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
|
||||
width: searchField.text ? implicitWidth : implicitWidth / 2
|
||||
opacity: {
|
||||
if (!searchField.text)
|
||||
return 0;
|
||||
if (clearMouse.pressed)
|
||||
return 0.7;
|
||||
if (clearMouse.containsMouse)
|
||||
return 0.8;
|
||||
return 1;
|
||||
}
|
||||
|
||||
text: "close"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
|
||||
MouseArea {
|
||||
id: clearMouse
|
||||
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: searchField.text ? Qt.PointingHandCursor : undefined
|
||||
|
||||
onClicked: searchField.text = ""
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
text: qsTr("Applications (%1)").arg(root.searchText ? root.filteredApps.length : allAppsDb.apps.length)
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: qsTr("All applications available in the launcher")
|
||||
color: Colours.palette.m3outline
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
Layout.bottomMargin: Appearance.spacing.small
|
||||
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
implicitHeight: Math.max(searchIcon.implicitHeight, searchField.implicitHeight, clearIcon.implicitHeight)
|
||||
|
||||
MaterialIcon {
|
||||
id: searchIcon
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Appearance.padding.normal
|
||||
|
||||
text: "search"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
}
|
||||
|
||||
StyledTextField {
|
||||
id: searchField
|
||||
|
||||
anchors.left: searchIcon.right
|
||||
anchors.right: clearIcon.left
|
||||
anchors.leftMargin: Appearance.spacing.small
|
||||
anchors.rightMargin: Appearance.spacing.small
|
||||
|
||||
topPadding: Appearance.padding.normal
|
||||
bottomPadding: Appearance.padding.normal
|
||||
|
||||
placeholderText: qsTr("Search applications...")
|
||||
|
||||
onTextChanged: {
|
||||
root.searchText = text;
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
id: clearIcon
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
|
||||
width: searchField.text ? implicitWidth : implicitWidth / 2
|
||||
opacity: {
|
||||
if (!searchField.text)
|
||||
return 0;
|
||||
if (clearMouse.pressed)
|
||||
return 0.7;
|
||||
if (clearMouse.containsMouse)
|
||||
return 0.8;
|
||||
return 1;
|
||||
}
|
||||
|
||||
text: "close"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
|
||||
MouseArea {
|
||||
id: clearMouse
|
||||
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: searchField.text ? Qt.PointingHandCursor : undefined
|
||||
|
||||
onClicked: searchField.text = ""
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: appsListLoader
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
active: true
|
||||
|
||||
sourceComponent: StyledListView {
|
||||
id: appsListView
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
model: root.filteredApps
|
||||
spacing: Appearance.spacing.small / 2
|
||||
clip: true
|
||||
|
||||
StyledScrollBar.vertical: StyledScrollBar {
|
||||
flickable: parent
|
||||
}
|
||||
|
||||
delegate: StyledRect {
|
||||
required property var modelData
|
||||
|
||||
width: parent ? parent.width : 0
|
||||
|
||||
readonly property bool isSelected: root.selectedApp === modelData
|
||||
|
||||
color: isSelected ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : "transparent"
|
||||
radius: Appearance.rounding.normal
|
||||
|
||||
opacity: 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutCubic
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
opacity = 1;
|
||||
Loader {
|
||||
id: appsListLoader
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
active: true
|
||||
|
||||
sourceComponent: StyledListView {
|
||||
id: appsListView
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
model: root.filteredApps
|
||||
spacing: Appearance.spacing.small / 2
|
||||
clip: true
|
||||
|
||||
StyledScrollBar.vertical: StyledScrollBar {
|
||||
flickable: parent
|
||||
}
|
||||
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
root.session.launcher.active = modelData;
|
||||
}
|
||||
}
|
||||
delegate: StyledRect {
|
||||
required property var modelData
|
||||
|
||||
RowLayout {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.normal
|
||||
width: parent ? parent.width : 0
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
readonly property bool isSelected: root.selectedApp === modelData
|
||||
|
||||
IconImage {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitSize: 32
|
||||
source: {
|
||||
const entry = modelData.entry;
|
||||
return entry ? Quickshell.iconPath(entry.icon, "image-missing") : "image-missing";
|
||||
color: isSelected ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : "transparent"
|
||||
radius: Appearance.rounding.normal
|
||||
|
||||
opacity: 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: modelData.name || modelData.entry?.name || qsTr("Unknown")
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
Component.onCompleted: {
|
||||
opacity = 1;
|
||||
}
|
||||
}
|
||||
|
||||
implicitHeight: 40
|
||||
StateLayer {
|
||||
function onClicked(): void {
|
||||
root.session.launcher.active = modelData;
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.normal
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
IconImage {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitSize: 32
|
||||
source: {
|
||||
const entry = modelData.entry;
|
||||
return entry ? Quickshell.iconPath(entry.icon, "image-missing") : "image-missing";
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: modelData.name || modelData.entry?.name || qsTr("Unknown")
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
}
|
||||
}
|
||||
|
||||
implicitHeight: 40
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rightContent: Component {
|
||||
Item {
|
||||
|
|
@ -518,7 +515,8 @@ Item {
|
|||
implicitSize: Appearance.font.size.extraLarge * 3 * 2
|
||||
source: {
|
||||
const app = appDetailsLayout.displayedApp;
|
||||
if (!app) return "image-missing";
|
||||
if (!app)
|
||||
return "image-missing";
|
||||
const entry = app.entry;
|
||||
if (entry && entry.icon) {
|
||||
return Quickshell.iconPath(entry.icon, "image-missing");
|
||||
|
|
@ -561,35 +559,34 @@ Item {
|
|||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
SwitchRow {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
visible: appDetailsLayout.displayedApp !== null
|
||||
label: qsTr("Hide from launcher")
|
||||
checked: root.hideFromLauncherChecked
|
||||
enabled: appDetailsLayout.displayedApp !== null
|
||||
onToggled: checked => {
|
||||
root.hideFromLauncherChecked = checked;
|
||||
const app = appDetailsLayout.displayedApp;
|
||||
if (app) {
|
||||
const appId = app.id || app.entry?.id;
|
||||
const hiddenApps = Config.launcher.hiddenApps ? [...Config.launcher.hiddenApps] : [];
|
||||
if (checked) {
|
||||
if (!hiddenApps.includes(appId)) {
|
||||
hiddenApps.push(appId);
|
||||
}
|
||||
} else {
|
||||
const index = hiddenApps.indexOf(appId);
|
||||
if (index !== -1) {
|
||||
hiddenApps.splice(index, 1);
|
||||
SwitchRow {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
visible: appDetailsLayout.displayedApp !== null
|
||||
label: qsTr("Hide from launcher")
|
||||
checked: root.hideFromLauncherChecked
|
||||
enabled: appDetailsLayout.displayedApp !== null
|
||||
onToggled: checked => {
|
||||
root.hideFromLauncherChecked = checked;
|
||||
const app = appDetailsLayout.displayedApp;
|
||||
if (app) {
|
||||
const appId = app.id || app.entry?.id;
|
||||
const hiddenApps = Config.launcher.hiddenApps ? [...Config.launcher.hiddenApps] : [];
|
||||
if (checked) {
|
||||
if (!hiddenApps.includes(appId)) {
|
||||
hiddenApps.push(appId);
|
||||
}
|
||||
} else {
|
||||
const index = hiddenApps.indexOf(appId);
|
||||
if (index !== -1) {
|
||||
hiddenApps.splice(index, 1);
|
||||
}
|
||||
}
|
||||
Config.launcher.hiddenApps = hiddenApps;
|
||||
Config.save();
|
||||
}
|
||||
Config.launcher.hiddenApps = hiddenApps;
|
||||
Config.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,4 +215,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ DeviceList {
|
|||
}
|
||||
}
|
||||
|
||||
onItemSelected: function(item) {
|
||||
onItemSelected: function (item) {
|
||||
session.ethernet.active = item;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SplitPaneWithDetails {
|
|||
anchors.fill: parent
|
||||
|
||||
activeItem: session.ethernet.active
|
||||
paneIdGenerator: function(item) {
|
||||
paneIdGenerator: function (item) {
|
||||
return item ? (item.interface || "") : "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,4 +169,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,9 +181,12 @@ Item {
|
|||
property Component nextComponent: settingsComponent
|
||||
|
||||
function getComponentForPane() {
|
||||
if (vpnPane) return vpnDetailsComponent;
|
||||
if (ethernetPane) return ethernetDetailsComponent;
|
||||
if (wirelessPane) return wirelessDetailsComponent;
|
||||
if (vpnPane)
|
||||
return vpnDetailsComponent;
|
||||
if (ethernetPane)
|
||||
return ethernetDetailsComponent;
|
||||
if (wirelessPane)
|
||||
return wirelessDetailsComponent;
|
||||
return settingsComponent;
|
||||
}
|
||||
|
||||
|
|
@ -199,8 +202,10 @@ Item {
|
|||
function onActiveChanged() {
|
||||
// Clear others when VPN is selected
|
||||
if (root.session && root.session.vpn && root.session.vpn.active) {
|
||||
if (root.session.ethernet && root.session.ethernet.active) root.session.ethernet.active = null;
|
||||
if (root.session.network && root.session.network.active) root.session.network.active = null;
|
||||
if (root.session.ethernet && root.session.ethernet.active)
|
||||
root.session.ethernet.active = null;
|
||||
if (root.session.network && root.session.network.active)
|
||||
root.session.network.active = null;
|
||||
}
|
||||
rightPaneItem.nextComponent = rightPaneItem.getComponentForPane();
|
||||
}
|
||||
|
|
@ -213,8 +218,10 @@ Item {
|
|||
function onActiveChanged() {
|
||||
// Clear others when ethernet is selected
|
||||
if (root.session && root.session.ethernet && root.session.ethernet.active) {
|
||||
if (root.session.vpn && root.session.vpn.active) root.session.vpn.active = null;
|
||||
if (root.session.network && root.session.network.active) root.session.network.active = null;
|
||||
if (root.session.vpn && root.session.vpn.active)
|
||||
root.session.vpn.active = null;
|
||||
if (root.session.network && root.session.network.active)
|
||||
root.session.network.active = null;
|
||||
}
|
||||
rightPaneItem.nextComponent = rightPaneItem.getComponentForPane();
|
||||
}
|
||||
|
|
@ -227,8 +234,10 @@ Item {
|
|||
function onActiveChanged() {
|
||||
// Clear others when wireless is selected
|
||||
if (root.session && root.session.network && root.session.network.active) {
|
||||
if (root.session.vpn && root.session.vpn.active) root.session.vpn.active = null;
|
||||
if (root.session.ethernet && root.session.ethernet.active) root.session.ethernet.active = null;
|
||||
if (root.session.vpn && root.session.vpn.active)
|
||||
root.session.vpn.active = null;
|
||||
if (root.session.ethernet && root.session.ethernet.active)
|
||||
root.session.ethernet.active = null;
|
||||
}
|
||||
rightPaneItem.nextComponent = rightPaneItem.getComponentForPane();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ DeviceDetails {
|
|||
const isActive = network.active || (Nmcli.active && Nmcli.active.ssid === network.ssid);
|
||||
if (isActive) {
|
||||
if (!Nmcli.wirelessDeviceDetails || Nmcli.wirelessDeviceDetails === null) {
|
||||
Nmcli.getWirelessDeviceDetails("", () => {
|
||||
});
|
||||
Nmcli.getWirelessDeviceDetails("", () => {});
|
||||
} else {
|
||||
connectionUpdateTimer.stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,11 +165,13 @@ DeviceList {
|
|||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: {
|
||||
if (modelData.active) return qsTr("Connected");
|
||||
if (modelData.active)
|
||||
return qsTr("Connected");
|
||||
if (modelData.isSecure && modelData.security && modelData.security.length > 0) {
|
||||
return modelData.security;
|
||||
}
|
||||
if (modelData.isSecure) return qsTr("Secured");
|
||||
if (modelData.isSecure)
|
||||
return qsTr("Secured");
|
||||
return qsTr("Open");
|
||||
}
|
||||
color: modelData.active ? Colours.palette.m3primary : Colours.palette.m3outline
|
||||
|
|
@ -211,7 +213,7 @@ DeviceList {
|
|||
}
|
||||
}
|
||||
|
||||
onItemSelected: function(item) {
|
||||
onItemSelected: function (item) {
|
||||
session.network.active = item;
|
||||
if (item && item.ssid) {
|
||||
checkSavedProfileForNetwork(item.ssid);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ SplitPaneWithDetails {
|
|||
anchors.fill: parent
|
||||
|
||||
activeItem: session.network.active
|
||||
paneIdGenerator: function(item) {
|
||||
paneIdGenerator: function (item) {
|
||||
return item ? (item.ssid || item.bssid || "") : "";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,8 +384,7 @@ Item {
|
|||
text = qsTr("Connecting...");
|
||||
|
||||
NetworkConnection.connectWithPassword(root.network, password, result => {
|
||||
if (result && result.success) {
|
||||
} else if (result && result.needsPassword) {
|
||||
if (result && result.success) {} else if (result && result.needsPassword) {
|
||||
connectionMonitor.stop();
|
||||
connecting = false;
|
||||
hasError = true;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,3 @@ QtObject {
|
|||
property bool fabMenuOpen: false
|
||||
property bool editingDeviceName: false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,3 @@ QtObject {
|
|||
|
||||
property var active: null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,3 @@ QtObject {
|
|||
|
||||
property var active: null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,4 +7,3 @@ QtObject {
|
|||
property bool showPasswordDialog: false
|
||||
property var pendingNetwork: null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ StyledRect {
|
|||
if (root.rootItem && modelData.propertyName) {
|
||||
const propName = modelData.propertyName;
|
||||
const rootItem = root.rootItem;
|
||||
_checked = Qt.binding(function() {
|
||||
_checked = Qt.binding(function () {
|
||||
return rootItem[propName] ?? false;
|
||||
});
|
||||
}
|
||||
|
|
@ -106,4 +106,3 @@ StyledRect {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Speakers"),
|
||||
propertyName: "showAudio",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showAudio = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Microphone"),
|
||||
propertyName: "showMicrophone",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showMicrophone = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Keyboard"),
|
||||
propertyName: "showKbLayout",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showKbLayout = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Network"),
|
||||
propertyName: "showNetwork",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showNetwork = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Wifi"),
|
||||
propertyName: "showWifi",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showWifi = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Bluetooth"),
|
||||
propertyName: "showBluetooth",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showBluetooth = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Battery"),
|
||||
propertyName: "showBattery",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showBattery = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -239,7 +239,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Capslock"),
|
||||
propertyName: "showLockStatus",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.showLockStatus = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -268,173 +268,173 @@ Item {
|
|||
font.pointSize: Appearance.font.size.normal
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesShownRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesShownRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: workspacesShownRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Shown")
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
CustomSpinBox {
|
||||
min: 1
|
||||
max: 20
|
||||
value: root.workspacesShown
|
||||
onValueModified: value => {
|
||||
root.workspacesShown = value;
|
||||
root.saveConfig();
|
||||
RowLayout {
|
||||
id: workspacesShownRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Shown")
|
||||
}
|
||||
|
||||
CustomSpinBox {
|
||||
min: 1
|
||||
max: 20
|
||||
value: root.workspacesShown
|
||||
onValueModified: value => {
|
||||
root.workspacesShown = value;
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesActiveIndicatorRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesActiveIndicatorRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: workspacesActiveIndicatorRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Active indicator")
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesActiveIndicator
|
||||
onToggled: {
|
||||
root.workspacesActiveIndicator = checked;
|
||||
root.saveConfig();
|
||||
RowLayout {
|
||||
id: workspacesActiveIndicatorRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Active indicator")
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesActiveIndicator
|
||||
onToggled: {
|
||||
root.workspacesActiveIndicator = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesOccupiedBgRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesOccupiedBgRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: workspacesOccupiedBgRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Occupied background")
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesOccupiedBg
|
||||
onToggled: {
|
||||
root.workspacesOccupiedBg = checked;
|
||||
root.saveConfig();
|
||||
RowLayout {
|
||||
id: workspacesOccupiedBgRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Occupied background")
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesOccupiedBg
|
||||
onToggled: {
|
||||
root.workspacesOccupiedBg = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesShowWindowsRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesShowWindowsRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: workspacesShowWindowsRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Show windows")
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesShowWindows
|
||||
onToggled: {
|
||||
root.workspacesShowWindows = checked;
|
||||
root.saveConfig();
|
||||
RowLayout {
|
||||
id: workspacesShowWindowsRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Show windows")
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesShowWindows
|
||||
onToggled: {
|
||||
root.workspacesShowWindows = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesPerMonitorRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
StyledRect {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: workspacesPerMonitorRow.implicitHeight + Appearance.padding.large * 2
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
|
||||
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: workspacesPerMonitorRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Per monitor workspaces")
|
||||
Behavior on implicitHeight {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesPerMonitor
|
||||
onToggled: {
|
||||
root.workspacesPerMonitor = checked;
|
||||
root.saveConfig();
|
||||
RowLayout {
|
||||
id: workspacesPerMonitorRow
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Per monitor workspaces")
|
||||
}
|
||||
|
||||
StyledSwitch {
|
||||
checked: root.workspacesPerMonitor
|
||||
onToggled: {
|
||||
root.workspacesPerMonitor = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SectionContainer {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -452,7 +452,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Workspaces"),
|
||||
propertyName: "scrollWorkspaces",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.scrollWorkspaces = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -460,7 +460,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Volume"),
|
||||
propertyName: "scrollVolume",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.scrollVolume = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -468,7 +468,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Brightness"),
|
||||
propertyName: "scrollBrightness",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.scrollBrightness = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -541,11 +541,14 @@ Item {
|
|||
from: 0
|
||||
to: 100
|
||||
suffix: "px"
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
formatValueFunction: (val) => Math.round(val).toString()
|
||||
parseValueFunction: (text) => parseInt(text)
|
||||
validator: IntValidator {
|
||||
bottom: 0
|
||||
top: 100
|
||||
}
|
||||
formatValueFunction: val => Math.round(val).toString()
|
||||
parseValueFunction: text => parseInt(text)
|
||||
|
||||
onValueModified: (newValue) => {
|
||||
onValueModified: newValue => {
|
||||
root.dragThreshold = Math.round(newValue);
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -613,7 +616,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Background"),
|
||||
propertyName: "trayBackground",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.trayBackground = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -621,7 +624,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Compact"),
|
||||
propertyName: "trayCompact",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.trayCompact = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -629,7 +632,7 @@ Item {
|
|||
{
|
||||
label: qsTr("Recolour"),
|
||||
propertyName: "trayRecolour",
|
||||
onToggled: function(checked) {
|
||||
onToggled: function (checked) {
|
||||
root.trayRecolour = checked;
|
||||
root.saveConfig();
|
||||
}
|
||||
|
|
@ -639,7 +642,6 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@ Item {
|
|||
|
||||
Component.onCompleted: active = Qt.binding(() => {
|
||||
// Always keep current tab loaded
|
||||
if (pane.index === view.currentIndex) return true;
|
||||
if (pane.index === view.currentIndex)
|
||||
return true;
|
||||
const vx = Math.floor(view.visibleArea.xPosition * view.contentWidth);
|
||||
const vex = Math.floor(vx + view.visibleArea.widthRatio * view.contentWidth);
|
||||
return (vx >= x && vx <= x + implicitWidth) || (vex >= x && vex <= x + implicitWidth);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ StyledRect {
|
|||
visible: Config.utilities.vpn.provider.some(p => typeof p === "object" ? (p.enabled === true) : false)
|
||||
onClicked: VPN.toggle()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ Singleton {
|
|||
}
|
||||
|
||||
function getStreamName(stream: PwNode): string {
|
||||
if (!stream) return qsTr("Unknown");
|
||||
if (!stream)
|
||||
return qsTr("Unknown");
|
||||
// Try application name first, then description, then name
|
||||
return stream.applicationName || stream.description || stream.name || qsTr("Unknown Application");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Singleton {
|
|||
root.savedConnectionSsids = Nmcli.savedConnectionSsids;
|
||||
});
|
||||
// Get initial WiFi status
|
||||
Nmcli.getWifiStatus((enabled) => {
|
||||
Nmcli.getWifiStatus(enabled => {
|
||||
root.wifiEnabled = enabled;
|
||||
});
|
||||
// Sync networks from Nmcli on startup
|
||||
|
|
@ -41,7 +41,7 @@ Singleton {
|
|||
property var wirelessDeviceDetails: null
|
||||
|
||||
function enableWifi(enabled: bool): void {
|
||||
Nmcli.enableWifi(enabled, (result) => {
|
||||
Nmcli.enableWifi(enabled, result => {
|
||||
if (result.success) {
|
||||
root.getWifiStatus();
|
||||
Nmcli.getNetworks(() => {
|
||||
|
|
@ -52,7 +52,7 @@ Singleton {
|
|||
}
|
||||
|
||||
function toggleWifi(): void {
|
||||
Nmcli.toggleWifi((result) => {
|
||||
Nmcli.toggleWifi(result => {
|
||||
if (result.success) {
|
||||
root.getWifiStatus();
|
||||
Nmcli.getNetworks(() => {
|
||||
|
|
@ -73,23 +73,30 @@ Singleton {
|
|||
// Set up pending connection tracking if callback provided
|
||||
if (callback) {
|
||||
const hasBssid = bssid !== undefined && bssid !== null && bssid.length > 0;
|
||||
root.pendingConnection = { ssid: ssid, bssid: hasBssid ? bssid : "", callback: callback };
|
||||
root.pendingConnection = {
|
||||
ssid: ssid,
|
||||
bssid: hasBssid ? bssid : "",
|
||||
callback: callback
|
||||
};
|
||||
}
|
||||
|
||||
Nmcli.connectToNetwork(ssid, password, bssid, (result) => {
|
||||
Nmcli.connectToNetwork(ssid, password, bssid, result => {
|
||||
if (result && result.success) {
|
||||
// Connection successful
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
root.pendingConnection = null;
|
||||
} else if (result && result.needsPassword) {
|
||||
// Password needed - callback will handle showing dialog
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
} else {
|
||||
// Connection failed
|
||||
if (result && result.error) {
|
||||
root.connectionFailed(ssid);
|
||||
}
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
root.pendingConnection = null;
|
||||
}
|
||||
});
|
||||
|
|
@ -98,22 +105,29 @@ Singleton {
|
|||
function connectToNetworkWithPasswordCheck(ssid: string, isSecure: bool, callback: var, bssid: string): void {
|
||||
// Set up pending connection tracking
|
||||
const hasBssid = bssid !== undefined && bssid !== null && bssid.length > 0;
|
||||
root.pendingConnection = { ssid: ssid, bssid: hasBssid ? bssid : "", callback: callback };
|
||||
root.pendingConnection = {
|
||||
ssid: ssid,
|
||||
bssid: hasBssid ? bssid : "",
|
||||
callback: callback
|
||||
};
|
||||
|
||||
Nmcli.connectToNetworkWithPasswordCheck(ssid, isSecure, (result) => {
|
||||
Nmcli.connectToNetworkWithPasswordCheck(ssid, isSecure, result => {
|
||||
if (result && result.success) {
|
||||
// Connection successful
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
root.pendingConnection = null;
|
||||
} else if (result && result.needsPassword) {
|
||||
// Password needed - callback will handle showing dialog
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
} else {
|
||||
// Connection failed
|
||||
if (result && result.error) {
|
||||
root.connectionFailed(ssid);
|
||||
}
|
||||
if (callback) callback(result);
|
||||
if (callback)
|
||||
callback(result);
|
||||
root.pendingConnection = null;
|
||||
}
|
||||
}, bssid);
|
||||
|
|
@ -133,7 +147,7 @@ Singleton {
|
|||
function forgetNetwork(ssid: string): void {
|
||||
// Delete the connection profile for this network
|
||||
// This will remove the saved password and connection settings
|
||||
Nmcli.forgetNetwork(ssid, (result) => {
|
||||
Nmcli.forgetNetwork(ssid, result => {
|
||||
if (result.success) {
|
||||
// Refresh network list after deletion
|
||||
Qt.callLater(() => {
|
||||
|
|
@ -145,7 +159,6 @@ Singleton {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
property list<string> savedConnections: []
|
||||
property list<string> savedConnectionSsids: []
|
||||
|
||||
|
|
@ -226,28 +239,29 @@ Singleton {
|
|||
}
|
||||
|
||||
function getWifiStatus(): void {
|
||||
Nmcli.getWifiStatus((enabled) => {
|
||||
Nmcli.getWifiStatus(enabled => {
|
||||
root.wifiEnabled = enabled;
|
||||
});
|
||||
}
|
||||
|
||||
function getEthernetDevices(): void {
|
||||
root.ethernetProcessRunning = true;
|
||||
Nmcli.getEthernetInterfaces((interfaces) => {
|
||||
Nmcli.getEthernetInterfaces(interfaces => {
|
||||
root.ethernetDevices = Nmcli.ethernetDevices;
|
||||
root.ethernetDeviceCount = Nmcli.ethernetDevices.length;
|
||||
root.ethernetProcessRunning = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function connectEthernet(connectionName: string, interfaceName: string): void {
|
||||
Nmcli.connectEthernet(connectionName, interfaceName, (result) => {
|
||||
Nmcli.connectEthernet(connectionName, interfaceName, result => {
|
||||
if (result.success) {
|
||||
getEthernetDevices();
|
||||
// Refresh device details after connection
|
||||
Qt.callLater(() => {
|
||||
const activeDevice = root.ethernetDevices.find(function(d) { return d.connected; });
|
||||
const activeDevice = root.ethernetDevices.find(function (d) {
|
||||
return d.connected;
|
||||
});
|
||||
if (activeDevice && activeDevice.interface) {
|
||||
updateEthernetDeviceDetails(activeDevice.interface);
|
||||
}
|
||||
|
|
@ -257,7 +271,7 @@ Singleton {
|
|||
}
|
||||
|
||||
function disconnectEthernet(connectionName: string): void {
|
||||
Nmcli.disconnectEthernet(connectionName, (result) => {
|
||||
Nmcli.disconnectEthernet(connectionName, result => {
|
||||
if (result.success) {
|
||||
getEthernetDevices();
|
||||
// Clear device details after disconnection
|
||||
|
|
@ -269,7 +283,7 @@ Singleton {
|
|||
}
|
||||
|
||||
function updateEthernetDeviceDetails(interfaceName: string): void {
|
||||
Nmcli.getEthernetDeviceDetails(interfaceName, (details) => {
|
||||
Nmcli.getEthernetDeviceDetails(interfaceName, details => {
|
||||
root.ethernetDeviceDetails = details;
|
||||
});
|
||||
}
|
||||
|
|
@ -277,7 +291,7 @@ Singleton {
|
|||
function updateWirelessDeviceDetails(): void {
|
||||
// Find the wireless interface by looking for wifi devices
|
||||
// Pass empty string to let Nmcli find the active interface automatically
|
||||
Nmcli.getWirelessDeviceDetails("", (details) => {
|
||||
Nmcli.getWirelessDeviceDetails("", details => {
|
||||
root.wirelessDeviceDetails = details;
|
||||
});
|
||||
}
|
||||
|
|
@ -290,12 +304,7 @@ Singleton {
|
|||
}
|
||||
|
||||
const mask = (0xffffffff << (32 - cidrNum)) >>> 0;
|
||||
const octets = [
|
||||
(mask >>> 24) & 0xff,
|
||||
(mask >>> 16) & 0xff,
|
||||
(mask >>> 8) & 0xff,
|
||||
mask & 0xff
|
||||
];
|
||||
const octets = [(mask >>> 24) & 0xff, (mask >>> 16) & 0xff, (mask >>> 8) & 0xff, mask & 0xff];
|
||||
|
||||
return octets.join(".");
|
||||
}
|
||||
|
|
@ -312,5 +321,4 @@ Singleton {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,9 +129,9 @@ Singleton {
|
|||
|
||||
command: ["ip", "link", "show"]
|
||||
environment: ({
|
||||
LANG: "C.UTF-8",
|
||||
LC_ALL: "C.UTF-8"
|
||||
})
|
||||
LANG: "C.UTF-8",
|
||||
LC_ALL: "C.UTF-8"
|
||||
})
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
const iface = root.currentConfig ? root.currentConfig.interface : "";
|
||||
|
|
|
|||
|
|
@ -73,30 +73,25 @@ QtObject {
|
|||
Nmcli.connectToNetwork(network.ssid, "", network.bssid, null);
|
||||
} else {
|
||||
// Use password check with callback
|
||||
Nmcli.connectToNetworkWithPasswordCheck(
|
||||
network.ssid,
|
||||
network.isSecure,
|
||||
(result) => {
|
||||
if (result.needsPassword) {
|
||||
// Clear pending connection if exists
|
||||
if (Nmcli.pendingConnection) {
|
||||
Nmcli.connectionCheckTimer.stop();
|
||||
Nmcli.immediateCheckTimer.stop();
|
||||
Nmcli.immediateCheckTimer.checkCount = 0;
|
||||
Nmcli.pendingConnection = null;
|
||||
}
|
||||
|
||||
// Handle password dialog - use session if available, otherwise use callback
|
||||
if (session && session.network) {
|
||||
session.network.showPasswordDialog = true;
|
||||
session.network.pendingNetwork = network;
|
||||
} else if (onPasswordNeeded) {
|
||||
onPasswordNeeded(network);
|
||||
}
|
||||
Nmcli.connectToNetworkWithPasswordCheck(network.ssid, network.isSecure, result => {
|
||||
if (result.needsPassword) {
|
||||
// Clear pending connection if exists
|
||||
if (Nmcli.pendingConnection) {
|
||||
Nmcli.connectionCheckTimer.stop();
|
||||
Nmcli.immediateCheckTimer.stop();
|
||||
Nmcli.immediateCheckTimer.checkCount = 0;
|
||||
Nmcli.pendingConnection = null;
|
||||
}
|
||||
},
|
||||
network.bssid
|
||||
);
|
||||
|
||||
// Handle password dialog - use session if available, otherwise use callback
|
||||
if (session && session.network) {
|
||||
session.network.showPasswordDialog = true;
|
||||
session.network.pendingNetwork = network;
|
||||
} else if (onPasswordNeeded) {
|
||||
onPasswordNeeded(network);
|
||||
}
|
||||
}
|
||||
}, network.bssid);
|
||||
}
|
||||
} else {
|
||||
Nmcli.connectToNetwork(network.ssid, "", network.bssid, null);
|
||||
|
|
@ -119,4 +114,3 @@ QtObject {
|
|||
Nmcli.connectToNetwork(network.ssid, password || "", network.bssid || "", onResult || null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue