Borders: optim/simplification of scaled borders

This commit is contained in:
ItsLemmy
2025-10-21 13:52:19 -04:00
parent 65db92e4fc
commit c9bbaf4c91
45 changed files with 74 additions and 74 deletions
@@ -54,7 +54,7 @@ ColumnLayout {
Layout.preferredHeight: deviceLayout.implicitHeight + (Style.marginM * 2)
radius: Style.radiusM
color: Color.mSurface
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: getContentColor(Color.mOutline)
RowLayout {
+1 -1
View File
@@ -88,7 +88,7 @@ PopupWindow {
anchors.fill: parent
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: Style.radiusM
}
+7 -7
View File
@@ -79,9 +79,9 @@ NPanel {
visible: NetworkService.lastError.length > 0
Layout.fillWidth: true
Layout.preferredHeight: errorRow.implicitHeight + (Style.marginM * 2)
color: Qt.rgba(Color.mError.r, Color.mError.g, Color.mError.b, 0.1)
color: Qt.alpha(Color.mError, 0.1)
radius: Style.radiusS
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: Color.mError
RowLayout {
@@ -218,7 +218,7 @@ NPanel {
opacity: (NetworkService.disconnectingFrom === modelData.ssid || NetworkService.forgettingNetwork === modelData.ssid) ? 0.6 : 1.0
color: modelData.connected ? Qt.rgba(Color.mPrimary.r, Color.mPrimary.g, Color.mPrimary.b, 0.05) : Color.mSurface
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: modelData.connected ? Color.mPrimary : Color.mOutline
// Smooth opacity animation
@@ -339,7 +339,7 @@ NPanel {
visible: modelData.cached && !modelData.connected && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid
color: Color.transparent
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: height * 0.5
width: savedText.implicitWidth + (Style.marginS * 2)
height: savedText.implicitHeight + (Style.marginXXS * 2)
@@ -415,7 +415,7 @@ NPanel {
height: passwordRow.implicitHeight + Style.marginS * 2
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: Style.radiusS
RowLayout {
@@ -430,7 +430,7 @@ NPanel {
radius: Style.radiusXS
color: Color.mSurface
border.color: pwdInput.activeFocus ? Color.mSecondary : Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
TextInput {
id: pwdInput
@@ -497,7 +497,7 @@ NPanel {
height: forgetRow.implicitHeight + Style.marginS * 2
color: Color.mSurfaceVariant
radius: Style.radiusS
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: Color.mOutline
RowLayout {
+1 -1
View File
@@ -30,7 +30,7 @@ NBox {
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM)
borderWidth: Style.borderM
}
ColumnLayout {
+1 -1
View File
@@ -289,7 +289,7 @@ Variants {
color: Qt.alpha(Color.mSurface, Settings.data.dock.backgroundOpacity)
anchors.centerIn: parent
radius: Style.radiusL
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: Qt.alpha(Color.mOutline, Settings.data.dock.backgroundOpacity)
MouseArea {
+1 -1
View File
@@ -210,7 +210,7 @@ PopupWindow {
color: Color.mSurfaceVariant
radius: Style.radiusS
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
// Single MouseArea to handle both auto-close and menu interactions
MouseArea {
+1 -1
View File
@@ -690,7 +690,7 @@ Loader {
fallbackIcon: "disc"
fallbackIconSize: Style.fontSizeM
borderColor: Color.mOutline
borderWidth: Math.max(1, Style.borderS)
borderWidth: Style.borderS
}
}
+1 -1
View File
@@ -186,7 +186,7 @@ Variants {
radius: Style.radiusL
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
color: Color.mSurface
// Optimized progress bar container
@@ -145,7 +145,7 @@ NPanel {
radius: Style.radiusM
color: Color.mSurfaceVariant
border.color: Qt.alpha(Color.mOutline, Style.opacityMedium)
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
Behavior on height {
enabled: !Settings.data.general.animationDisabled
@@ -44,7 +44,7 @@ Popup {
color: Color.mSurface
radius: Style.radiusL
border.color: Color.mPrimary
border.width: Math.max(1, Style.borderM)
border.width: Style.borderM
}
contentItem: ColumnLayout {
@@ -181,7 +181,7 @@ ColumnLayout {
color: Color.mSurfaceVariant
radius: Style.radiusM
border.color: Color.mSecondary
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
Behavior on border.color {
ColorAnimation {
@@ -100,7 +100,7 @@ ColumnLayout {
anchors.margins: Style.marginXS
color: Color.transparent // Make background transparent
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: Style.radiusS
visible: model.rule !== undefined && model.rule !== "" // Only visible if rule exists
}
+2 -2
View File
@@ -362,7 +362,7 @@ NPanel {
Layout.alignment: Qt.AlignTop
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: Style.radiusM
MouseArea {
@@ -464,7 +464,7 @@ NPanel {
radius: Style.radiusM
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
ColumnLayout {
id: contentLayout
+1 -1
View File
@@ -194,7 +194,7 @@ ColumnLayout {
anchors.margins: Style.marginXS
fallbackIcon: "person"
borderColor: contributorArea.containsMouse ? Color.mOnTertiary : Color.mPrimary
borderWidth: Math.max(1, Style.borderM)
borderWidth: Style.borderM
Behavior on borderColor {
ColorAnimation {
+1 -1
View File
@@ -297,7 +297,7 @@ ColumnLayout {
// Visuals
color: Qt.alpha(Color.mOnSurface, 0.125)
border.color: Qt.alpha(Color.mOnSurface, Style.opacityLight)
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
// Content
RowLayout {
+3 -3
View File
@@ -334,10 +334,10 @@ ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 50
height: 50 * Style.uiScaleRatio
radius: Style.radiusS
color: root.getSchemeColor(schemeName, "mSurface")
border.width: Math.max(1, Style.borderL)
border.width: Style.borderL
border.color: {
if (Settings.data.colorSchemes.predefinedScheme === schemeName) {
return Color.mSecondary
@@ -421,7 +421,7 @@ ColumnLayout {
height: 20
radius: width * 0.5
color: Color.mSecondary
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
border.color: Color.mOnSecondary
NIcon {
+1 -1
View File
@@ -67,7 +67,7 @@ ColumnLayout {
radius: Style.radiusM
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
property var brightnessMonitor: BrightnessService.getMonitorForScreen(modelData)
+1 -1
View File
@@ -26,7 +26,7 @@ ColumnLayout {
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM)
borderWidth: Style.borderM
Layout.alignment: Qt.AlignTop
}
+1 -1
View File
@@ -59,7 +59,7 @@ ColumnLayout {
radius: Style.radiusM
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
implicitHeight: contentCol.implicitHeight + Style.marginL * 2
ColumnLayout {
+1 -1
View File
@@ -417,7 +417,7 @@ ColumnLayout {
height: 50
radius: Style.radiusS
color: root.cacheVersion >= 0 ? root.getSchemeColor(schemeName, "mSurface") : root.getSchemeColor(schemeName, "mSurface")
border.width: Math.max(1, Style.borderL)
border.width: Style.borderL
border.color: itemMouseArea.containsMouse ? Color.mTertiary : (Settings.data.colorSchemes.predefinedScheme === schemeName ? Color.mSecondary : Color.mOutline)
RowLayout {
+1 -1
View File
@@ -393,7 +393,7 @@ PopupWindow {
anchors.fill: parent
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
radius: Style.radiusS
// Only show content when we have text
+3 -3
View File
@@ -140,7 +140,7 @@ NPanel {
background: Rectangle {
color: screenTabBar.currentIndex === index ? Color.mSecondary : Color.transparent
radius: Style.radiusS
border.width: screenTabBar.currentIndex === index ? 0 : Math.max(1, Style.borderS)
border.width: screenTabBar.currentIndex === index ? 0 : Style.borderS
border.color: Color.mOutline
Behavior on color {
@@ -417,7 +417,7 @@ NPanel {
radius: width / 2
color: Color.mSecondary
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
visible: isSelected
NIcon {
@@ -476,7 +476,7 @@ NPanel {
color: Color.mSurface
radius: Style.radiusM
border.color: Color.mOutline
border.width: Math.max(1, Style.borderS)
border.width: Style.borderS
visible: (filteredWallpapers.length === 0 && !WallpaperService.scanning) || WallpaperService.scanning
Layout.fillWidth: true
Layout.preferredHeight: 130