moonset/resources/style.css
nevaforget 496a7a4c72 fix: address audit findings — security, performance, and correctness
- Use absolute paths for all binaries in power.rs to prevent PATH hijacking
- Implement POWER_TIMEOUT via try_wait() polling (was declared but unused)
- Fix potential panic in load_background_texture when GResource path
  fails to_str() — now falls back to known wallpaper resource path
- Compress wallpaper.jpg in GResource bundle (saves ~374 KB in binary)
- Merge double idle_add_local_once into single cycle for faster focus
- Centralize GRESOURCE_PREFIX as pub(crate) const in main.rs
- Fix fallback user UID from 0 (root) to u32::MAX
- Fix CSS comment: "square card" → "circular card" (border-radius: 50%)
2026-03-28 10:13:18 +01:00

106 lines
2.2 KiB
CSS

/* ABOUTME: GTK4 CSS stylesheet for the Moonset power menu. */
/* ABOUTME: Uses GTK theme colors for consistency with the active desktop theme. */
/* Main panel window background */
window.panel {
background-color: @theme_bg_color;
background-size: cover;
background-position: center;
}
/* Wallpaper-only window for secondary monitors */
window.wallpaper {
background-color: @theme_bg_color;
}
/* Round avatar image */
.avatar {
border-radius: 50%;
min-width: 128px;
min-height: 128px;
background-color: @theme_selected_bg_color;
border: 3px solid alpha(white, 0.3);
}
/* Username label */
.username-label {
font-size: 24px;
font-weight: bold;
color: white;
margin-top: 12px;
margin-bottom: 40px;
}
/* Action button — circular card */
.action-button {
min-width: 120px;
min-height: 120px;
padding: 16px;
border-radius: 50%;
background-color: alpha(@theme_base_color, 0.55);
color: @theme_fg_color;
border: none;
}
.action-button:hover {
background-color: alpha(@theme_base_color, 0.7);
}
/* Action icon inside button — request 48px from theme, scale up via CSS */
.action-icon {
color: @theme_fg_color;
-gtk-icon-size: 64px;
}
/* Action label below icon */
.action-label {
font-size: 14px;
color: @theme_unfocused_fg_color;
}
/* Confirmation box below action buttons */
.confirm-box {
padding: 16px 24px;
background-color: transparent;
}
/* Confirmation prompt text */
.confirm-label {
font-size: 16px;
color: @theme_fg_color;
margin-bottom: 4px;
}
/* Confirm "Yes" button */
.confirm-yes {
padding: 8px 24px;
border-radius: 8px;
background-color: @error_color;
color: @theme_bg_color;
border: none;
font-weight: bold;
}
.confirm-yes:hover {
background-color: lighter(@error_color);
}
/* Confirm "No/Cancel" button */
.confirm-no {
padding: 8px 24px;
border-radius: 8px;
background-color: @theme_unfocused_bg_color;
color: @theme_fg_color;
border: none;
}
.confirm-no:hover {
background-color: @theme_selected_bg_color;
}
/* Error message label */
.error-label {
color: @error_color;
font-size: 14px;
}