Renamed Colors to Color

- some work on the active window
This commit is contained in:
quadbyte 2025-08-16 22:39:11 -04:00
parent ffd9ee8efe
commit 4fcdb1543d
60 changed files with 491 additions and 455 deletions

View file

@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services
@ -39,57 +40,68 @@ Row {
}
}
// Window icon
NText {
id: windowIcon
text: "desktop_windows"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
color: Colors.mPrimary
visible: getDisplayText() !== ""
}
// Window title container
Item {
id: titleContainer
width: titleText.width
height: titleText.height
Rectangle {
width: row.width + Style.marginSmall * scaling * 2
height: row.height
color: Color.mSurfaceVariant
radius: Style.radiusSmall * scaling
anchors.verticalCenter: parent.verticalCenter
Behavior on width {
NumberAnimation {
duration: Style.animationNormal
easing.type: Easing.OutCubic
}
}
NText {
id: titleText
text: getDisplayText()
font.pointSize: Style.fontSizeSmall * scaling
font.weight: Style.fontWeightBold
elide: Text.ElideRight
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
}
// Mouse area for hover detection
MouseArea {
id: titleContainerMouseArea
Item {
id: mainContainer
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.IBeamCursor
onEntered: {
titleText.text = getDisplayText()
anchors.leftMargin: Style.marginSmall * scaling
anchors.rightMargin: Style.marginSmall * scaling
Row {
id: row
anchors.verticalCenter: parent.verticalCenter
spacing: Style.marginTiny * scaling
// Window icon
NText {
id: windowIcon
text: "dialogs"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
visible: getDisplayText() !== ""
}
NText {
id: titleText
width: (showingFullTitle || mouseArea.containsMouse) ? 300 * scaling : 100 * scaling
text: getDisplayText()
font.pointSize: Style.fontSizeReduced * scaling
font.weight: Style.fontWeightBold
elide: Text.ElideRight
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
color: Color.mTertiary
Behavior on width {
NumberAnimation {
duration: Style.animationSlow
easing.type: Easing.OutBack
}
}
}
}
onExited: {
titleText.text = getDisplayText()
// Mouse area for hover detection
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.IBeamCursor
onEntered: {
titleText.text = getDisplayText()
}
onExited: {
titleText.text = getDisplayText()
}
}
}
}
function getDisplayText() {
// Check if Niri service is available
if (typeof NiriService === "undefined") {
@ -117,27 +129,29 @@ Row {
const programName = title.split(/[\s\-_]/)[0]
if (programName.length <= 2 || programName === title) {
return truncateTitle(title)
return title
}
if (showingFullTitle || titleContainerMouseArea.containsMouse || isGenericName(programName)) {
return truncateTitle(title)
if (isGenericName(programName)) {
return title
}
return programName
}
// Use appId for program name, show full title on hover or window switch
if (showingFullTitle || titleContainerMouseArea.containsMouse) {
return truncateTitle(title || appId)
}
return title
return appId
// // Use appId for program name, show full title on hover or window switch
// if (showingFullTitle || mouseArea.containsMouse) {
// return truncateTitle(title || appId, 50)
// } else {
// return truncateTitle(title || appId, 20)
// }
}
function truncateTitle(title) {
if (title.length > 50) {
return title.substring(0, 47) + "..."
function truncateTitle(title, length) {
if (title.length > length) {
return title.substring(0, length - 3) + "..."
}
return title
}

View file

@ -39,7 +39,7 @@ Variants {
id: bar
anchors.fill: parent
color: Colors.mSurface
color: Color.mSurface
layer.enabled: true
}
@ -55,9 +55,9 @@ Variants {
SystemMonitor {}
MediaMini {}
ActiveWindow {}
MediaMini {}
}
// Center

View file

@ -52,10 +52,10 @@ NPill {
icon: root.batteryIcon()
text: Math.round(root.percent) + "%"
pillColor: Colors.mSurfaceVariant
iconCircleColor: Colors.mPrimary
iconTextColor: Colors.mSurface
textColor: charging ? Colors.mPrimary : Colors.mOnSurface
pillColor: Color.mSurfaceVariant
iconCircleColor: Color.mPrimary
iconTextColor: Color.mSurface
textColor: charging ? Color.mPrimary : Color.mOnSurface
tooltipText: {
let lines = []

View file

@ -63,9 +63,9 @@ NLoader {
Rectangle {
id: bluetoothMenuRect
color: Colors.mSurface
color: Color.mSurface
radius: Style.radiusLarge * scaling
border.color: Colors.mOutlineVariant
border.color: Color.mOutlineVariant
border.width: Math.max(1, Style.borderThin * scaling)
width: 340 * scaling
height: 500 * scaling
@ -115,14 +115,14 @@ NLoader {
text: "bluetooth"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: Colors.mPrimary
color: Color.mPrimary
}
NText {
text: "Bluetooth"
font.pointSize: Style.fontSizeLarge * scaling
font.bold: true
color: Colors.mOnSurface
color: Color.mOnSurface
Layout.fillWidth: true
}
@ -160,7 +160,7 @@ NLoader {
NBusyIndicator {
running: BluetoothService.isDiscovering
color: Colors.mPrimary
color: Color.mPrimary
size: Style.baseWidgetSize * scaling
Layout.alignment: Qt.AlignHCenter
}
@ -168,7 +168,7 @@ NLoader {
NText {
text: "Scanning for devices..."
font.pointSize: Style.fontSizeNormal * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
}
@ -183,21 +183,21 @@ NLoader {
text: "bluetooth_disabled"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Bluetooth is disabled"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Enable Bluetooth to see available devices"
font.pointSize: Style.fontSizeNormal * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
}
@ -271,7 +271,7 @@ NLoader {
Rectangle {
anchors.fill: parent
radius: Style.radiusMedium * scaling
color: modelData.device.connected ? Colors.mPrimary : (deviceMouseArea.containsMouse ? Colors.mTertiary : "transparent")
color: modelData.device.connected ? Color.mPrimary : (deviceMouseArea.containsMouse ? Color.mTertiary : "transparent")
RowLayout {
anchors.fill: parent
@ -282,7 +282,7 @@ NLoader {
text: BluetoothService.getDeviceIcon(modelData.device)
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: modelData.device.connected ? Colors.mSurface : (deviceMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.device.connected ? Color.mSurface : (deviceMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
ColumnLayout {
@ -294,7 +294,7 @@ NLoader {
font.pointSize: Style.fontSizeNormal * scaling
elide: Text.ElideRight
Layout.fillWidth: true
color: modelData.device.connected ? Colors.mSurface : (deviceMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.device.connected ? Color.mSurface : (deviceMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
NText {
@ -308,13 +308,13 @@ NLoader {
}
}
font.pointSize: Style.fontSizeSmall * scaling
color: modelData.device.connected ? Colors.mSurface : (deviceMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurfaceVariant)
color: modelData.device.connected ? Color.mSurface : (deviceMouseArea.containsMouse ? Color.mSurface : Color.mOnSurfaceVariant)
}
NText {
text: BluetoothService.getBatteryText(modelData.device)
font.pointSize: Style.fontSizeSmall * scaling
color: modelData.device.connected ? Colors.mSurface : (deviceMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurfaceVariant)
color: modelData.device.connected ? Color.mSurface : (deviceMouseArea.containsMouse ? Color.mSurface : Color.mOnSurfaceVariant)
visible: modelData.device.batteryAvailable
}
}
@ -327,7 +327,7 @@ NLoader {
NBusyIndicator {
visible: modelData.device.pairing || modelData.device.state === 2
running: modelData.device.pairing || modelData.device.state === 2
color: Colors.mPrimary
color: Color.mPrimary
anchors.centerIn: parent
size: Style.baseWidgetSize * 0.7 * scaling
}
@ -337,7 +337,7 @@ NLoader {
visible: modelData.device.connected
text: "connected"
font.pointSize: Style.fontSizeSmall * scaling
color: modelData.device.connected ? Colors.mSurface : (deviceMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.device.connected ? Color.mSurface : (deviceMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
}
@ -370,21 +370,21 @@ NLoader {
text: "bluetooth_disabled"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "No Bluetooth devices"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Click the refresh button to discover devices"
font.pointSize: Style.fontSizeNormal * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
}

View file

@ -10,7 +10,7 @@ Item {
width: pill.width
height: pill.height
visible: !Settings.data.bar.hideBrightness
visible: Settings.data.bar.showBrightness
// Used to avoid opening the pill on Quickshell startup
property bool firstBrightnessReceived: false
@ -49,8 +49,8 @@ Item {
NPill {
id: pill
icon: getIcon()
iconCircleColor: Colors.mPrimary
collapsedIconColor: Colors.mOnSurface
iconCircleColor: Color.mPrimary
collapsedIconColor: Color.mOnSurface
autoHide: false // Important to be false so we can hover as long as we want
text: Math.round(BrightnessService.brightness) + "%"
tooltipText: "Brightness: " + Math.round(

View file

@ -28,7 +28,6 @@ Item {
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
verticalAlignment: Text.AlignVCenter
color: Colors.mPrimary
MouseArea {
id: titleContainerMouseArea
@ -43,11 +42,10 @@ Item {
// Track info
NText {
text: MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - {MediaService.trackArtist}` : "")
color: Colors.mOnSurface
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeReduced * scaling
font.weight: Style.fontWeightBold
elide: Text.ElideRight
color: Color.mSecondary
verticalAlignment: Text.AlignVCenter
Layout.maximumWidth: 200 * scaling
Layout.alignment: Qt.AlignVCenter

View file

@ -10,6 +10,7 @@ import qs.Widgets
NIconButton {
id: root
visible: Settings.data.bar.showNotificationsHistory
sizeMultiplier: 0.8
showBorder: false
icon: "notifications"

View file

@ -24,16 +24,16 @@ Row {
font.pointSize: Style.fontSizeLarge * scaling
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
color: Colors.mPrimary
}
NText {
id: cpuUsageText
text: `${SystemStatsService.cpuUsage}%`
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeReduced * scaling
font.weight: Style.fontWeightBold
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
color: Color.mPrimary
}
}
@ -46,17 +46,18 @@ Row {
text: "thermometer"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.mPrimary
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
NText {
text: `${SystemStatsService.cpuTemp}°C`
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeReduced * scaling
font.weight: Style.fontWeightBold
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
color: Color.mPrimary
}
}
@ -69,17 +70,17 @@ Row {
text: "memory"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.mPrimary
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
NText {
text: `${SystemStatsService.memoryUsageGb}G`
font.pointSize: Style.fontSizeSmall * scaling
font.pointSize: Style.fontSizeReduced * scaling
font.weight: Style.fontWeightBold
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
color: Color.mPrimary
}
}
}

View file

@ -12,6 +12,7 @@ import qs.Widgets
Item {
readonly property real itemSize: 24 * scaling
visible: Settings.data.bar.showTray
width: tray.width
height: itemSize

View file

@ -73,8 +73,8 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: Colors.mSurface
border.color: Colors.mOutline
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
z: 0
@ -112,7 +112,7 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: mouseArea.containsMouse ? Colors.mTertiary : "transparent"
color: mouseArea.containsMouse ? Color.mTertiary : "transparent"
radius: Style.radiusSmall * scaling
visible: !(modelData?.isSeparator ?? false)
@ -126,7 +126,7 @@ PopupWindow {
id: text
Layout.fillWidth: true
color: (modelData?.enabled
?? true) ? (mouseArea.containsMouse ? Colors.mOnTertiary : Colors.mOnSurface) : Colors.textDisabled
?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.textDisabled
text: modelData?.text ?? ""
font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter
@ -148,7 +148,7 @@ PopupWindow {
font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter
visible: modelData?.hasChildren ?? false
color: Colors.mOnSurface
color: Color.mOnSurface
}
}
@ -308,8 +308,8 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: Colors.mSurface
border.color: Colors.mOutline
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
z: 0
@ -347,10 +347,10 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: mouseArea.containsMouse ? Colors.mTertiary : "transparent"
color: mouseArea.containsMouse ? Color.mTertiary : "transparent"
radius: Style.radiusSmall * scaling
visible: !(modelData?.isSeparator ?? false)
property color hoverTextColor: mouseArea.containsMouse ? Colors.mOnSurface : Colors.mOnSurface
property color hoverTextColor: mouseArea.containsMouse ? Color.mOnSurface : Color.mOnSurface
RowLayout {
anchors.fill: parent
@ -361,7 +361,7 @@ PopupWindow {
NText {
id: subText
Layout.fillWidth: true
color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Colors.textDisabled
color: (modelData?.enabled ?? true) ? bg.hoverTextColor : Color.textDisabled
text: modelData?.text ?? ""
font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter

View file

@ -49,8 +49,8 @@ Item {
NPill {
id: pill
icon: getIcon()
iconCircleColor: Colors.mPrimary
collapsedIconColor: Colors.mOnSurface
iconCircleColor: Color.mPrimary
collapsedIconColor: Color.mOnSurface
autoHide: false // Important to be false so we can hover as long as we want
text: Math.floor(AudioService.volume * 100) + "%"
tooltipText: "Volume: " + Math.round(

View file

@ -82,9 +82,9 @@ NLoader {
Rectangle {
id: wifiMenuRect
color: Colors.mSurface
color: Color.mSurface
radius: Style.radiusLarge * scaling
border.color: Colors.mOutlineVariant
border.color: Color.mOutlineVariant
border.width: Math.max(1, Style.borderThin * scaling)
width: 340 * scaling
height: 500 * scaling
@ -134,14 +134,14 @@ NLoader {
text: "wifi"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: Colors.mPrimary
color: Color.mPrimary
}
NText {
text: "WiFi"
font.pointSize: Style.fontSizeLarge * scaling
font.bold: true
color: Colors.mOnSurface
color: Color.mOnSurface
Layout.fillWidth: true
}
@ -179,7 +179,7 @@ NLoader {
NBusyIndicator {
running: NetworkService.isLoading
color: Colors.mPrimary
color: Color.mPrimary
size: Style.baseWidgetSize * scaling
Layout.alignment: Qt.AlignHCenter
}
@ -187,7 +187,7 @@ NLoader {
NText {
text: "Scanning for networks..."
font.pointSize: Style.fontSizeNormal * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
}
@ -202,21 +202,21 @@ NLoader {
text: "wifi_off"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXXL * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "WiFi is disabled"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: "Enable WiFi to see available networks"
font.pointSize: Style.fontSizeNormal * scaling
color: Colors.mOnSurfaceVariant
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
}
@ -243,7 +243,7 @@ NLoader {
Layout.fillWidth: true
Layout.preferredHeight: Style.baseWidgetSize * 1.5 * scaling
radius: Style.radiusMedium * scaling
color: modelData.connected ? Colors.mPrimary : (networkMouseArea.containsMouse ? Colors.mTertiary : "transparent")
color: modelData.connected ? Color.mPrimary : (networkMouseArea.containsMouse ? Color.mTertiary : "transparent")
RowLayout {
anchors.fill: parent
@ -254,7 +254,7 @@ NLoader {
text: NetworkService.signalIcon(modelData.signal)
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: modelData.connected ? Colors.mSurface : (networkMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
ColumnLayout {
@ -267,7 +267,7 @@ NLoader {
font.pointSize: Style.fontSizeNormal * scaling
elide: Text.ElideRight
Layout.fillWidth: true
color: modelData.connected ? Colors.mSurface : (networkMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
// Security Protocol
@ -276,14 +276,14 @@ NLoader {
font.pointSize: Style.fontSizeTiny * scaling
elide: Text.ElideRight
Layout.fillWidth: true
color: modelData.connected ? Colors.mSurface : (networkMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
NText {
visible: NetworkService.connectStatusSsid === modelData.ssid
&& NetworkService.connectStatus === "error" && NetworkService.connectError.length > 0
text: NetworkService.connectError
color: Colors.mError
color: Color.mError
font.pointSize: Style.fontSizeSmall * scaling
elide: Text.ElideRight
Layout.fillWidth: true
@ -300,7 +300,7 @@ NLoader {
NBusyIndicator {
visible: NetworkService.connectingSsid === modelData.ssid
running: NetworkService.connectingSsid === modelData.ssid
color: Colors.mPrimary
color: Color.mPrimary
anchors.centerIn: parent
size: Style.baseWidgetSize * 0.7 * scaling
}
@ -321,7 +321,7 @@ NLoader {
text: "error"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.mError
color: Color.mError
anchors.centerIn: parent
}
}
@ -330,7 +330,7 @@ NLoader {
visible: modelData.connected
text: "connected"
font.pointSize: Style.fontSizeSmall * scaling
color: modelData.connected ? Colors.mSurface : (networkMouseArea.containsMouse ? Colors.mSurface : Colors.mOnSurface)
color: modelData.connected ? Color.mSurface : (networkMouseArea.containsMouse ? Color.mSurface : Color.mOnSurface)
}
}
@ -362,7 +362,7 @@ NLoader {
Layout.preferredHeight: modelData.ssid === passwordPromptSsid && showPasswordPrompt ? 60 : 0
Layout.margins: Style.marginSmall * scaling
visible: modelData.ssid === passwordPromptSsid && showPasswordPrompt
color: Colors.mSurfaceVariant
color: Color.mSurfaceVariant
radius: Style.radiusSmall * scaling
RowLayout {
@ -378,7 +378,7 @@ NLoader {
anchors.fill: parent
radius: Style.radiusTiny * scaling
color: "transparent"
border.color: passwordInputField.activeFocus ? Colors.mPrimary : Colors.mOutline
border.color: passwordInputField.activeFocus ? Color.mPrimary : Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
TextInput {
@ -387,7 +387,7 @@ NLoader {
anchors.margins: Style.marginMedium * scaling
text: passwordInput
font.pointSize: Style.fontSizeMedium * scaling
color: Colors.mOnSurface
color: Color.mOnSurface
verticalAlignment: TextInput.AlignVCenter
clip: true
focus: true
@ -414,7 +414,7 @@ NLoader {
Layout.preferredWidth: Style.baseWidgetSize * 2.5 * scaling
Layout.preferredHeight: Style.barHeight * scaling
radius: Style.radiusMedium * scaling
color: Colors.mPrimary
color: Color.mPrimary
Behavior on color {
ColorAnimation {
@ -425,7 +425,7 @@ NLoader {
NText {
anchors.centerIn: parent
text: "Connect"
color: Colors.mSurface
color: Color.mSurface
font.pointSize: Style.fontSizeSmall * scaling
}
@ -437,8 +437,8 @@ NLoader {
}
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: parent.color = Qt.darker(Colors.mPrimary, 1.1)
onExited: parent.color = Colors.mPrimary
onEntered: parent.color = Qt.darker(Color.mPrimary, 1.1)
onExited: parent.color = Color.mPrimary
}
}
}

View file

@ -16,7 +16,7 @@ Item {
property ListModel localWorkspaces: ListModel {}
property real masterProgress: 0.0
property bool effectsActive: false
property color effectColor: Colors.mPrimary
property color effectColor: Color.mPrimary
property int horizontalPadding: Math.round(16 * scaling)
property int spacingBetweenPills: Math.round(8 * scaling)
@ -70,7 +70,7 @@ Item {
}
function triggerUnifiedWave() {
effectColor = Colors.mPrimary
effectColor = Color.mPrimary
masterAnimation.restart()
}
@ -106,7 +106,7 @@ Item {
const ws = localWorkspaces.get(i)
if (ws.isFocused === true) {
root.triggerUnifiedWave()
root.workspaceChanged(ws.id, Colors.mPrimary)
root.workspaceChanged(ws.id, Color.mPrimary)
break
}
}
@ -119,12 +119,12 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
radius: Math.round(12 * scaling)
color: Colors.mSurfaceVariant
border.color: Colors.mOutlineVariant
color: Color.mSurfaceVariant
border.color: Color.mOutlineVariant
border.width: Math.max(1, Math.round(1 * scaling))
layer.enabled: true
layer.effect: MultiEffect {
shadowColor: Colors.mShadow
shadowColor: Color.mShadow
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
shadowOpacity: 0.10
@ -164,15 +164,15 @@ Item {
}
color: {
if (model.isFocused)
return Colors.mPrimary
return Color.mPrimary
if (model.isUrgent)
return Colors.mError
return Color.mError
if (model.isActive || model.isOccupied)
return Colors.mSecondary
return Color.mSecondary
if (model.isUrgent)
return Colors.mError
return Color.mError
return Colors.mOutline
return Color.mOutline
}
scale: model.isFocused ? 1.0 : 0.9
z: 0