mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Implement font family changes
This commit is contained in:
@@ -48,6 +48,9 @@ Singleton {
|
||||
property string wallpaperLastPath: ""
|
||||
property string profileLastPath: ""
|
||||
property bool doNotDisturb: false
|
||||
property string fontFamily: "Noto Sans"
|
||||
property string monoFontFamily: "JetBrains Mono"
|
||||
property int fontWeight: Font.Normal
|
||||
readonly property string _homeUrl: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||
|
||||
function loadSettings() {
|
||||
@@ -92,6 +95,9 @@ Singleton {
|
||||
wallpaperLastPath = settings.wallpaperLastPath !== undefined ? settings.wallpaperLastPath : "";
|
||||
profileLastPath = settings.profileLastPath !== undefined ? settings.profileLastPath : "";
|
||||
doNotDisturb = settings.doNotDisturb !== undefined ? settings.doNotDisturb : false;
|
||||
fontFamily = settings.fontFamily !== undefined ? settings.fontFamily : "Noto Sans";
|
||||
monoFontFamily = settings.monoFontFamily !== undefined ? settings.monoFontFamily : "JetBrains Mono";
|
||||
fontWeight = settings.fontWeight !== undefined ? settings.fontWeight : Font.Normal;
|
||||
applyStoredTheme();
|
||||
detectAvailableIconThemes();
|
||||
detectQtTools();
|
||||
@@ -140,7 +146,10 @@ Singleton {
|
||||
"wallpaperDynamicTheming": wallpaperDynamicTheming,
|
||||
"wallpaperLastPath": wallpaperLastPath,
|
||||
"profileLastPath": profileLastPath,
|
||||
"doNotDisturb": doNotDisturb
|
||||
"doNotDisturb": doNotDisturb,
|
||||
"fontFamily": fontFamily,
|
||||
"monoFontFamily": monoFontFamily,
|
||||
"fontWeight": fontWeight
|
||||
}, null, 2));
|
||||
}
|
||||
|
||||
@@ -406,8 +415,8 @@ Singleton {
|
||||
"remove_icon_theme " + home + "/.config/qt5ct/qt5ct.conf\n" +
|
||||
"remove_icon_theme " + home + "/.config/qt6ct/qt6ct.conf\n" +
|
||||
"rm -f " + home + "/.config/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
||||
"systemctl --user import-environment --unset=QT_QPA_PLATFORMTHEME 2>/dev/null || true\n" +
|
||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME= 2>/dev/null || true\n" +
|
||||
"systemctl --user import-environment --unset=QT_QPA_PLATFORMTHEME --unset=QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME= QT_QPA_PLATFORMTHEME_QT6= 2>/dev/null || true\n" +
|
||||
"rm -rf " + home + "/.cache/icon-cache " + home + "/.cache/thumbnails 2>/dev/null || true\n";
|
||||
|
||||
Quickshell.execDetached(["sh", "-lc", revertScript]);
|
||||
@@ -440,14 +449,14 @@ Singleton {
|
||||
"update_qt_config " + home + "/.config/qt5ct/qt5ct.conf " + _shq(qtThemeName) + "\n" +
|
||||
"update_qt_config " + home + "/.config/qt6ct/qt6ct.conf " + _shq(qtThemeName) + "\n" +
|
||||
"if command -v qt6ct >/dev/null 2>&1; then\n" +
|
||||
" printf 'QT_QPA_PLATFORMTHEME=qt6ct\\n' > " + home + "/.config/environment.d/95-qtct.conf\n" +
|
||||
" printf 'QT_QPA_PLATFORMTHEME=qt6ct\\nQT_QPA_PLATFORMTHEME_QT6=qt6ct\\n' > " + home + "/.config/environment.d/95-qtct.conf\n" +
|
||||
"elif command -v qt5ct >/dev/null 2>&1; then\n" +
|
||||
" printf 'QT_QPA_PLATFORMTHEME=qt5ct\\n' > " + home + "/.config/environment.d/95-qtct.conf\n" +
|
||||
"else\n" +
|
||||
" rm -f " + home + "/.config/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
||||
"fi\n" +
|
||||
"systemctl --user import-environment QT_QPA_PLATFORMTHEME 2>/dev/null || true\n" +
|
||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME 2>/dev/null || true\n" +
|
||||
"systemctl --user import-environment QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||
"rm -rf " + home + "/.cache/icon-cache " + home + "/.cache/thumbnails 2>/dev/null || true\n";
|
||||
|
||||
Quickshell.execDetached(["sh", "-lc", script]);
|
||||
@@ -513,6 +522,21 @@ Singleton {
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function setFontFamily(family) {
|
||||
fontFamily = family;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function setFontWeight(weight) {
|
||||
fontWeight = weight;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function setMonoFontFamily(family) {
|
||||
monoFontFamily = family;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
// Helper to safely single-quote shell strings
|
||||
function _shq(s) {
|
||||
return "'" + String(s).replace(/'/g, "'\\''") + "'";
|
||||
|
||||
@@ -192,7 +192,7 @@ PanelWindow {
|
||||
width: parent.width
|
||||
height: 40
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "Applications"
|
||||
font.pixelSize: Theme.fontSizeLarge + 4
|
||||
@@ -205,7 +205,7 @@ PanelWindow {
|
||||
height: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: appLauncher.model.count + " apps"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -30,7 +30,7 @@ Item {
|
||||
color: selectedCategory === modelData ? Theme.primary : "transparent"
|
||||
border.color: selectedCategory === modelData ? "transparent" : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
color: selectedCategory === modelData ? Theme.surface : Theme.surfaceText
|
||||
@@ -80,7 +80,7 @@ Item {
|
||||
color: selectedCategory === modelData ? Theme.primary : "transparent"
|
||||
border.color: selectedCategory === modelData ? "transparent" : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
color: selectedCategory === modelData ? Theme.surface : Theme.surfaceText
|
||||
@@ -124,7 +124,7 @@ Item {
|
||||
color: selectedCategory === modelData ? Theme.primary : "transparent"
|
||||
border.color: selectedCategory === modelData ? "transparent" : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.3)
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
color: selectedCategory === modelData ? Theme.surface : Theme.surfaceText
|
||||
|
||||
@@ -80,7 +80,7 @@ Column {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width - 80
|
||||
height: 40
|
||||
text: Qt.formatDate(displayDate, "MMMM yyyy")
|
||||
@@ -134,7 +134,7 @@ Column {
|
||||
height: 32
|
||||
color: "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
@@ -188,7 +188,7 @@ Column {
|
||||
radius: Theme.cornerRadiusSmall
|
||||
clip: true
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: dayDate.getDate()
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -75,7 +75,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: hasEvents ? (Qt.formatDate(selectedDate, "MMM d") + " • " + (selectedDateEvents.length === 1 ? "1 event" : selectedDateEvents.length + " events")) : Qt.formatDate(selectedDate, "MMM d")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -98,7 +98,7 @@ Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "No events"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5)
|
||||
@@ -179,7 +179,7 @@ Rectangle {
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
spacing: 6
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: modelData.title
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
@@ -208,7 +208,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (modelData.allDay) {
|
||||
return "All day";
|
||||
@@ -244,7 +244,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.location
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
|
||||
@@ -96,7 +96,7 @@ Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "No Media Playing"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
@@ -167,7 +167,7 @@ Rectangle {
|
||||
height: parent.height
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: activePlayer && activePlayer.trackTitle || lastValidTitle || "Unknown Track"
|
||||
onTextChanged: {
|
||||
if (activePlayer && activePlayer.trackTitle)
|
||||
@@ -181,7 +181,7 @@ Rectangle {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: activePlayer && activePlayer.trackArtist || lastValidArtist || "Unknown Artist"
|
||||
onTextChanged: {
|
||||
if (activePlayer && activePlayer.trackArtist)
|
||||
@@ -194,7 +194,7 @@ Rectangle {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: activePlayer && activePlayer.trackAlbum || lastValidAlbum || ""
|
||||
onTextChanged: {
|
||||
if (activePlayer && activePlayer.trackAlbum)
|
||||
|
||||
@@ -33,7 +33,7 @@ Rectangle {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "No Weather Data"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
@@ -70,7 +70,7 @@ Rectangle {
|
||||
spacing: Theme.spacingXS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (Prefs.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp) + "°" + (Prefs.useFahrenheit ? "F" : "C")
|
||||
font.pixelSize: Theme.fontSizeXLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -90,7 +90,7 @@ Rectangle {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: WeatherService.weather.city || ""
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
@@ -119,7 +119,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: WeatherService.weather.humidity ? WeatherService.weather.humidity + "%" : "--"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -138,7 +138,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: WeatherService.weather.wind || "--"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -157,7 +157,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: WeatherService.weather.sunrise || "--"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -176,7 +176,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: WeatherService.weather.sunset || "--"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -16,7 +16,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Output Device"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -44,7 +44,7 @@ Column {
|
||||
color: Theme.primary
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Current: " + (root.currentSinkDisplayName || "None")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.primary
|
||||
@@ -101,14 +101,14 @@ Column {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: AudioService.displayName(modelData)
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: modelData === AudioService.sink ? Theme.primary : Theme.surfaceText
|
||||
font.weight: modelData === AudioService.sink ? Font.Medium : Font.Normal
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (AudioService.subtitle(modelData.name) && AudioService.subtitle(modelData.name) !== "")
|
||||
return AudioService.subtitle(modelData.name) + (modelData === AudioService.sink ? " • Selected" : "");
|
||||
|
||||
@@ -16,7 +16,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Input Device"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -44,7 +44,7 @@ Column {
|
||||
color: Theme.primary
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Current: " + (root.currentSourceDisplayName || "None")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.primary
|
||||
@@ -99,14 +99,14 @@ Column {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: AudioService.displayName(modelData)
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: modelData === AudioService.source ? Theme.primary : Theme.surfaceText
|
||||
font.weight: modelData === AudioService.source ? Font.Medium : Font.Normal
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (AudioService.subtitle(modelData.name) && AudioService.subtitle(modelData.name) !== "")
|
||||
return AudioService.subtitle(modelData.name) + (modelData === AudioService.source ? " • Selected" : "");
|
||||
|
||||
@@ -16,7 +16,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Microphone Level"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -112,7 +112,7 @@ Column {
|
||||
visible: (micMouseArea.containsMouse && !root.micMuted) || micMouseArea.isDragging
|
||||
opacity: visible ? 1 : 0
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: tooltipText
|
||||
text: Math.round(root.micLevel) + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
|
||||
@@ -12,7 +12,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Volume"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -19,7 +19,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Available Devices"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -52,7 +52,7 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: scanText
|
||||
|
||||
text: BluetoothService.adapter && BluetoothService.adapter.discovering ? "Stop Scanning" : "Scan"
|
||||
@@ -103,7 +103,7 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Pairing Limitation"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.warning
|
||||
@@ -112,7 +112,7 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Quickshell does not support pairing devices that require pin or confirmation."
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.8)
|
||||
@@ -188,7 +188,7 @@ Column {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.name || modelData.deviceName
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: {
|
||||
@@ -209,7 +209,7 @@ Column {
|
||||
Row {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (modelData.pairing)
|
||||
return "Pairing...";
|
||||
@@ -236,7 +236,7 @@ Column {
|
||||
visible: modelData.signalStrength !== undefined && modelData.signalStrength > 0 && !modelData.pairing && !modelData.blocked
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (modelData.signalStrength !== undefined && modelData.signalStrength > 0) ? modelData.signalStrength + "%" : ""
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.5)
|
||||
@@ -268,7 +268,7 @@ Column {
|
||||
border.width: 1
|
||||
opacity: canConnect || isBusy ? 1 : 0.5
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: {
|
||||
if (modelData.pairing)
|
||||
@@ -349,7 +349,7 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Scanning for devices..."
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -358,7 +358,7 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Make sure your device is in pairing mode"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
@@ -366,7 +366,7 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "No devices found. Put your device in pairing mode and click Start Scanning."
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
|
||||
@@ -84,7 +84,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: root.deviceData && root.deviceData.connected ? "Disconnect" : "Connect"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -153,7 +153,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Forget Device"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: forgetArea.containsMouse ? Theme.error : Theme.surfaceText
|
||||
|
||||
@@ -35,14 +35,14 @@ Rectangle {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Bluetooth"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: BluetoothService.adapter && BluetoothService.adapter.enabled ? Theme.primary : Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BluetoothService.adapter && BluetoothService.adapter.enabled ? "Enabled" : "Disabled"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
|
||||
@@ -17,7 +17,7 @@ Column {
|
||||
spacing: Theme.spacingM
|
||||
visible: BluetoothService.adapter && BluetoothService.adapter.enabled
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Paired Devices"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -54,7 +54,7 @@ Column {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.name || modelData.deviceName
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: modelData.connected ? Theme.primary : Theme.surfaceText
|
||||
@@ -64,13 +64,13 @@ Column {
|
||||
Row {
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BluetoothDeviceState.toString(modelData.state)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (modelData.batteryAvailable && modelData.battery > 0)
|
||||
return "• " + Math.round(modelData.battery * 100) + "%";
|
||||
|
||||
@@ -214,14 +214,14 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: UserInfoService.fullName || UserInfoService.username || "User"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Uptime: " + (UserInfoService.uptime || "Unknown")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -381,7 +381,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Logout"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: logoutButton.containsMouse ? Theme.warning : Theme.surfaceText
|
||||
@@ -431,7 +431,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Restart"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: rebootButton.containsMouse ? Theme.warning : Theme.surfaceText
|
||||
@@ -481,7 +481,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Suspend"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: suspendButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||
@@ -531,7 +531,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Shutdown"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: shutdownButton.containsMouse ? Theme.error : Theme.surfaceText
|
||||
|
||||
@@ -33,7 +33,7 @@ ScrollView {
|
||||
spacing: Theme.spacingM
|
||||
visible: BrightnessService.brightnessAvailable
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Brightness"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -58,7 +58,7 @@ ScrollView {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "using ddc - changes may take a moment to apply"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -73,7 +73,7 @@ ScrollView {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Display Settings"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -105,7 +105,7 @@ ScrollView {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Night Mode"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Prefs.nightModeEnabled ? Theme.primary : Theme.surfaceText
|
||||
@@ -156,7 +156,7 @@ ScrollView {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: Theme.isLightMode ? "Light Mode" : "Dark Mode"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.isLightMode ? Theme.primary : Theme.surfaceText
|
||||
|
||||
@@ -39,7 +39,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Ethernet"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: NetworkService.networkStatus === "ethernet" ? Theme.primary : Theme.surfaceText
|
||||
@@ -49,7 +49,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: NetworkService.ethernetConnected ? (NetworkService.ethernetIP || "Connected") : "Disconnected"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
|
||||
@@ -60,7 +60,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (!NetworkService.wifiEnabled) {
|
||||
return "WiFi is off";
|
||||
@@ -78,7 +78,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
if (!NetworkService.wifiEnabled) {
|
||||
return "Turn on WiFi to see networks";
|
||||
|
||||
@@ -101,7 +101,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: wifiContextMenuWindow.networkData && wifiContextMenuWindow.networkData.connected ? "Disconnect" : "Connect"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -182,7 +182,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Forget Network"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: forgetWifiArea.containsMouse ? Theme.error : Theme.surfaceText
|
||||
@@ -233,7 +233,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Network Info"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -37,7 +37,7 @@ Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Available Networks"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -150,7 +150,7 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: modelData.ssid
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
@@ -159,7 +159,7 @@ Column {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: {
|
||||
if (modelData.connected)
|
||||
|
||||
@@ -167,7 +167,7 @@ Item {
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "WiFi is turned off"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
@@ -175,7 +175,7 @@ Item {
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Turn on WiFi to see networks"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -69,7 +69,7 @@ PanelWindow {
|
||||
Row {
|
||||
width: parent.width
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Power Options"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -119,7 +119,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Log Out"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -166,7 +166,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Suspend"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -213,7 +213,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Reboot"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: rebootArea.containsMouse ? Theme.warning : Theme.surfaceText
|
||||
@@ -260,7 +260,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Power Off"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: powerOffArea.containsMouse ? Theme.error : Theme.surfaceText
|
||||
|
||||
@@ -110,7 +110,7 @@ Item {
|
||||
width: 400
|
||||
height: 140
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: clockText
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
@@ -128,7 +128,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: clockText.bottom
|
||||
anchors.topMargin: -20
|
||||
@@ -298,7 +298,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: placeholder
|
||||
anchors.left: lockIcon.right
|
||||
anchors.leftMargin: Theme.spacingM
|
||||
@@ -334,7 +334,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.left: lockIcon.right
|
||||
anchors.leftMargin: Theme.spacingM
|
||||
anchors.right: (revealButton.visible ? revealButton.left : (enterButton.visible ? enterButton.left : (loadingSpinner.visible ? loadingSpinner.left : parent.right)))
|
||||
@@ -470,7 +470,7 @@ Item {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: placeholder.pamState ? 20 : 0
|
||||
text: {
|
||||
@@ -501,7 +501,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.margins: Theme.spacingXL
|
||||
@@ -512,7 +512,7 @@ Item {
|
||||
visible: demoMode
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: Theme.spacingXL
|
||||
@@ -525,7 +525,7 @@ Item {
|
||||
visible: text !== ""
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.margins: Theme.spacingXL
|
||||
@@ -579,7 +579,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.margins: Theme.spacingL
|
||||
@@ -671,7 +671,7 @@ Item {
|
||||
color: Theme.error
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Power off this computer?"
|
||||
color: Theme.surfaceText
|
||||
@@ -690,7 +690,7 @@ Item {
|
||||
color: cancelMouse1.pressed ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.7) :
|
||||
cancelMouse1.containsMouse ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.9) : Theme.surfaceVariant
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Cancel"
|
||||
color: Theme.surfaceText
|
||||
@@ -713,7 +713,7 @@ Item {
|
||||
color: powerMouse.pressed ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.8) :
|
||||
powerMouse.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 1.0) : Theme.error
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Power Off"
|
||||
color: "white"
|
||||
@@ -767,7 +767,7 @@ Item {
|
||||
color: Theme.primary
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Restart this computer?"
|
||||
color: Theme.surfaceText
|
||||
@@ -786,7 +786,7 @@ Item {
|
||||
color: cancelMouse2.pressed ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.7) :
|
||||
cancelMouse2.containsMouse ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.9) : Theme.surfaceVariant
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Cancel"
|
||||
color: Theme.surfaceText
|
||||
@@ -809,7 +809,7 @@ Item {
|
||||
color: rebootMouse.pressed ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.8) :
|
||||
rebootMouse.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 1.0) : Theme.primary
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Restart"
|
||||
color: "white"
|
||||
@@ -863,7 +863,7 @@ Item {
|
||||
color: Theme.primary
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "End this session?"
|
||||
color: Theme.surfaceText
|
||||
@@ -882,7 +882,7 @@ Item {
|
||||
color: cancelMouse3.pressed ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.7) :
|
||||
cancelMouse3.containsMouse ? Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g, Theme.surfaceVariant.b, 0.9) : Theme.surfaceVariant
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Cancel"
|
||||
color: Theme.surfaceText
|
||||
@@ -905,7 +905,7 @@ Item {
|
||||
color: logoutMouse.pressed ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.8) :
|
||||
logoutMouse.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 1.0) : Theme.primary
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: "Log Out"
|
||||
color: "white"
|
||||
|
||||
@@ -95,7 +95,7 @@ Rectangle {
|
||||
visible: status === Image.Ready
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
visible: !parent.hasNotificationImage && (!notificationGroup?.latestNotification?.appIcon || notificationGroup.latestNotification.appIcon === "")
|
||||
text: {
|
||||
@@ -118,7 +118,7 @@ Rectangle {
|
||||
anchors.rightMargin: -2
|
||||
visible: (notificationGroup?.count || 0) > 1
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: (notificationGroup?.count || 0) > 99 ? "99+" : (notificationGroup?.count || 0).toString()
|
||||
color: Theme.primaryText
|
||||
@@ -150,7 +150,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: {
|
||||
const timeStr = notificationGroup?.latestNotification?.timeStr || "";
|
||||
@@ -166,7 +166,7 @@ Rectangle {
|
||||
maximumLineCount: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: notificationGroup?.latestNotification?.summary || ""
|
||||
color: Theme.surfaceText
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
@@ -177,7 +177,7 @@ Rectangle {
|
||||
visible: text.length > 0
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: descriptionText
|
||||
property string fullText: notificationGroup?.latestNotification?.htmlBody || ""
|
||||
property bool hasMoreText: truncated
|
||||
@@ -247,7 +247,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: notificationGroup?.appName || ""
|
||||
color: Theme.surfaceText
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
@@ -265,7 +265,7 @@ Rectangle {
|
||||
visible: (notificationGroup?.count || 0) > 1
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: (notificationGroup?.count || 0) > 99 ? "99+" : (notificationGroup?.count || 0).toString()
|
||||
color: Theme.primaryText
|
||||
@@ -348,7 +348,7 @@ Rectangle {
|
||||
visible: status === Image.Ready
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
visible: !parent.hasNotificationImage && (!modelData?.appIcon || modelData.appIcon === "")
|
||||
text: {
|
||||
@@ -377,7 +377,7 @@ Rectangle {
|
||||
anchors.bottomMargin: 4
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: modelData?.timeStr || ""
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -388,7 +388,7 @@ Rectangle {
|
||||
visible: text.length > 0
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: modelData?.summary || ""
|
||||
color: Theme.surfaceText
|
||||
@@ -399,7 +399,7 @@ Rectangle {
|
||||
visible: text.length > 0
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: bodyText
|
||||
property bool hasMoreText: truncated
|
||||
|
||||
@@ -463,7 +463,7 @@ Rectangle {
|
||||
radius: 4
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: actionText
|
||||
text: modelData.text || ""
|
||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||
@@ -496,7 +496,7 @@ Rectangle {
|
||||
radius: 4
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: dismissText
|
||||
text: "Dismiss"
|
||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||
@@ -542,7 +542,7 @@ Rectangle {
|
||||
radius: 4
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: actionText
|
||||
text: modelData.text || ""
|
||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||
@@ -583,7 +583,7 @@ Rectangle {
|
||||
radius: 6
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: dismissText
|
||||
|
||||
text: "Dismiss"
|
||||
|
||||
@@ -22,7 +22,7 @@ Item {
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.3)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "Nothing to see here"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
|
||||
@@ -15,7 +15,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Notifications"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -46,7 +46,7 @@ Item {
|
||||
visible: doNotDisturbButton.children[1].containsMouse // Access StateLayer's containsMouse
|
||||
opacity: visible ? 1 : 0
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: tooltipText
|
||||
|
||||
text: "Do Not Disturb"
|
||||
@@ -90,7 +90,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Clear All"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: clearArea.containsMouse ? Theme.primary : Theme.surfaceText
|
||||
|
||||
@@ -182,7 +182,7 @@ PanelWindow {
|
||||
visible: status === Image.Ready
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
visible: !parent.hasNotificationImage && (!notificationData || !notificationData.appIcon || notificationData.appIcon === "")
|
||||
text: {
|
||||
@@ -216,7 +216,7 @@ PanelWindow {
|
||||
width: parent.width
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: {
|
||||
if (!notificationData) return "";
|
||||
@@ -234,7 +234,7 @@ PanelWindow {
|
||||
maximumLineCount: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: notificationData ? (notificationData.summary || "") : ""
|
||||
color: Theme.surfaceText
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
@@ -245,7 +245,7 @@ PanelWindow {
|
||||
visible: text.length > 0
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: notificationData ? (notificationData.htmlBody || "") : ""
|
||||
color: Theme.surfaceVariantText
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
@@ -304,7 +304,7 @@ PanelWindow {
|
||||
radius: 4
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: actionText
|
||||
text: modelData.text || ""
|
||||
color: parent.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||
@@ -348,7 +348,7 @@ PanelWindow {
|
||||
color: isHovered ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.1) : "transparent"
|
||||
z: 20
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: dismissText
|
||||
text: "Dismiss"
|
||||
color: dismissButton.isHovered ? Theme.primary : Theme.surfaceVariantText
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
@@ -57,7 +58,7 @@ Column {
|
||||
height: 32
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "CPU"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
@@ -72,7 +73,7 @@ Column {
|
||||
color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalCpuUsage.toFixed(1) + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -87,7 +88,7 @@ Column {
|
||||
height: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.cpuCount + " cores"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -115,7 +116,7 @@ Column {
|
||||
height: 20
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "C" + index
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -156,7 +157,7 @@ Column {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.perCoreCpuUsage[index] ? SysMonitorService.perCoreCpuUsage[index].toFixed(0) + "%" : "0%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -195,14 +196,14 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Memory"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.formatSystemMemory(SysMonitorService.usedMemoryKB) + " / " + SysMonitorService.formatSystemMemory(SysMonitorService.totalMemoryKB)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -252,7 +253,7 @@ Column {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalMemoryKB > 0 ? ((SysMonitorService.usedMemoryKB / SysMonitorService.totalMemoryKB) * 100).toFixed(1) + "% used" : "No data"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -270,14 +271,14 @@ Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Swap"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalSwapKB > 0 ?
|
||||
SysMonitorService.formatSystemMemory(SysMonitorService.usedSwapKB) + " / " + SysMonitorService.formatSystemMemory(SysMonitorService.totalSwapKB) :
|
||||
"No swap configured"
|
||||
@@ -323,7 +324,7 @@ Column {
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalSwapKB > 0 ? ((SysMonitorService.usedSwapKB / SysMonitorService.totalSwapKB) * 100).toFixed(1) + "% used" : "Not available"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -353,7 +354,7 @@ Column {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Network"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.Bold
|
||||
@@ -368,13 +369,13 @@ Column {
|
||||
Row {
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "↓"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.info
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.networkRxRate > 0 ? formatNetworkSpeed(SysMonitorService.networkRxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -386,13 +387,13 @@ Column {
|
||||
Row {
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "↑"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.error
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.networkTxRate > 0 ? formatNetworkSpeed(SysMonitorService.networkTxRate) : "0 B/s"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -419,7 +420,7 @@ Column {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Disk"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.Bold
|
||||
@@ -434,13 +435,13 @@ Column {
|
||||
Row {
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "R"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primary
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: formatDiskSpeed(SysMonitorService.diskReadRate)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -452,13 +453,13 @@ Column {
|
||||
Row {
|
||||
spacing: 4
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "W"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.warning
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: formatDiskSpeed(SysMonitorService.diskWriteRate)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
|
||||
@@ -4,6 +4,7 @@ import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Popup {
|
||||
id: processContextMenu
|
||||
@@ -80,7 +81,7 @@ Popup {
|
||||
radius: Theme.cornerRadiusSmall
|
||||
color: copyPidArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -110,7 +111,7 @@ Popup {
|
||||
radius: Theme.cornerRadiusSmall
|
||||
color: copyNameArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent"
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -157,7 +158,7 @@ Popup {
|
||||
enabled: processContextMenu.processData
|
||||
opacity: enabled ? 1 : 0.5
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -190,7 +191,7 @@ Popup {
|
||||
enabled: processContextMenu.processData && processContextMenu.processData.pid > 1000
|
||||
opacity: enabled ? 1 : 0.5
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -65,9 +65,10 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: process ? process.displayName : ""
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: Font.Medium
|
||||
color: Theme.surfaceText
|
||||
width: 250
|
||||
@@ -96,9 +97,10 @@ Rectangle {
|
||||
anchors.rightMargin: 194
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.formatCpuUsage(process ? process.cpu : 0)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: Font.Bold
|
||||
color: {
|
||||
if (process && process.cpu > 80)
|
||||
@@ -133,9 +135,10 @@ Rectangle {
|
||||
anchors.rightMargin: 102
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.formatMemoryUsage(process ? process.memoryKB : 0)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: Font.Bold
|
||||
color: {
|
||||
if (process && process.memoryKB > 1024 * 1024)
|
||||
@@ -151,9 +154,10 @@ Rectangle {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: process ? process.pid.toString() : ""
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
color: Theme.surfaceText
|
||||
opacity: 0.7
|
||||
width: 50
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Column {
|
||||
id: root
|
||||
@@ -31,9 +32,10 @@ Column {
|
||||
anchors.leftMargin: 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Process"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: SysMonitorService.sortBy === "name" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: SysMonitorService.sortBy === "name" ? 1.0 : 0.7
|
||||
@@ -66,9 +68,10 @@ Column {
|
||||
anchors.rightMargin: 200
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "CPU"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: SysMonitorService.sortBy === "cpu" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: SysMonitorService.sortBy === "cpu" ? 1.0 : 0.7
|
||||
@@ -101,9 +104,10 @@ Column {
|
||||
anchors.rightMargin: 112
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "RAM"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: SysMonitorService.sortBy === "memory" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: SysMonitorService.sortBy === "memory" ? 1.0 : 0.7
|
||||
@@ -136,9 +140,10 @@ Column {
|
||||
anchors.rightMargin: 53
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "PID"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.family: Prefs.monoFontFamily
|
||||
font.weight: SysMonitorService.sortBy === "pid" ? Font.Bold : Font.Medium
|
||||
color: Theme.surfaceText
|
||||
opacity: SysMonitorService.sortBy === "pid" ? 1.0 : 0.7
|
||||
@@ -172,7 +177,7 @@ Column {
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.sortDescending ? "↓" : "↑"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
@@ -44,7 +45,7 @@ Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "CPU"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -52,14 +53,14 @@ Row {
|
||||
opacity: SysMonitorService.sortBy === "cpu" ? 1 : 0.8
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalCpuUsage.toFixed(1) + "%"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.cpuCount + " cores"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -114,7 +115,7 @@ Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Memory"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -122,14 +123,14 @@ Row {
|
||||
opacity: SysMonitorService.sortBy === "memory" ? 1 : 0.8
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.formatSystemMemory(SysMonitorService.usedMemoryKB)
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "of " + SysMonitorService.formatSystemMemory(SysMonitorService.totalMemoryKB)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -168,7 +169,7 @@ Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Swap"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -176,14 +177,14 @@ Row {
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalSwapKB > 0 ? SysMonitorService.formatSystemMemory(SysMonitorService.usedSwapKB) : "None"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.totalSwapKB > 0 ? "of " + SysMonitorService.formatSystemMemory(SysMonitorService.totalSwapKB) : "No swap configured"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -51,26 +51,26 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.hostname
|
||||
font.pixelSize: Theme.fontSizeXLarge
|
||||
font.weight: Font.Light
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.distribution + " • " + SysMonitorService.architecture + " • " + SysMonitorService.kernelVersion
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.7)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Up " + UserInfoService.uptime + " • Boot: " + SysMonitorService.bootTime
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Load: " + SysMonitorService.loadAverage + " • " + SysMonitorService.processCount + " processes, " + SysMonitorService.threadCount + " threads"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g, Theme.surfaceText.b, 0.6)
|
||||
@@ -94,7 +94,7 @@ ScrollView {
|
||||
width: (parent.width - Theme.spacingXL) / 2
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.cpuModel
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -103,7 +103,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.motherboard
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -118,7 +118,7 @@ ScrollView {
|
||||
width: (parent.width - Theme.spacingXL) / 2
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: SysMonitorService.formatMemory(SysMonitorService.totalMemoryMB) + " Memory"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -127,7 +127,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "BIOS " + SysMonitorService.biosVersion
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -171,7 +171,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Storage & Disks"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
font.weight: Font.Bold
|
||||
@@ -191,7 +191,7 @@ ScrollView {
|
||||
height: 24
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Device"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -200,7 +200,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Mount"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -209,7 +209,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Size"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -218,7 +218,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Used"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -227,7 +227,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Available"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -236,7 +236,7 @@ ScrollView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Use%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Bold
|
||||
@@ -269,7 +269,7 @@ ScrollView {
|
||||
anchors.fill: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.device
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -278,7 +278,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.mount
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -287,7 +287,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.size
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -296,7 +296,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.used
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -305,7 +305,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.avail
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
@@ -314,7 +314,7 @@ ScrollView {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.percent
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: {
|
||||
|
||||
@@ -85,7 +85,7 @@ ScrollView {
|
||||
DankDropdown {
|
||||
width: parent.width
|
||||
text: "Icon Theme"
|
||||
description: "Select icon theme (may require logout to apply)"
|
||||
description: "Select icon theme"
|
||||
currentValue: Prefs.iconTheme
|
||||
options: Prefs.availableIconThemes
|
||||
onValueChanged: (value) => {
|
||||
@@ -95,6 +95,139 @@ ScrollView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
width: parent.width
|
||||
text: "Font Family"
|
||||
description: "Select system font family"
|
||||
currentValue: Prefs.fontFamily || "System Default"
|
||||
options: {
|
||||
var fonts = ["System Default"];
|
||||
var availableFonts = Qt.fontFamilies();
|
||||
var rootFamilies = [];
|
||||
var seenFamilies = new Set();
|
||||
|
||||
// Filter to root family names by removing common weight/style suffixes
|
||||
for (var i = 0; i < availableFonts.length; i++) {
|
||||
var fontName = availableFonts[i];
|
||||
|
||||
// Skip fonts beginning with . (like .AppleSystem)
|
||||
if (fontName.startsWith(".")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var rootName = fontName
|
||||
.replace(/ (Thin|Extra Light|Light|Regular|Medium|Semi Bold|Demi Bold|Bold|Extra Bold|Black|Heavy)$/i, "")
|
||||
.replace(/ (Italic|Oblique|Condensed|Extended|Narrow|Wide)$/i, "")
|
||||
.replace(/ (UI|Display|Text|Mono|Sans|Serif)$/i, function(match, suffix) {
|
||||
// Keep these suffixes as they're part of the family name
|
||||
return match;
|
||||
})
|
||||
.trim();
|
||||
|
||||
if (!seenFamilies.has(rootName) && rootName !== "") {
|
||||
seenFamilies.add(rootName);
|
||||
rootFamilies.push(rootName);
|
||||
}
|
||||
}
|
||||
|
||||
return fonts.concat(rootFamilies.sort());
|
||||
}
|
||||
onValueChanged: (value) => {
|
||||
Prefs.setFontFamily(value === "System Default" ? "Noto Sans" : value);
|
||||
}
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
width: parent.width
|
||||
text: "Font Weight"
|
||||
description: "Select font weight"
|
||||
currentValue: {
|
||||
switch(Prefs.fontWeight) {
|
||||
case Font.Thin: return "Thin";
|
||||
case Font.ExtraLight: return "Extra Light";
|
||||
case Font.Light: return "Light";
|
||||
case Font.Normal: return "Regular";
|
||||
case Font.Medium: return "Medium";
|
||||
case Font.DemiBold: return "Demi Bold";
|
||||
case Font.Bold: return "Bold";
|
||||
case Font.ExtraBold: return "Extra Bold";
|
||||
case Font.Black: return "Black";
|
||||
default: return "Regular";
|
||||
}
|
||||
}
|
||||
options: ["Thin", "Extra Light", "Light", "Regular", "Medium", "Demi Bold", "Bold", "Extra Bold", "Black"]
|
||||
onValueChanged: (value) => {
|
||||
var weight;
|
||||
switch(value) {
|
||||
case "Thin": weight = Font.Thin; break;
|
||||
case "Extra Light": weight = Font.ExtraLight; break;
|
||||
case "Light": weight = Font.Light; break;
|
||||
case "Regular": weight = Font.Normal; break;
|
||||
case "Medium": weight = Font.Medium; break;
|
||||
case "Demi Bold": weight = Font.DemiBold; break;
|
||||
case "Bold": weight = Font.Bold; break;
|
||||
case "Extra Bold": weight = Font.ExtraBold; break;
|
||||
case "Black": weight = Font.Black; break;
|
||||
default: weight = Font.Normal; break;
|
||||
}
|
||||
Prefs.setFontWeight(weight);
|
||||
}
|
||||
}
|
||||
|
||||
DankDropdown {
|
||||
width: parent.width
|
||||
text: "Monospace Font"
|
||||
description: "Select monospace font for process list and technical displays"
|
||||
currentValue: Prefs.monoFontFamily || "System Default"
|
||||
options: {
|
||||
var fonts = ["System Default"];
|
||||
var availableFonts = Qt.fontFamilies();
|
||||
var monoFamilies = [];
|
||||
var seenFamilies = new Set();
|
||||
|
||||
// Filter to likely monospace fonts
|
||||
for (var i = 0; i < availableFonts.length; i++) {
|
||||
var fontName = availableFonts[i];
|
||||
|
||||
// Skip fonts beginning with .
|
||||
if (fontName.startsWith(".")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Look for common monospace indicators
|
||||
var lowerName = fontName.toLowerCase();
|
||||
if (lowerName.includes("mono") ||
|
||||
lowerName.includes("code") ||
|
||||
lowerName.includes("console") ||
|
||||
lowerName.includes("terminal") ||
|
||||
lowerName.includes("courier") ||
|
||||
lowerName.includes("dejavu sans mono") ||
|
||||
lowerName.includes("jetbrains") ||
|
||||
lowerName.includes("fira") ||
|
||||
lowerName.includes("hack") ||
|
||||
lowerName.includes("source code") ||
|
||||
lowerName.includes("ubuntu mono") ||
|
||||
lowerName.includes("cascadia")) {
|
||||
|
||||
var rootName = fontName
|
||||
.replace(/ (Thin|Extra Light|Light|Regular|Medium|Semi Bold|Demi Bold|Bold|Extra Bold|Black|Heavy)$/i, "")
|
||||
.replace(/ (Italic|Oblique|Condensed|Extended|Narrow|Wide)$/i, "")
|
||||
.trim();
|
||||
|
||||
if (!seenFamilies.has(rootName) && rootName !== "") {
|
||||
seenFamilies.add(rootName);
|
||||
monoFamilies.push(rootName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fonts.concat(monoFamilies.sort());
|
||||
}
|
||||
onValueChanged: (value) => {
|
||||
Prefs.setMonoFontFamily(value === "System Default" ? "JetBrains Mono" : value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ Column {
|
||||
visible: root.collapsible
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: root.title
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -74,7 +74,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: ToastService.currentMessage
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.background
|
||||
|
||||
@@ -63,7 +63,7 @@ Rectangle {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryLevel + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
@@ -116,7 +116,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: tooltipText
|
||||
|
||||
text: {
|
||||
|
||||
@@ -143,7 +143,7 @@ PanelWindow {
|
||||
Row {
|
||||
width: parent.width
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryAvailable ? "Battery Information" : "Power Management"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -221,7 +221,7 @@ PanelWindow {
|
||||
Row {
|
||||
spacing: Theme.spacingM
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryLevel + "%"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: {
|
||||
@@ -236,7 +236,7 @@ PanelWindow {
|
||||
font.weight: Font.Bold
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryStatus
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: {
|
||||
@@ -254,7 +254,7 @@ PanelWindow {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: {
|
||||
let time = BatteryService.formatTimeRemaining();
|
||||
if (time !== "Unknown")
|
||||
@@ -298,14 +298,14 @@ PanelWindow {
|
||||
spacing: Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "No Battery Detected"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Power profile management is available"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceTextMedium
|
||||
@@ -323,7 +323,7 @@ PanelWindow {
|
||||
spacing: Theme.spacingM
|
||||
visible: BatteryService.batteryAvailable
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Battery Details"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -339,14 +339,14 @@ PanelWindow {
|
||||
spacing: 2
|
||||
width: (parent.width - Theme.spacingXL) / 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Health"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceTextMedium
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryHealth
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: {
|
||||
@@ -365,14 +365,14 @@ PanelWindow {
|
||||
spacing: 2
|
||||
width: (parent.width - Theme.spacingXL) / 2
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Capacity"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceTextMedium
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: BatteryService.batteryCapacity > 0 ? BatteryService.batteryCapacity.toFixed(1) + " Wh" : "Unknown"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -390,7 +390,7 @@ PanelWindow {
|
||||
spacing: Theme.spacingM
|
||||
visible: true
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Power Profile"
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.surfaceText
|
||||
@@ -429,14 +429,14 @@ PanelWindow {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: Theme.getPowerProfileLabel(modelData)
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: root.isActiveProfile(modelData) ? Theme.primary : Theme.surfaceText
|
||||
font.weight: root.isActiveProfile(modelData) ? Font.Medium : Font.Normal
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: Theme.getPowerProfileDescription(modelData)
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceTextMedium
|
||||
@@ -492,14 +492,14 @@ PanelWindow {
|
||||
spacing: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "Power Profile Degradation"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.error
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (typeof PowerProfiles !== "undefined") ? PerformanceDegradationReason.toString(PowerProfiles.degradationReason) : ""
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.8)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -28,15 +29,14 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: Prefs.use24HourClock ? Qt.formatTime(root.currentDate, "H:mm") : Qt.formatTime(root.currentDate, "h:mm AP")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "•"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.outlineButton
|
||||
@@ -44,11 +44,10 @@ Rectangle {
|
||||
visible: !compactMode
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: Qt.formatDate(root.currentDate, "ddd d")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: !compactMode
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (SysMonitorService.cpuUsage || 0).toFixed(0) + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -31,7 +32,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
spacing: Theme.spacingS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: appText
|
||||
|
||||
text: FocusedWindowService.focusedAppName || ""
|
||||
@@ -44,7 +45,7 @@ Rectangle {
|
||||
width: Math.min(implicitWidth, compactMode ? 80 : 180)
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: "•"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.outlineButton
|
||||
@@ -52,7 +53,7 @@ Rectangle {
|
||||
visible: appText.text && titleText.text
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: titleText
|
||||
|
||||
text: FocusedWindowService.focusedWindowTitle || ""
|
||||
|
||||
@@ -94,7 +94,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: mediaText
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -60,7 +60,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (SysMonitorService.memoryUsage || 0).toFixed(0) + "%"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
|
||||
@@ -4,6 +4,7 @@ import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Widgets
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
@@ -117,7 +118,7 @@ PanelWindow {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.text || ""
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
|
||||
@@ -34,11 +34,10 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: (Prefs.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp) + "°" + (Prefs.useFahrenheit ? "F" : "C")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import QtQuick.Controls
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
@@ -128,7 +129,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
// Show index for placeholders if Prefs.showWorkspaceIndex is true, otherwise show a subtle dot
|
||||
Text {
|
||||
StyledText {
|
||||
visible: Prefs.showWorkspaceIndex
|
||||
anchors.centerIn: parent
|
||||
text: isPlaceholder ? sequentialNumber : sequentialNumber
|
||||
|
||||
@@ -17,7 +17,11 @@ This shell kinda depends on [Niri](https://github.com/YaLTeR/niri), but only for
|
||||
mkdir -p ~/.local/share/fonts && curl -L "https://github.com/google/material-design-icons/raw/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.ttf" -o ~/.local/share/fonts/MaterialSymbolsRounded.ttf && fc-cache -f
|
||||
# Can also be installed from AUR on arch linux, paru -S ttf-material-symbols-variable-git
|
||||
|
||||
# 2 --- QuickShell (recommended to use a git build)
|
||||
# 2 --- JetBrains Mono (recommended font)
|
||||
mkdir -p ~/.local/share/fonts && curl -L "https://download-cdn.jetbrains.com/fonts/JetBrainsMono-2.304.zip" -o /tmp/JetBrainsMono.zip && unzip -j /tmp/JetBrainsMono.zip "fonts/ttf/*.ttf" -d ~/.local/share/fonts/ && rm /tmp/JetBrainsMono.zip && fc-cache -f
|
||||
|
||||
|
||||
# 3 --- QuickShell (recommended to use a git build)
|
||||
paru -S quickshell-git
|
||||
```
|
||||
|
||||
|
||||
@@ -59,14 +59,14 @@ Rectangle {
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: root.text
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: root.description
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
@@ -128,7 +128,7 @@ Rectangle {
|
||||
visible: name !== ""
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: root.currentValue
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -232,7 +232,7 @@ Rectangle {
|
||||
visible: name !== ""
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: modelData
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -116,7 +116,7 @@ GridView {
|
||||
border.width: 1
|
||||
border.color: Theme.primarySelected
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
|
||||
font.pixelSize: Math.min(28, parent.width * 0.5)
|
||||
@@ -128,7 +128,7 @@ GridView {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: gridView.cellWidth - 12
|
||||
text: model.name || ""
|
||||
|
||||
@@ -103,7 +103,7 @@ ListView {
|
||||
border.width: 1
|
||||
border.color: Theme.primarySelected
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: (model.name && model.name.length > 0) ? model.name.charAt(0).toUpperCase() : "A"
|
||||
font.pixelSize: iconSize * 0.4
|
||||
@@ -120,7 +120,7 @@ ListView {
|
||||
width: parent.width - iconSize - Theme.spacingL
|
||||
spacing: Theme.spacingXS
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: model.name || ""
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
@@ -129,7 +129,7 @@ ListView {
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: model.comment || "Application"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -276,7 +276,7 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: model.name || "Unknown"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: Theme.surfaceText
|
||||
@@ -309,7 +309,7 @@ Item {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
anchors.centerIn: parent
|
||||
text: root.isLoading ? "Searching..." : "No locations found"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
@@ -102,7 +102,7 @@ Item {
|
||||
visible: (sliderMouseArea.containsMouse && slider.showValue) || (slider.isDragging && slider.showValue)
|
||||
opacity: visible ? 1 : 0
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: tooltipText
|
||||
|
||||
text: slider.value + slider.unit
|
||||
|
||||
@@ -50,7 +50,7 @@ Item {
|
||||
visible: parent.parent.hasIcon
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
text: modelData.text || ""
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: parent.parent.isActive ? Theme.primary : Theme.surfaceText
|
||||
|
||||
@@ -186,7 +186,7 @@ StyledRect {
|
||||
|
||||
}
|
||||
|
||||
Text {
|
||||
StyledText {
|
||||
id: placeholderLabel
|
||||
|
||||
anchors.fill: textInput
|
||||
|
||||
@@ -6,6 +6,8 @@ Text {
|
||||
|
||||
color: Theme.surfaceText
|
||||
font.pixelSize: Appearance.fontSize.normal
|
||||
font.family: Prefs.fontFamily
|
||||
font.weight: Prefs.fontWeight
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
Reference in New Issue
Block a user