fix: use GTK theme colors, translucent cards, focus confirm on keyboard
- Replace hardcoded colors with @theme_* variables for consistency - Card backgrounds use alpha for subtle translucency over wallpaper - Confirmation dialog grabs focus on "No" button for safe keyboard nav
This commit is contained in:
parent
e770a40beb
commit
2e359f358d
@ -263,6 +263,9 @@ class PanelWindow(Gtk.ApplicationWindow):
|
||||
self._confirm_box.append(button_box)
|
||||
self._confirm_area.append(self._confirm_box)
|
||||
|
||||
# Focus the "No" button — safe default for keyboard navigation
|
||||
no_btn.grab_focus()
|
||||
|
||||
def _dismiss_confirm(self) -> None:
|
||||
"""Remove the confirmation prompt."""
|
||||
if self._confirm_box is not None:
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
/* ABOUTME: GTK4 CSS stylesheet for the Moonset power menu. */
|
||||
/* ABOUTME: Catppuccin Mocha theme with action buttons and confirmation styling. */
|
||||
/* ABOUTME: Uses GTK theme colors for consistency with the active desktop theme. */
|
||||
|
||||
/* Main panel window background */
|
||||
window.panel {
|
||||
background-color: #1a1a2e;
|
||||
background-color: @theme_bg_color;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
/* Wallpaper-only window for secondary monitors */
|
||||
window.wallpaper {
|
||||
background-color: #1a1a2e;
|
||||
background-color: @theme_bg_color;
|
||||
}
|
||||
|
||||
/* Action button — square card */
|
||||
@ -19,37 +19,37 @@ window.wallpaper {
|
||||
min-height: 120px;
|
||||
padding: 16px;
|
||||
border-radius: 16px;
|
||||
background-color: alpha(white, 0.08);
|
||||
color: white;
|
||||
background-color: alpha(@theme_base_color, 0.55);
|
||||
color: @theme_fg_color;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.action-button:hover {
|
||||
background-color: alpha(white, 0.20);
|
||||
background-color: alpha(@theme_base_color, 0.7);
|
||||
}
|
||||
|
||||
/* Action icon inside button */
|
||||
.action-icon {
|
||||
color: white;
|
||||
color: @theme_fg_color;
|
||||
}
|
||||
|
||||
/* Action label below icon */
|
||||
.action-label {
|
||||
font-size: 14px;
|
||||
color: white;
|
||||
color: @theme_unfocused_fg_color;
|
||||
}
|
||||
|
||||
/* Confirmation box below action buttons */
|
||||
.confirm-box {
|
||||
padding: 16px 24px;
|
||||
border-radius: 12px;
|
||||
background-color: alpha(white, 0.08);
|
||||
background-color: @theme_base_color;
|
||||
}
|
||||
|
||||
/* Confirmation prompt text */
|
||||
.confirm-label {
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
color: @theme_fg_color;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
@ -57,31 +57,31 @@ window.wallpaper {
|
||||
.confirm-yes {
|
||||
padding: 8px 24px;
|
||||
border-radius: 8px;
|
||||
background-color: #ff6b6b;
|
||||
color: white;
|
||||
background-color: @error_color;
|
||||
color: @theme_bg_color;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.confirm-yes:hover {
|
||||
background-color: #ff8787;
|
||||
background-color: lighter(@error_color);
|
||||
}
|
||||
|
||||
/* Confirm "No/Cancel" button */
|
||||
.confirm-no {
|
||||
padding: 8px 24px;
|
||||
border-radius: 8px;
|
||||
background-color: alpha(white, 0.12);
|
||||
color: white;
|
||||
background-color: @theme_unfocused_bg_color;
|
||||
color: @theme_fg_color;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.confirm-no:hover {
|
||||
background-color: alpha(white, 0.25);
|
||||
background-color: @theme_selected_bg_color;
|
||||
}
|
||||
|
||||
/* Error message label */
|
||||
.error-label {
|
||||
color: #ff6b6b;
|
||||
color: @error_color;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user