feat: Optimize capsule color computation by using Style.qml property

This commit is contained in:
loner
2025-11-17 11:05:58 +08:00
parent a201b8a2c8
commit 24b8eeb1f4
22 changed files with 26 additions and 23 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ NIconButton {
density: Settings.data.bar.density
baseSize: Style.capsuleHeight
applyUiScale: false
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : (Settings.data.bar.showCapsule ? Qt.alpha(Color.mSurfaceVariant, Settings.data.bar.capsuleOpacity) : Color.transparent)
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Style.capsuleColor
colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mOnSurface
colorBorder: Color.transparent
colorBorderHover: Color.transparent