style: replace hardcoded colors with GTK theme variables
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 3s

Use @theme_bg_color, @theme_fg_color, @error_color and @success_color
instead of hardcoded hex values and 'white'. Makes moonlock respect the
active GTK theme instead of assuming Catppuccin Mocha colors.

Note: moongreet and moonset still use hardcoded colors and should be
updated to match.
This commit is contained in:
nevaforget 2026-04-09 14:51:29 +02:00
parent b621b4e9fe
commit 3f4448c641

View File

@ -1,9 +1,9 @@
/* ABOUTME: GTK4 CSS stylesheet for the Moonlock lockscreen. */
/* ABOUTME: Dark theme styling matching the Moonarch ecosystem. */
/* ABOUTME: Uses GTK theme colors for consistency with the active desktop theme. */
/* Main window background */
window.lockscreen {
background-color: #1a1a2e;
background-color: @theme_bg_color;
background-size: cover;
background-position: center;
opacity: 0;
@ -27,14 +27,14 @@ window.lockscreen.visible {
min-width: 128px;
min-height: 128px;
background-color: @theme_selected_bg_color;
border: 3px solid alpha(white, 0.3);
border: 3px solid alpha(@theme_fg_color, 0.3);
}
/* Username label */
.username-label {
font-size: 24px;
font-weight: bold;
color: white;
color: @theme_fg_color;
margin-top: 12px;
margin-bottom: 40px;
}
@ -46,29 +46,29 @@ window.lockscreen.visible {
/* Error message label */
.error-label {
color: #ff6b6b;
color: @error_color;
font-size: 14px;
}
/* Fingerprint status indicator */
.fingerprint-label {
color: alpha(white, 0.6);
color: alpha(@theme_fg_color, 0.6);
font-size: 13px;
margin-top: 8px;
}
.fingerprint-label.success {
color: #51cf66;
color: @success_color;
}
.fingerprint-label.failed {
color: #ff6b6b;
color: @error_color;
}
/* Confirmation prompt */
.confirm-label {
font-size: 16px;
color: white;
color: @theme_fg_color;
margin-bottom: 4px;
}
@ -103,12 +103,12 @@ window.lockscreen.visible {
min-height: 48px;
padding: 0px;
border-radius: 24px;
background-color: alpha(white, 0.1);
color: white;
background-color: alpha(@theme_fg_color, 0.1);
color: @theme_fg_color;
border: none;
margin: 4px;
}
.power-button:hover {
background-color: alpha(white, 0.25);
background-color: alpha(@theme_fg_color, 0.25);
}