mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Colors: 2 news colors, mHover+mOnHover - autocomputed. Using them for all hovers instead of mTertiary.
This commit is contained in:
@@ -135,7 +135,7 @@ Item {
|
||||
width: pillHeight
|
||||
height: pillHeight
|
||||
radius: width * 0.5
|
||||
color: hovered ? Color.mTertiary : Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
color: hovered ? Color.mHover : Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
x: oppositeDirection ? 0 : (parent.width - width)
|
||||
@@ -151,7 +151,7 @@ Item {
|
||||
icon: root.icon
|
||||
pointSize: iconSize
|
||||
applyUiScale: false
|
||||
color: hovered ? Color.mOnTertiary : Color.mOnSurface
|
||||
color: hovered ? Color.mOnHover : Color.mOnSurface
|
||||
// Center horizontally
|
||||
x: (iconCircle.width - width) / 2
|
||||
// Center vertically accounting for font metrics
|
||||
|
||||
@@ -156,7 +156,7 @@ Item {
|
||||
width: buttonSize
|
||||
height: buttonSize
|
||||
radius: width * 0.5
|
||||
color: hovered ? Color.mTertiary : Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
color: hovered ? Color.mHover : Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
|
||||
// Icon positioning based on direction
|
||||
x: 0
|
||||
@@ -174,7 +174,7 @@ Item {
|
||||
icon: root.icon
|
||||
pointSize: iconSize
|
||||
applyUiScale: false
|
||||
color: hovered ? Color.mOnTertiary : Color.mOnSurface
|
||||
color: hovered ? Color.mOnHover : Color.mOnSurface
|
||||
// Center horizontally
|
||||
x: (iconCircle.width - width) / 2
|
||||
// Center vertically accounting for font metrics
|
||||
|
||||
@@ -134,7 +134,7 @@ PopupWindow {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: mouseArea.containsMouse ? Color.mTertiary : Color.transparent
|
||||
color: mouseArea.containsMouse ? Color.mHover : Color.transparent
|
||||
radius: Style.radiusS
|
||||
visible: !(modelData?.isSeparator ?? false)
|
||||
|
||||
@@ -147,7 +147,7 @@ PopupWindow {
|
||||
NText {
|
||||
id: text
|
||||
Layout.fillWidth: true
|
||||
color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface) : Color.mOnSurfaceVariant
|
||||
color: (modelData?.enabled ?? true) ? (mouseArea.containsMouse ? Color.mOnHover : Color.mOnSurface) : Color.mOnSurfaceVariant
|
||||
text: modelData?.text !== "" ? modelData?.text.replace(/[\n\r]+/g, ' ') : "..."
|
||||
pointSize: Style.fontSizeS
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
@@ -168,7 +168,7 @@ PopupWindow {
|
||||
applyUiScale: false
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
visible: modelData?.hasChildren ?? false
|
||||
color: (mouseArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface)
|
||||
color: (mouseArea.containsMouse ? Color.mOnHover : Color.mOnSurface)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ NIconButton {
|
||||
density: Settings.data.bar.density
|
||||
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
|
||||
colorFg: Color.mOnSurface
|
||||
colorBgHover: useDistroLogo ? Color.mSurfaceVariant : Color.mTertiary
|
||||
colorBgHover: useDistroLogo ? Color.mSurfaceVariant : Color.mHover
|
||||
colorBorder: Color.transparent
|
||||
colorBorderHover: useDistroLogo ? Color.mTertiary : Color.transparent
|
||||
colorBorderHover: useDistroLogo ? Color.mHover : Color.transparent
|
||||
onClicked: PanelService.getPanel("controlCenterPanel")?.toggle(this)
|
||||
onRightClicked: PanelService.getPanel("settingsPanel")?.toggle()
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ NBox {
|
||||
baseSize: Style.baseWidgetSize * 0.5
|
||||
colorFg: AudioService.muted ? Color.mError : Color.mOnSurface
|
||||
colorBg: Color.transparent
|
||||
colorBgHover: Color.mTertiary
|
||||
colorFgHover: Color.mOnTertiary
|
||||
colorBgHover: Color.mHover
|
||||
colorFgHover: Color.mOnHover
|
||||
onClicked: {
|
||||
if (AudioService.sink && AudioService.sink.audio) {
|
||||
AudioService.sink.audio.muted = !AudioService.muted
|
||||
@@ -124,8 +124,8 @@ NBox {
|
||||
baseSize: Style.baseWidgetSize * 0.5
|
||||
colorFg: AudioService.inputMuted ? Color.mError : Color.mOnSurface
|
||||
colorBg: Color.transparent
|
||||
colorBgHover: Color.mTertiary
|
||||
colorFgHover: Color.mOnTertiary
|
||||
colorBgHover: Color.mHover
|
||||
colorFgHover: Color.mOnHover
|
||||
onClicked: AudioService.setInputMuted(!AudioService.inputMuted)
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ PopupWindow {
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 32
|
||||
color: root.hoveredItem === index ? Color.mTertiary : Color.transparent
|
||||
color: root.hoveredItem === index ? Color.mHover : Color.transparent
|
||||
radius: Style.radiusXS
|
||||
|
||||
RowLayout {
|
||||
@@ -267,14 +267,14 @@ PopupWindow {
|
||||
NIcon {
|
||||
icon: modelData.icon
|
||||
pointSize: Style.fontSizeL
|
||||
color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: root.hoveredItem === index ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
NText {
|
||||
text: modelData.text
|
||||
pointSize: Style.fontSizeS
|
||||
color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: root.hoveredItem === index ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ NPanel {
|
||||
width: resultsList.width - Style.marginS
|
||||
implicitHeight: entryHeight
|
||||
radius: Style.radiusM
|
||||
color: entry.isSelected ? Color.mTertiary : Color.mSurface
|
||||
color: entry.isSelected ? Color.mHover : Color.mSurface
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
@@ -548,7 +548,7 @@ NPanel {
|
||||
text: modelData.name || "Unknown"
|
||||
pointSize: Style.fontSizeL
|
||||
font.weight: Style.fontWeightBold
|
||||
color: entry.isSelected ? Color.mOnTertiary : Color.mOnSurface
|
||||
color: entry.isSelected ? Color.mOnHover : Color.mOnSurface
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -556,7 +556,7 @@ NPanel {
|
||||
NText {
|
||||
text: modelData.description || ""
|
||||
pointSize: Style.fontSizeS
|
||||
color: entry.isSelected ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: entry.isSelected ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
visible: text !== ""
|
||||
|
||||
@@ -1089,7 +1089,7 @@ Loader {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: logoutButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
color: logoutButtonArea.containsMouse ? Color.mHover : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
@@ -1100,13 +1100,13 @@ Loader {
|
||||
NIcon {
|
||||
icon: "logout"
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.logout")
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -1137,7 +1137,7 @@ Loader {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: suspendButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
color: suspendButtonArea.containsMouse ? Color.mHover : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
@@ -1148,13 +1148,13 @@ Loader {
|
||||
NIcon {
|
||||
icon: "suspend"
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.suspend")
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -1185,7 +1185,7 @@ Loader {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: rebootButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
color: rebootButtonArea.containsMouse ? Color.mHover : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
@@ -1196,13 +1196,13 @@ Loader {
|
||||
NIcon {
|
||||
icon: "reboot"
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.reboot")
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,8 +538,8 @@ Variants {
|
||||
}
|
||||
fontSize: Style.fontSizeS
|
||||
backgroundColor: Color.mPrimary
|
||||
textColor: hovered ? Color.mOnTertiary : Color.mOnPrimary
|
||||
hoverColor: Color.mTertiary
|
||||
textColor: hovered ? Color.mOnHover : Color.mOnPrimary
|
||||
hoverColor: Color.mHover
|
||||
outlined: false
|
||||
implicitHeight: 24
|
||||
onClicked: {
|
||||
|
||||
@@ -357,7 +357,7 @@ NPanel {
|
||||
return Qt.alpha(Color.mPrimary, 0.08)
|
||||
}
|
||||
if (isSelected || mouseArea.containsMouse) {
|
||||
return Color.mTertiary
|
||||
return Color.mHover
|
||||
}
|
||||
return Color.transparent
|
||||
}
|
||||
@@ -388,7 +388,7 @@ NPanel {
|
||||
if (buttonRoot.isShutdown && !buttonRoot.isSelected && !mouseArea.containsMouse)
|
||||
return Color.mError
|
||||
if (buttonRoot.isSelected || mouseArea.containsMouse)
|
||||
return Color.mOnTertiary
|
||||
return Color.mOnHover
|
||||
return Color.mOnSurface
|
||||
}
|
||||
pointSize: Style.fontSizeXXL
|
||||
@@ -423,7 +423,7 @@ NPanel {
|
||||
if (buttonRoot.isShutdown && !buttonRoot.isSelected && !mouseArea.containsMouse)
|
||||
return Color.mError
|
||||
if (buttonRoot.isSelected || mouseArea.containsMouse)
|
||||
return Color.mOnTertiary
|
||||
return Color.mOnHover
|
||||
return Color.mOnSurface
|
||||
}
|
||||
|
||||
|
||||
@@ -399,10 +399,10 @@ NPanel {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: tabEntryRow.implicitHeight + Style.marginM * 2
|
||||
radius: Style.radiusS
|
||||
color: selected ? Color.mPrimary : (tabItem.hovering ? Color.mTertiary : Color.transparent)
|
||||
color: selected ? Color.mPrimary : (tabItem.hovering ? Color.mHover : Color.transparent)
|
||||
readonly property bool selected: index === currentTabIndex
|
||||
property bool hovering: false
|
||||
property color tabTextColor: selected ? Color.mOnPrimary : (tabItem.hovering ? Color.mOnTertiary : Color.mOnSurface)
|
||||
property color tabTextColor: selected ? Color.mOnPrimary : (tabItem.hovering ? Color.mOnHover : Color.mOnSurface)
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
||||
@@ -170,7 +170,7 @@ ColumnLayout {
|
||||
width: contributorsGrid.cellWidth - Style.marginM
|
||||
height: contributorsGrid.cellHeight - Style.marginM
|
||||
radius: Style.radiusL
|
||||
color: contributorArea.containsMouse ? Color.mTertiary : Color.transparent
|
||||
color: contributorArea.containsMouse ? Color.mHover : Color.transparent
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
@@ -193,7 +193,7 @@ ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginXS
|
||||
fallbackIcon: "person"
|
||||
borderColor: contributorArea.containsMouse ? Color.mOnTertiary : Color.mPrimary
|
||||
borderColor: contributorArea.containsMouse ? Color.mOnHover : Color.mPrimary
|
||||
borderWidth: Style.borderM
|
||||
|
||||
Behavior on borderColor {
|
||||
@@ -212,7 +212,7 @@ ColumnLayout {
|
||||
NText {
|
||||
text: modelData.login || "Unknown"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: contributorArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface
|
||||
color: contributorArea.containsMouse ? Color.mOnHover : Color.mOnSurface
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -220,7 +220,7 @@ ColumnLayout {
|
||||
NText {
|
||||
text: (modelData.contributions || 0) + " " + ((modelData.contributions || 0) === 1 ? "commit" : "commits")
|
||||
pointSize: Style.fontSizeXS
|
||||
color: contributorArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
color: contributorArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ ColumnLayout {
|
||||
return Color.mSecondary
|
||||
}
|
||||
if (itemMouseArea.containsMouse) {
|
||||
return Color.mTertiary
|
||||
return Color.mHover
|
||||
}
|
||||
return Color.mOutline
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ ColumnLayout {
|
||||
radius: Style.radiusS
|
||||
color: root.cacheVersion >= 0 ? root.getSchemeColor(schemeName, "mSurface") : root.getSchemeColor(schemeName, "mSurface")
|
||||
border.width: Style.borderL
|
||||
border.color: itemMouseArea.containsMouse ? Color.mTertiary : (Settings.data.colorSchemes.predefinedScheme === schemeName ? Color.mSecondary : Color.mOutline)
|
||||
border.color: itemMouseArea.containsMouse ? Color.mHover : (Settings.data.colorSchemes.predefinedScheme === schemeName ? Color.mSecondary : Color.mOutline)
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -402,7 +402,7 @@ NPanel {
|
||||
return Color.mSecondary
|
||||
}
|
||||
if (wallpaperGridView.currentIndex === index) {
|
||||
return Color.mTertiary
|
||||
return Color.mHover
|
||||
}
|
||||
return Color.mSurface
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user