added services page + rename barConfig json property to bar, migration helper function
This commit is contained in:
+5
-5
@@ -57,15 +57,15 @@ RowLayout {
|
||||
const item = ch.item;
|
||||
const itemWidth = item.implicitWidth;
|
||||
|
||||
if (id === "audio" && Config.barConfig.popouts.audio) {
|
||||
if (id === "audio" && Config.bar.popouts.audio) {
|
||||
popouts.currentName = "audio";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
} else if (id === "network" && Config.barConfig.popouts.network) {
|
||||
} else if (id === "network" && Config.bar.popouts.network) {
|
||||
popouts.currentName = "network";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
} else if (id === "upower" && Config.barConfig.popouts.upower) {
|
||||
} else if (id === "upower" && Config.bar.popouts.upower) {
|
||||
popouts.currentName = "upower";
|
||||
popouts.currentCenter = Qt.binding(() => item.mapToItem(root, itemWidth / 2, 0).x);
|
||||
popouts.hasCurrent = true;
|
||||
@@ -81,8 +81,8 @@ RowLayout {
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
// model: Config.barConfig.entries.filted(n => n.index > 50).sort(n => n.index)
|
||||
model: Config.barConfig.entries
|
||||
// model: Config.bar.entries.filted(n => n.index > 50).sort(n => n.index)
|
||||
model: Config.bar.entries
|
||||
|
||||
DelegateChooser {
|
||||
role: "id"
|
||||
|
||||
@@ -15,15 +15,15 @@ import qs.Modules.Network
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int contentHeight: Config.barConfig.height + padding * 2
|
||||
readonly property int exclusiveZone: Config.barConfig.autoHide ? Config.barConfig.border : contentHeight
|
||||
readonly property int contentHeight: Config.bar.height + padding * 2
|
||||
readonly property int exclusiveZone: Config.bar.autoHide ? Config.bar.border : contentHeight
|
||||
required property bool fullscreen
|
||||
property bool isHovered
|
||||
readonly property int padding: Math.max(Appearance.padding.smaller, Config.barConfig.border)
|
||||
readonly property int padding: Math.max(Appearance.padding.smaller, Config.bar.border)
|
||||
required property Wrapper popouts
|
||||
required property ClipWrapper popoutsWrapper
|
||||
required property ShellScreen screen
|
||||
readonly property bool shouldBeVisible: !fullscreen && (!Config.barConfig.autoHide || visibilities.bar || isHovered)
|
||||
readonly property bool shouldBeVisible: !fullscreen && (!Config.bar.autoHide || visibilities.bar || isHovered)
|
||||
readonly property int vPadding: 6
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
@@ -31,8 +31,8 @@ Item {
|
||||
content.item?.checkPopout(x);
|
||||
}
|
||||
|
||||
implicitHeight: fullscreen ? 0 : Config.barConfig.border
|
||||
visible: height > Config.barConfig.border
|
||||
implicitHeight: fullscreen ? 0 : Config.bar.border
|
||||
visible: height > Config.bar.border
|
||||
|
||||
states: State {
|
||||
name: "visible"
|
||||
|
||||
@@ -38,11 +38,11 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Config.barConfig.border + 1
|
||||
anchors.margins: Config.bar.border + 1
|
||||
anchors.topMargin: root.bar.implicitHeight + 1
|
||||
radius: Config.barConfig.border > 0 ? Config.barConfig.rounding : 0
|
||||
topLeftRadius: Config.barConfig.rounding
|
||||
topRightRadius: Config.barConfig.rounding
|
||||
radius: Config.bar.border > 0 ? Config.bar.rounding : 0
|
||||
topLeftRadius: Config.bar.rounding
|
||||
topRightRadius: Config.bar.rounding
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ CustomRect {
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
color: visibilities.dashboard ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: timeText.contentWidth + Appearance.padding.normal * 2
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ CustomRect {
|
||||
property bool tempEnabled: Hyprsunset.enabled
|
||||
|
||||
color: root.tempEnabled ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: implicitHeight
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ PathView {
|
||||
let outerMargins = 0;
|
||||
if ((visibilities.utilities || visibilities.sidebar) && panels.utilities.implicitWidth > outerMargins)
|
||||
outerMargins = panels.utilities.implicitWidth;
|
||||
const maxWidth = screen.width - Config.barConfig.rounding * 4 - (barMargins + outerMargins) * 2;
|
||||
const maxWidth = screen.width - Config.bar.rounding * 4 - (barMargins + outerMargins) * 2;
|
||||
|
||||
if (maxWidth <= 0)
|
||||
return 0;
|
||||
|
||||
@@ -12,7 +12,7 @@ CustomRect {
|
||||
readonly property int textWidth: Math.min(metrics.width, 200)
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: layout.implicitWidth + Appearance.padding.normal * 2
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import QtQuick
|
||||
import qs.Config
|
||||
import qs.Helpers
|
||||
import qs.Daemons
|
||||
import qs.Components
|
||||
|
||||
CustomRect {
|
||||
@@ -12,7 +11,7 @@ CustomRect {
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
color: visibilities.sidebar ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: implicitHeight
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
@@ -24,7 +23,7 @@ CustomRect {
|
||||
fill: root.visibilities.sidebar ? 1 : 0
|
||||
font.family: "Material Symbols Rounded"
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
text: HasNotifications.hasNotifications ? "\uf4fe" : "\ue7f4"
|
||||
text: NotifServer.list.length ? "\uf4fe" : "\ue7f4"
|
||||
|
||||
Behavior on color {
|
||||
CAnim {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Daemons
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import qs.Components
|
||||
import qs.Config
|
||||
import qs.Daemons
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -72,7 +73,15 @@ Item {
|
||||
}
|
||||
}
|
||||
model: ScriptModel {
|
||||
values: NotifServer.popups.filter(n => !n.closed)
|
||||
values: {
|
||||
const popups = NotifServer.popups.filter(n => !n.closed);
|
||||
|
||||
if (!Config.notifs.showInFullscreen) {
|
||||
if (Hypr.monitorFor(root.panels.screen).activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false)
|
||||
return [];
|
||||
}
|
||||
return popups;
|
||||
}
|
||||
}
|
||||
move: Transition {
|
||||
Anim {
|
||||
|
||||
@@ -7,7 +7,7 @@ ShapePath {
|
||||
id: root
|
||||
|
||||
readonly property bool flatten: wrapper.height < rounding * 2
|
||||
readonly property real rounding: Config.barConfig.rounding
|
||||
readonly property real rounding: Config.bar.rounding
|
||||
readonly property real roundingY: flatten ? wrapper.height / 2 : rounding
|
||||
required property var sidebar
|
||||
required property Wrapper wrapper
|
||||
|
||||
@@ -16,7 +16,7 @@ CustomRect {
|
||||
|
||||
clip: true
|
||||
color: visibilities.resources ? DynamicColors.palette.m3primary : DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: rowLayout.implicitWidth + Appearance.padding.larger * 2
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Auto hide"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "autoHide"
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ SettingsPage {
|
||||
SettingSpinBox {
|
||||
min: 1
|
||||
name: "Height"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "height"
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ SettingsPage {
|
||||
SettingSpinBox {
|
||||
min: 0
|
||||
name: "Rounding"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "rounding"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ SettingsPage {
|
||||
SettingSpinBox {
|
||||
min: 0
|
||||
name: "Border"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "border"
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ SettingsPage {
|
||||
SettingSpinBox {
|
||||
min: 0
|
||||
name: "Smoothing"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "smoothing"
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ SettingsPage {
|
||||
SettingSpinBox {
|
||||
min: 16
|
||||
name: "Tray icon size"
|
||||
object: Config.barConfig.tray
|
||||
object: Config.bar.tray
|
||||
setting: "trayIconSize"
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Tray"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "tray"
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Audio"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "audio"
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Active window"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "activeWindow"
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Resources"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "resources"
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Clock"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "clock"
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Network"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "network"
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ SettingsPage {
|
||||
|
||||
SettingSwitch {
|
||||
name: "Power"
|
||||
object: Config.barConfig.popouts
|
||||
object: Config.bar.popouts
|
||||
setting: "upower"
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ SettingsPage {
|
||||
|
||||
SettingBarEntryList {
|
||||
name: "Bar entries"
|
||||
object: Config.barConfig
|
||||
object: Config.bar
|
||||
setting: "entries"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ ConnectedRect {
|
||||
id: root
|
||||
|
||||
property alias icon: icon.text
|
||||
property alias label: label.text
|
||||
property alias status: status.text
|
||||
property alias text: label.text
|
||||
|
||||
signal clicked
|
||||
|
||||
@@ -28,13 +28,13 @@ ConnectedRect {
|
||||
anchors.leftMargin: Appearance.padding.largeIncreased
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.largeIncreased
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.medium
|
||||
font.pointSize: Appearance.font.size.large
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
@@ -11,9 +11,9 @@ ConnectedRect {
|
||||
default required property Item content
|
||||
property alias icon: icon.text
|
||||
property bool keepPopupAsChild
|
||||
property alias label: label.text
|
||||
readonly property alias popup: popup
|
||||
property alias status: status.text
|
||||
property alias text: label.text
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: navLayout.implicitHeight + navLayout.anchors.margins * 2
|
||||
@@ -33,13 +33,13 @@ ConnectedRect {
|
||||
anchors.leftMargin: Appearance.padding.largeIncreased
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.rightMargin: Appearance.padding.largeIncreased
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
color: DynamicColors.palette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.medium
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
@@ -10,6 +10,8 @@ import qs.Modules.SettingsNew.Pages.Wallpaper
|
||||
import qs.Modules.SettingsNew.Pages.Audio
|
||||
import qs.Modules.SettingsNew.Pages.Apps
|
||||
import qs.Modules.SettingsNew.Pages.Panels
|
||||
import qs.Modules.SettingsNew.Pages.Panels.Bar
|
||||
import qs.Modules.SettingsNew.Pages.Services
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
@@ -72,13 +74,18 @@ QtObject {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
DashboardPanel {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarPanel {
|
||||
ResourcesPanel {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +98,26 @@ QtObject {
|
||||
SidebarPanel {
|
||||
}
|
||||
}
|
||||
|
||||
// Bar sub pages
|
||||
Component {
|
||||
BarTray {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarStatusIcons {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
BarClock {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Apps
|
||||
Component {
|
||||
StackPage {
|
||||
Component {
|
||||
@@ -110,6 +135,21 @@ QtObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Services
|
||||
Component {
|
||||
StackPage {
|
||||
Component {
|
||||
ServicesPage {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
NotificationsPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
readonly property Component placeholderComp: Component {
|
||||
|
||||
@@ -30,33 +30,33 @@ PageBase {
|
||||
DefaultRow {
|
||||
first: true
|
||||
icon: "terminal"
|
||||
label: qsTr("Terminal")
|
||||
status: Config.general.apps.terminal.join(" ")
|
||||
text: qsTr("Terminal")
|
||||
|
||||
onSelected: app => Config.general.apps.terminal = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "volume_up"
|
||||
label: qsTr("Audio")
|
||||
status: Config.general.apps.audio.join(" ")
|
||||
text: qsTr("Audio")
|
||||
|
||||
onSelected: app => Config.general.apps.audio = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "play_circle"
|
||||
label: qsTr("Media playback")
|
||||
status: Config.general.apps.playback.join(" ")
|
||||
text: qsTr("Media playback")
|
||||
|
||||
onSelected: app => Config.general.apps.playback = app.command
|
||||
}
|
||||
|
||||
DefaultRow {
|
||||
icon: "folder"
|
||||
label: qsTr("File manager")
|
||||
last: true
|
||||
status: Config.general.apps.explorer.join(" ")
|
||||
text: qsTr("File manager")
|
||||
|
||||
onSelected: app => Config.general.apps.explorer = app.command
|
||||
}
|
||||
@@ -69,9 +69,9 @@ PageBase {
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "apps"
|
||||
label: qsTr("All apps")
|
||||
last: true
|
||||
status: qsTr("Browse installed apps, set favorites and hidden")
|
||||
text: qsTr("All apps")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
readonly property list<MenuItem> clockFormats: [
|
||||
MenuItem {
|
||||
text: qsTr("Long format")
|
||||
value: "dddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format")
|
||||
value: "ddd d MMM - hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only")
|
||||
value: "hh:mm"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Long format seconds")
|
||||
value: "dddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Short format seconds")
|
||||
value: "ddd d MMM - hh:mm:ss"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Time only seconds")
|
||||
value: "hh:mm:ss"
|
||||
}
|
||||
]
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Clock")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SelectRow {
|
||||
Layout.topMargin: Appearance.spacing.extraSmall / 2 - parent.spacing
|
||||
active: root.clockFormats.find(item => item.value === Config.general.dateFormat)
|
||||
first: true
|
||||
last: true
|
||||
menuItems: root.clockFormats
|
||||
subtext: qsTr("Change how time is displayed in the widget")
|
||||
text: qsTr("Time format")
|
||||
|
||||
onSelected: item => {
|
||||
Config.general.dateFormat = item.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("System icons")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Visible icons
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Visible icons")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showAudio
|
||||
first: true
|
||||
text: qsTr("Speakers")
|
||||
|
||||
onToggled: Config.bar.tray.showAudio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showMicrophone
|
||||
text: qsTr("Microphone")
|
||||
|
||||
onToggled: Config.bar.tray.showMicrophone = checked
|
||||
}
|
||||
|
||||
//////// FOR LATER:
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showNetwork
|
||||
// text: qsTr("Network")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showNetwork = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showWifi
|
||||
// text: qsTr("Wi-Fi")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showWifi = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.bar.tray.showBluetooth
|
||||
// text: qsTr("Bluetooth")
|
||||
//
|
||||
// onToggled: Config.bar.tray.showBluetooth = checked
|
||||
// }
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.tray.showPower
|
||||
last: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.bar.tray.showPower = checked
|
||||
}
|
||||
|
||||
// Behaviour
|
||||
SectionHeader {
|
||||
text: qsTr("Behavior")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.audio
|
||||
first: true
|
||||
subtext: qsTr("Show a details popout when hovering the audio icons")
|
||||
text: qsTr("Audio popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.audio = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.bar.popouts.upower
|
||||
last: true
|
||||
subtext: qsTr("Show a details popout when hovering the power icon")
|
||||
text: qsTr("Power popout on hover")
|
||||
|
||||
onToggled: Config.bar.popouts.upower = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Tray")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 12
|
||||
last: true
|
||||
stepSize: 1
|
||||
text: qsTr("Icon size")
|
||||
to: 24
|
||||
value: Config.bar.tray.trayIconSize
|
||||
|
||||
onMoved: value => Config.bar.tray.trayIconSize = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,13 +23,13 @@ PageBase {
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.barConfig.autoHide
|
||||
checked: Config.bar.autoHide
|
||||
first: true
|
||||
last: true
|
||||
subtext: qsTr("Hide the bar, reveal on hover")
|
||||
text: qsTr("Auto hide")
|
||||
|
||||
onToggled: Config.barConfig.autoHide = checked
|
||||
onToggled: Config.bar.autoHide = checked
|
||||
}
|
||||
|
||||
// Components
|
||||
@@ -39,44 +39,28 @@ PageBase {
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "workspaces"
|
||||
label: qsTr("Workspaces")
|
||||
status: qsTr("Indicators, window icons")
|
||||
icon: "widgets"
|
||||
status: qsTr("System tray icons")
|
||||
text: qsTr("Tray")
|
||||
|
||||
onClicked: root.sState.openSubPage(5)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "web_asset"
|
||||
label: qsTr("Active window")
|
||||
status: qsTr("Title display, popout")
|
||||
icon: "signal_cellular_alt"
|
||||
status: qsTr("Visible indicators")
|
||||
text: qsTr("Status icons")
|
||||
|
||||
onClicked: root.sState.openSubPage(6)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "widgets"
|
||||
label: qsTr("Tray")
|
||||
status: qsTr("System tray icons")
|
||||
icon: "schedule"
|
||||
last: true
|
||||
status: qsTr("Date, icon, background")
|
||||
text: qsTr("Clock")
|
||||
|
||||
onClicked: root.sState.openSubPage(7)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "signal_cellular_alt"
|
||||
label: qsTr("Status icons")
|
||||
status: qsTr("Visible indicators")
|
||||
|
||||
onClicked: root.sState.openSubPage(8)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "schedule"
|
||||
label: qsTr("Clock")
|
||||
last: true
|
||||
status: qsTr("Date, icon, background")
|
||||
|
||||
onClicked: root.sState.openSubPage(9)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,54 +32,5 @@ PageBase {
|
||||
|
||||
onToggled: Config.dashboard.enabled = checked
|
||||
}
|
||||
|
||||
// Performance widgets
|
||||
SectionHeader {
|
||||
text: qsTr("Performance widgets")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showBattery
|
||||
first: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.dashboard.performance.showBattery = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showGpu
|
||||
text: qsTr("GPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showGpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showCpu
|
||||
text: qsTr("CPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showCpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showMemory
|
||||
text: qsTr("Memory")
|
||||
|
||||
onToggled: Config.dashboard.performance.showMemory = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showStorage
|
||||
text: qsTr("Storage")
|
||||
|
||||
onToggled: Config.dashboard.performance.showStorage = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showNetwork
|
||||
last: true
|
||||
text: qsTr("Network")
|
||||
|
||||
onToggled: Config.dashboard.performance.showNetwork = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Resources")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// General
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("General")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.enabled
|
||||
first: true
|
||||
last: true
|
||||
text: qsTr("Enabled")
|
||||
|
||||
onToggled: Config.dashboard.performance.enabled = checked
|
||||
}
|
||||
|
||||
// Performance widgets
|
||||
SectionHeader {
|
||||
text: qsTr("Performance widgets")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showBattery
|
||||
first: true
|
||||
text: qsTr("Battery")
|
||||
|
||||
onToggled: Config.dashboard.performance.showBattery = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showGpu
|
||||
text: qsTr("GPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showGpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showCpu
|
||||
text: qsTr("CPU")
|
||||
|
||||
onToggled: Config.dashboard.performance.showCpu = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showMemory
|
||||
text: qsTr("Memory")
|
||||
|
||||
onToggled: Config.dashboard.performance.showMemory = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showStorage
|
||||
text: qsTr("Storage")
|
||||
|
||||
onToggled: Config.dashboard.performance.showStorage = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.dashboard.performance.showNetwork
|
||||
last: true
|
||||
text: qsTr("Network")
|
||||
|
||||
onToggled: Config.dashboard.performance.showNetwork = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,36 +15,44 @@ PageBase {
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "dashboard"
|
||||
label: qsTr("Dashboard")
|
||||
status: Config.dashboard.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "dock_to_bottom"
|
||||
status: !Config.bar.autoHide ? qsTr("Always visible") : qsTr("Reveal on hover")
|
||||
text: qsTr("Bar")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_bottom"
|
||||
label: qsTr("Taskbar")
|
||||
status: !Config.barConfig.autoHide ? qsTr("Always visible") : qsTr("Reveal on hover")
|
||||
icon: "dashboard"
|
||||
status: Config.dashboard.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Dashboard")
|
||||
|
||||
onClicked: root.sState.openSubPage(2)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "apps"
|
||||
label: qsTr("Launcher")
|
||||
status: Config.launcher.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "insert_chart"
|
||||
status: Config.dashboard.performance.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Resources")
|
||||
|
||||
onClicked: root.sState.openSubPage(3)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_right"
|
||||
label: qsTr("Sidebar")
|
||||
last: true
|
||||
status: Config.sidebar.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
icon: "apps"
|
||||
status: Config.launcher.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Launcher")
|
||||
|
||||
onClicked: root.sState.openSubPage(4)
|
||||
}
|
||||
|
||||
NavRow {
|
||||
icon: "dock_to_right"
|
||||
last: true
|
||||
status: Config.sidebar.enabled ? qsTr("Enabled") : qsTr("Disabled")
|
||||
text: qsTr("Sidebar")
|
||||
|
||||
onClicked: root.sState.openSubPage(5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
import qs.Components
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
isSubPage: true
|
||||
title: qsTr("Notifications")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Notifications
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Notifications")
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.showInFullscreen
|
||||
first: true
|
||||
subtext: qsTr("Whether notifications appear over fullscreen apps")
|
||||
text: qsTr("Show in fullscreen")
|
||||
|
||||
onToggled: Config.notifs.showInFullscreen = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.expire
|
||||
subtext: qsTr("Dismiss notifications after their timeout")
|
||||
text: qsTr("Expire automatically")
|
||||
|
||||
onToggled: Config.notifs.expire = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.notifs.openExpanded
|
||||
subtext: qsTr("Show notifications expanded by default")
|
||||
text: qsTr("Open expanded")
|
||||
|
||||
onToggled: Config.notifs.openExpanded = checked
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1000
|
||||
stepSize: 500
|
||||
subtext: qsTr("Time before a notification dismisses (ms)")
|
||||
text: qsTr("Default timeout")
|
||||
to: 60000
|
||||
value: Config.notifs.defaultExpireTimeout
|
||||
|
||||
onMoved: v => Config.notifs.defaultExpireTimeout = Math.round(v)
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
last: true
|
||||
stepSize: 1
|
||||
subtext: qsTr("Notifications shown per group before collapsing")
|
||||
text: qsTr("Group preview count")
|
||||
to: 10
|
||||
value: Config.notifs.groupPreviewNum
|
||||
|
||||
onMoved: v => Config.notifs.groupPreviewNum = Math.round(v)
|
||||
}
|
||||
|
||||
// Toasts
|
||||
SectionHeader {
|
||||
text: qsTr("Toasts")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Maximum number of toasts shown at once")
|
||||
text: qsTr("Visible toasts")
|
||||
to: 10
|
||||
value: Config.utilities.maxToasts
|
||||
|
||||
onMoved: v => Config.utilities.maxToasts = Math.round(v)
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.chargingChanged
|
||||
text: qsTr("Charging changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.chargingChanged = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.gameModeChanged
|
||||
text: qsTr("Game mode changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.gameModeChanged = checked
|
||||
}
|
||||
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.dndChanged
|
||||
// text: qsTr("Do not disturb changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.dndChanged = checked
|
||||
// }
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.audioOutputChanged
|
||||
text: qsTr("Audio output changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.audioOutputChanged = checked
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.utilities.toasts.audioInputChanged
|
||||
last: true
|
||||
text: qsTr("Audio input changes")
|
||||
|
||||
onToggled: Config.utilities.toasts.audioInputChanged = checked
|
||||
}
|
||||
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.capsLockChanged
|
||||
// text: qsTr("Caps lock changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.capsLockChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.numLockChanged
|
||||
// text: qsTr("Num lock changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.numLockChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.kbLayoutChanged
|
||||
// text: qsTr("Keyboard layout changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.kbLayoutChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.vpnChanged
|
||||
// text: qsTr("VPN changes")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.vpnChanged = checked
|
||||
// }
|
||||
//
|
||||
// ToggleRow {
|
||||
// checked: Config.utilities.toasts.nowPlaying
|
||||
// last: true
|
||||
// text: qsTr("Now playing")
|
||||
//
|
||||
// onToggled: Config.utilities.toasts.nowPlaying = checked
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import ZShell.Services
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import qs.Modules.SettingsNew.Common
|
||||
|
||||
PageBase {
|
||||
id: root
|
||||
|
||||
// GPU options + the config string each maps to (see Gpu::parseType)
|
||||
readonly property list<MenuItem> gpuItems: [
|
||||
MenuItem {
|
||||
text: qsTr("Auto")
|
||||
},
|
||||
MenuItem {
|
||||
text: "NVIDIA"
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("Generic")
|
||||
},
|
||||
MenuItem {
|
||||
text: qsTr("None")
|
||||
}
|
||||
]
|
||||
readonly property list<string> gpuValues: ["", "NVIDIA", "GENERIC", "None"]
|
||||
|
||||
function gpuKeyToIndex(key: string): int {
|
||||
const u = (key ?? "").trim().toUpperCase();
|
||||
if (u === "")
|
||||
return 0; // Auto
|
||||
if (u === "NVIDIA")
|
||||
return 1;
|
||||
if (u === "GENERIC")
|
||||
return 2;
|
||||
return 3; // None
|
||||
}
|
||||
|
||||
title: qsTr("Services")
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
spacing: Appearance.spacing.extraSmall / 2
|
||||
width: root.cappedWidth
|
||||
|
||||
// Detected running players, used as default-player options
|
||||
Variants {
|
||||
id: playerVariants
|
||||
|
||||
model: [...new Set(Players.list.map(p => Players.getIdentity(p)).filter(id => id))]
|
||||
|
||||
MenuItem {
|
||||
required property string modelData
|
||||
|
||||
activeIcon: "music_note"
|
||||
icon: modelData === Config.services.defaultPlayer ? "check" : ""
|
||||
text: modelData
|
||||
}
|
||||
}
|
||||
|
||||
// Notifications
|
||||
SectionHeader {
|
||||
first: true
|
||||
text: qsTr("Notifications")
|
||||
}
|
||||
|
||||
NavRow {
|
||||
first: true
|
||||
icon: "notifications"
|
||||
last: true
|
||||
status: qsTr("Notifications, toasts, timeouts")
|
||||
text: qsTr("Notifications")
|
||||
|
||||
onClicked: root.sState.openSubPage(1)
|
||||
}
|
||||
|
||||
// Polling
|
||||
SectionHeader {
|
||||
text: qsTr("Polling")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 100
|
||||
stepSize: 50
|
||||
subtext: qsTr("How often the media position updates (ms)")
|
||||
text: qsTr("Media refresh")
|
||||
to: 2000
|
||||
value: Config.dashboard.mediaUpdateInterval
|
||||
|
||||
onMoved: v => Config.dashboard.mediaUpdateInterval = v
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 0.5
|
||||
last: true
|
||||
stepSize: 0.5
|
||||
subtext: qsTr("CPU, memory and GPU update interval (seconds)")
|
||||
text: qsTr("System stats refresh")
|
||||
to: 10
|
||||
value: Config.dashboard.resourceUpdateInterval / 1000
|
||||
|
||||
onMoved: v => Config.dashboard.resourceUpdateInterval = Math.round(v * 1000)
|
||||
}
|
||||
|
||||
// Media & lyrics
|
||||
SectionHeader {
|
||||
text: qsTr("Media")
|
||||
}
|
||||
|
||||
SelectRow {
|
||||
active: menuItems.find(i => i.text === Config.services.defaultPlayer) ?? null
|
||||
fallbackIcon: "music_note"
|
||||
fallbackText: Config.services.defaultPlayer || qsTr("Auto")
|
||||
first: true
|
||||
last: true
|
||||
menuItems: playerVariants.instances
|
||||
subtext: qsTr("Preferred media player when several are open")
|
||||
text: qsTr("Default player")
|
||||
|
||||
onSelected: item => Config.services.defaultPlayer = item.text
|
||||
}
|
||||
|
||||
// Input increments
|
||||
SectionHeader {
|
||||
text: qsTr("Input increments")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Amount the volume changes per input (%)")
|
||||
text: qsTr("Volume step")
|
||||
to: 50
|
||||
value: Math.round(Config.services.audioIncrement * 100)
|
||||
|
||||
onMoved: v => Config.services.audioIncrement = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Amount the brightness changes per input (%)")
|
||||
text: qsTr("Brightness step")
|
||||
to: 50
|
||||
value: Math.round(Config.services.brightnessIncrement * 100)
|
||||
|
||||
onMoved: v => Config.services.brightnessIncrement = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 1
|
||||
stepSize: 1
|
||||
subtext: qsTr("Lowest allowed brightness (%)")
|
||||
text: qsTr("Brightness minimum")
|
||||
to: 20
|
||||
value: Math.round(Config.services.minBrightness * 100)
|
||||
|
||||
onMoved: v => Config.services.minBrightness = v / 100
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
from: 50
|
||||
last: true
|
||||
stepSize: 5
|
||||
subtext: qsTr("Upper limit for output volume (%)")
|
||||
text: qsTr("Max volume")
|
||||
to: 200
|
||||
value: Math.round(Config.services.maxVolume * 100)
|
||||
|
||||
onMoved: v => Config.services.maxVolume = v / 100
|
||||
}
|
||||
|
||||
// Service tuning
|
||||
SectionHeader {
|
||||
text: qsTr("Service tuning")
|
||||
}
|
||||
|
||||
SpinRow {
|
||||
first: true
|
||||
from: 10
|
||||
stepSize: 2
|
||||
subtext: qsTr("Resolution of the audio visualizer")
|
||||
text: qsTr("Visualizer resolution")
|
||||
to: 120
|
||||
value: Config.services.visualizerBars
|
||||
|
||||
onMoved: v => Config.services.visualiserBars = v
|
||||
}
|
||||
|
||||
ToggleRow {
|
||||
checked: Config.general.color.smart
|
||||
subtext: qsTr("Derive theme mode from the wallpaper")
|
||||
text: qsTr("Smart color scheme")
|
||||
|
||||
onToggled: Config.general.color.smart = checked
|
||||
}
|
||||
|
||||
SelectRow {
|
||||
active: root.gpuItems[root.gpuKeyToIndex(Config.services.gpuType)]
|
||||
last: true
|
||||
menuItems: root.gpuItems
|
||||
menuOnTop: true
|
||||
subtext: Gpu.name ? qsTr("Monitoring: %1").arg(Gpu.name) : qsTr("Override for GPU type")
|
||||
text: qsTr("GPU")
|
||||
|
||||
onSelected: item => Config.services.gpuType = root.gpuValues[root.gpuItems.indexOf(item)]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ Item {
|
||||
if (mouse.button === Qt.LeftButton) {
|
||||
root.item.activate();
|
||||
console.log(icon.source + "\n" + root.item.id);
|
||||
} else if (mouse.button === Qt.RightButton && Config.barConfig.popouts.tray) {
|
||||
} else if (mouse.button === Qt.RightButton && Config.bar.popouts.tray) {
|
||||
root.popouts.currentName = `traymenu${root.ind}`;
|
||||
root.popouts.currentCenter = Qt.binding(() => root.mapToItem(root.loader, root.implicitWidth / 2, 0).x);
|
||||
root.popouts.hasCurrent = true;
|
||||
@@ -77,7 +77,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
antialiasing: true
|
||||
color: root.current ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
implicitSize: Config.barConfig.tray.trayIconSize * root.dpr
|
||||
implicitSize: Config.bar.tray.trayIconSize * root.dpr
|
||||
layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark
|
||||
scale: 1 / root.dpr
|
||||
source: root.resolveIcon(root.item.id, root.item.icon)
|
||||
|
||||
@@ -47,12 +47,12 @@ RowLayout {
|
||||
let modRowPos = sysTrayMod.mapToItem(sysModRow, modPos.x, modPos.y);
|
||||
let child = closestRowChild(sysModRow, modRowPos.x);
|
||||
if (child) {
|
||||
if (child.objectName === "audioWidget" && Config.barConfig.popouts.audio)
|
||||
if (child.objectName === "audioWidget" && Config.bar.popouts.audio)
|
||||
return {
|
||||
id: "audio",
|
||||
item: child
|
||||
};
|
||||
if (child.objectName === "upowerWidget" && Config.barConfig.popouts.upower)
|
||||
if (child.objectName === "upowerWidget" && Config.bar.popouts.upower)
|
||||
return {
|
||||
id: "upower",
|
||||
item: child
|
||||
@@ -75,7 +75,7 @@ RowLayout {
|
||||
return null;
|
||||
}
|
||||
|
||||
height: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
height: Config.bar.height + Appearance.padding.smallest * 2
|
||||
spacing: Appearance.padding.small
|
||||
width: sysTray.implicitWidth + sysTrayMod.implicitWidth + Appearance.padding.small
|
||||
|
||||
@@ -123,22 +123,31 @@ RowLayout {
|
||||
Layout.fillHeight: true
|
||||
bottomLeftRadius: Appearance.rounding.smallest / 2
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitWidth: sysModRow.width + Appearance.padding.smaller * 2
|
||||
implicitWidth: sysModRow.implicitWidth + Appearance.padding.smaller + Appearance.padding.normal
|
||||
radius: Appearance.rounding.full
|
||||
topLeftRadius: Appearance.rounding.smallest / 2
|
||||
|
||||
Row {
|
||||
RowLayout {
|
||||
id: sysModRow
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Appearance.padding.smaller
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
|
||||
AudioWidget {
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: hasContent ? Appearance.spacing.extraSmall : 0
|
||||
objectName: "audioWidget"
|
||||
|
||||
Behavior on Layout.rightMargin {
|
||||
Anim {
|
||||
type: Anim.FastEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UPowerWidget {
|
||||
height: parent.height
|
||||
Layout.fillHeight: true
|
||||
objectName: "upowerWidget"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,25 +11,68 @@ RowLayout {
|
||||
id: root
|
||||
|
||||
property color barColor: DynamicColors.palette.m3primary
|
||||
readonly property bool hasContent: mic.visible || speaker.visible
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
|
||||
width: hasContent ? implicitWidth : 0
|
||||
|
||||
MaterialIcon {
|
||||
id: mic
|
||||
|
||||
readonly property bool shouldBeVisible: Config.bar.tray.showMicrophone
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.maximumWidth: shouldBeVisible ? implicitWidth : 0
|
||||
animate: true
|
||||
color: (Audio.sourceMuted ?? false) ? DynamicColors.palette.m3error : root.textColor
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
opacity: shouldBeVisible ? 1 : 0
|
||||
scale: shouldBeVisible ? 1 : 0
|
||||
text: Audio.sourceMuted ? "mic_off" : "mic"
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
id: speaker
|
||||
|
||||
readonly property bool shouldBeVisible: Config.bar.tray.showAudio
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.maximumWidth: shouldBeVisible ? implicitWidth : 0
|
||||
animate: true
|
||||
color: Audio.muted ? DynamicColors.palette.m3error : root.textColor
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
opacity: shouldBeVisible ? 1 : 0
|
||||
scale: shouldBeVisible ? 1 : 0
|
||||
text: Audio.muted ? "volume_off" : "volume_up"
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.maximumWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,32 @@ import qs.Helpers
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property bool shouldBeActive: Config.bar.tray.showPower
|
||||
|
||||
Layout.preferredHeight: shouldBeActive ? implicitHeight : 0
|
||||
Layout.preferredWidth: shouldBeActive ? implicitWidth : 0
|
||||
implicitHeight: Battery.isLaptop ? batteryIconLoader.item.implicitHeight : upowerIconLoader.item.implicitHeight
|
||||
implicitWidth: Battery.isLaptop ? batteryIconLoader.item.implicitWidth : upowerIconLoader.item.implicitWidth
|
||||
opacity: shouldBeActive ? 1 : 0
|
||||
scale: shouldBeActive ? 1 : 0
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on Layout.preferredHeight {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on Layout.preferredWidth {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on scale {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: batteryIconLoader
|
||||
|
||||
@@ -12,7 +12,7 @@ CustomRect {
|
||||
property color textColor: DynamicColors.palette.m3onSurface
|
||||
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smallest * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smallest * 2
|
||||
implicitWidth: contentRow.implicitWidth + Appearance.spacing.small * 2
|
||||
radius: Appearance.rounding.full
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Item {
|
||||
readonly property int workspacesShown: workspaces.length
|
||||
|
||||
height: implicitHeight
|
||||
implicitHeight: Config.barConfig.height + Appearance.padding.smaller * 2
|
||||
implicitHeight: Config.bar.height + Appearance.padding.smaller * 2
|
||||
implicitWidth: (root.workspaceButtonWidth * root.workspacesShown) + root.activeWorkspaceMargin * 2
|
||||
|
||||
Behavior on implicitWidth {
|
||||
|
||||
Reference in New Issue
Block a user