mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
colors-subtab: dont hide predefined color schemes, just disable them
This commit is contained in:
@@ -256,13 +256,12 @@ ColumnLayout {
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
visible: !Settings.data.colorSchemes.useWallpaperColors
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginM
|
||||
Layout.fillWidth: true
|
||||
visible: !Settings.data.colorSchemes.useWallpaperColors
|
||||
enabled: !Settings.data.colorSchemes.useWallpaperColors
|
||||
|
||||
NHeader {
|
||||
label: I18n.tr("panels.color-scheme.predefined-title")
|
||||
@@ -285,6 +284,7 @@ ColumnLayout {
|
||||
property string schemePath: modelData
|
||||
property string schemeName: root.extractSchemeName(modelData)
|
||||
|
||||
opacity: enabled ? 1.0 : 0.6
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
height: 50 * Style.uiScaleRatio
|
||||
@@ -292,7 +292,7 @@ ColumnLayout {
|
||||
color: root.getSchemeColor(schemeName, "mSurface")
|
||||
border.width: Style.borderL
|
||||
border.color: {
|
||||
if (Settings.data.colorSchemes.predefinedScheme === schemeName) {
|
||||
if ((Settings.data.colorSchemes.predefinedScheme === schemeName) && schemeItem.enabled) {
|
||||
return Color.mSecondary;
|
||||
}
|
||||
if (itemMouseArea.containsMouse) {
|
||||
@@ -352,6 +352,7 @@ ColumnLayout {
|
||||
MouseArea {
|
||||
id: itemMouseArea
|
||||
anchors.fill: parent
|
||||
enabled: schemeItem.enabled
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
@@ -364,7 +365,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
visible: (Settings.data.colorSchemes.predefinedScheme === schemeItem.schemeName)
|
||||
visible: (Settings.data.colorSchemes.predefinedScheme === schemeItem.schemeName) && schemeItem.enabled
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.rightMargin: 0
|
||||
|
||||
+6
-7
@@ -15,7 +15,6 @@ Rectangle {
|
||||
property color textColor: Color.mOnPrimary
|
||||
property color hoverColor: Color.mHover
|
||||
property color textHoverColor: Color.mOnHover
|
||||
property bool enabled: true
|
||||
property real fontSize: Style.fontSizeM
|
||||
property int fontWeight: Style.fontWeightSemiBold
|
||||
property real iconSize: Style.fontSizeL
|
||||
@@ -52,20 +51,20 @@ Rectangle {
|
||||
// Appearance
|
||||
radius: root.buttonRadius
|
||||
color: {
|
||||
if (!enabled)
|
||||
if (!root.enabled)
|
||||
return outlined ? "transparent" : Qt.lighter(Color.mSurfaceVariant, 1.2);
|
||||
if (hovered)
|
||||
if (root.hovered)
|
||||
return hoverColor;
|
||||
return outlined ? "transparent" : backgroundColor;
|
||||
return root.outlined ? "transparent" : root.backgroundColor;
|
||||
}
|
||||
|
||||
border.width: outlined ? Style.borderS : 0
|
||||
border.color: {
|
||||
if (!enabled)
|
||||
if (!root.enabled)
|
||||
return Color.mOutline;
|
||||
if (hovered)
|
||||
if (root.hovered)
|
||||
return backgroundColor;
|
||||
return outlined ? backgroundColor : "transparent";
|
||||
return root.outlined ? root.backgroundColor : "transparent";
|
||||
}
|
||||
|
||||
opacity: enabled ? 1.0 : 0.6
|
||||
|
||||
Reference in New Issue
Block a user