srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/state
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-08-19 23:38:00 +0200
committersrdusr <[email protected]>2025-08-19 23:38:00 +0200
commitf1548893e2868c2ca6c9aaa7c93c277df35b62ac (patch)
tree1f4f864be58be8c59b9b5b2bae8d44103df0ff40 /crates/wayland/src/state
parentd2af06d00e1b91bf9953e8c86eb30ab3ad9ee829 (diff)
downloadsrdwm-f1548893e2868c2ca6c9aaa7c93c277df35b62ac.tar.gz
srdwm-f1548893e2868c2ca6c9aaa7c93c277df35b62ac.zip
Polish the hand-drawn desktop icon glyphs: rounded corners, gradient, blue
Requested directly: default icons "look very rudimentary... make slightly blue as well, polished look". Two changes to decoration::render_desktop_icon and its five draw_*_glyph helpers: - New fill_rounded_rect primitive: softly rounded corners (the same clamp-then-distance smoothstep construction rounded_corners_pixman:: apply_corner_mask already established for content masking, not a new technique) plus a vertical top-to-bottom gradient instead of one flat fill - the same light-source cue buttons.rs's own glossy_shade uses for the titlebar dots, as a plain linear gradient here. Applied to each glyph's main body shape; small details (folder tab edge, computer stand, trash ridges, home roof) stay flat/sharp. - A dedicated ICON_COLOR constant (a clean mid-blue) instead of reading theme.titlebar_fg_focused - that field is whatever the user's own titlebar accent happens to be configured to, which could be any colour; these glyphs want a consistent, recognisable blue palette of their own, independent of theme. Build/test/clippy already verified clean as part of the layer-shell scale fix commit just before this one (same source tree, installed together).
Diffstat (limited to 'crates/wayland/src/state')
-rw-r--r--crates/wayland/src/state/desktop_icons.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/wayland/src/state/desktop_icons.rs b/crates/wayland/src/state/desktop_icons.rs
index bcef073..bdaff43 100644
--- a/crates/wayland/src/state/desktop_icons.rs
+++ b/crates/wayland/src/state/desktop_icons.rs
@@ -13,6 +13,18 @@ use crate::desktop_menu::{DesktopMenu, DesktopMenuAction};
/// a real candidate list.
const TERMINAL_CANDIDATES: &[&str] = &["alacritty", "kitty", "wezterm", "foot", "gnome-terminal", "konsole", "xterm"];
+/// The hand-drawn glyphs' base colour - a dedicated, deliberately blue
+/// tone, not read from `theme.titlebar_fg_focused` (that field is
+/// whatever the user's own titlebar accent happens to be, which could be
+/// any colour at all depending on their config; these glyphs want a
+/// consistent, recognisable icon palette of their own, matching the
+/// "slightly blue, polished look" requested directly, independent of
+/// theme). `decoration::render_desktop_icon` derives a lighter top tone
+/// and a darker outline/detail tone from this one value via `color::
+/// brighten`/`darken`, the same directional-shading helpers the titlebar
+/// buttons already use.
+const ICON_COLOR: (u8, u8, u8) = (74, 144, 226);
+
impl CompState {
/// Populates `self.desktop_icons` on first call, then keeps its
/// `origin` continuously re-anchored to the primary monitor's own
@@ -94,7 +106,7 @@ impl CompState {
icon.kind,
&label,
icon.selected,
- theme.titlebar_fg_focused,
+ ICON_COLOR,
label_color,
theme.default_border_color,
);