Glass designs as settings: solid, frosted, liquid on every surface

appearance.surface.design picks the look (chips in the config window); each
design's opacity, rim and light are settings. surface::shell now draws the
island, idle pill, workspace and tray pills, tray menu, control centre and
popup, so a design applies everywhere. On see-through glass faces fade with
.opacity(). Shell text settings can list their allowed words (chips).
This commit is contained in:
server2
2026-10-15 03:05:06 +02:00
parent 7d8525e95c
commit 5d322b940d
10 changed files with 203 additions and 96 deletions
+6 -14
View File
@@ -5,15 +5,15 @@ use std::time::Duration;
use amane::{
Animation, Blend, Center, Color, Full, Horizontal, InputArea, Layer, LayerWindow, Monitor, Padding, Parent, Pointer,
Rectangle, Row, Service, Shadow, Stack, Start, Text, Vertical, Weight, Widget, Workspace, Workspaces, Zone,
Rectangle, Row, Service, Stack, Start, Text, Vertical, Weight, Widget, Workspace, Workspaces, Zone,
};
use crate::config::appearance::{motion, overlays, text};
use crate::config::island::pill as island_pill;
use crate::config::workspaces::pill;
use crate::edge::{self, Edge, Part};
use crate::island::{CLEAR, backdrop, faded, mix};
use crate::{theme, tray};
use crate::island::{CLEAR, faded, mix};
use crate::{surface, theme, tray};
// one round slot per workspace, inside the pill's inset, the pill pill::left() px from the monitor's edge,
// the tray pill::tray_gap() after it (config.rs: workspaces.*)
@@ -196,17 +196,9 @@ pub fn view(monitor: &Monitor) -> LayerWindow {
layers.extend(slots);
let pill = Rectangle::new()
.width(width)
.height(island_pill::height())
.radius(Full)
.fill(backdrop(&theme.surfaces(), 255))
.border(1.0, theme.outline)
.shadow(Shadow::drop(theme.accent).opacity(0.3).blur(22.0))
.padding(pill::inset())
.align_child(Start, Center)
.on_hover(edge::over_bar)
.child(Stack::new(layers).width(row_w).height(pill::slot()));
let content = Rectangle::new().width(width).height(island_pill::height()).padding(pill::inset()).align_child(Start, Center).child(Stack::new(layers).width(row_w).height(pill::slot()));
let pill = surface::shell(width, island_pill::height(), island_pill::height() / 2.0, &theme.surfaces(), 0.0, content).on_hover(edge::over_bar);
// clicks next to the pills reach the windows underneath
let mut regions = vec![InputArea { x: pill::left() as i32, y: island_pill::top_gap() as i32, width: width.ceil() as i32, height: island_pill::height() as i32 }];