diff options
| author | srdusr <[email protected]> | 2026-08-30 20:41:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-08-30 20:41:00 +0200 |
| commit | f2f9ed1b3f9c49b323ce591eb72a406058d324a4 (patch) | |
| tree | 12a53c9c527c0a63a4d93ed197af3f9edf2fca79 /crates/wayland/src/decoration | |
| parent | bac91a6162542025676f57afc3e514b88aa65366 (diff) | |
| download | srdwm-f2f9ed1b3f9c49b323ce591eb72a406058d324a4.tar.gz srdwm-f2f9ed1b3f9c49b323ce591eb72a406058d324a4.zip | |
Indent doc list continuations
Diffstat (limited to 'crates/wayland/src/decoration')
| -rw-r--r-- | crates/wayland/src/decoration/border.rs | 8 | ||||
| -rw-r--r-- | crates/wayland/src/decoration/buttons.rs | 2 | ||||
| -rw-r--r-- | crates/wayland/src/decoration/corners.rs | 14 | ||||
| -rw-r--r-- | crates/wayland/src/decoration/shadow.rs | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/crates/wayland/src/decoration/border.rs b/crates/wayland/src/decoration/border.rs index 9e29fe6..0d7443d 100644 --- a/crates/wayland/src/decoration/border.rs +++ b/crates/wayland/src/decoration/border.rs @@ -1,7 +1,7 @@ //! The four solid-colour strips around a decorated window's own `geometry` //! - top/bottom rendered as small rounded bitmaps (their own two outer -//! corners cut to match `titlebar::render_titlebar`'s), left/right left to -//! the caller as plain flat fills (`elements::border_side_render_element`). +//! corners cut to match `titlebar::render_titlebar`'s), left/right left to +//! the caller as plain flat fills (`elements::border_side_render_element`). use super::color::rgb_to_bgra; use super::corners::{round_bottom_corners, round_top_corners, InnerRing}; @@ -138,8 +138,8 @@ fn clip_middle_beyond_thickness(buf: &mut [u8], width: usize, radius: usize, row /// decorated window or not (a decorated window still gets its own bottom /// two corners content-masked - `RoundedCorners::BOTTOM_ONLY`, not `NONE` /// - specifically so this strip has real rounded content to meet). See -/// [`InnerRing`]'s own doc comment for why that's a different circle from -/// the titlebar-aligned one `render_border_top` sometimes needs. +/// [`InnerRing`]'s own doc comment for why that's a different circle from +/// the titlebar-aligned one `render_border_top` sometimes needs. pub fn render_border_bottom(width: u32, thickness: u32, color: (u8, u8, u8), radius: u32) -> Vec<u8> { let (width, thickness) = (width.max(1) as usize, thickness.max(1) as usize); let height = thickness.max(radius as usize).max(1); diff --git a/crates/wayland/src/decoration/buttons.rs b/crates/wayland/src/decoration/buttons.rs index bb2a709..07de32c 100644 --- a/crates/wayland/src/decoration/buttons.rs +++ b/crates/wayland/src/decoration/buttons.rs @@ -89,7 +89,7 @@ pub(super) fn button_box(width: usize, height: usize, offset: usize, from_left: /// alpha to clip it away), this blends *toward* `color` over whatever's /// already in `buf` - the titlebar background, always already opaque here /// - so the result stays fully opaque at every edge pixel rather than -/// letting the background show through a soft ring. +/// letting the background show through a soft ring. pub(super) fn fill_button_dot(buf: &mut [u8], width: usize, height: usize, offset: usize, from_left: bool, margin: f32, color: (u8, u8, u8)) { let (x0, y0, x1, y1) = button_box(width, height, offset, from_left, margin); let cx = (x0 + x1) as f32 / 2.0; diff --git a/crates/wayland/src/decoration/corners.rs b/crates/wayland/src/decoration/corners.rs index d3ec611..bec4253 100644 --- a/crates/wayland/src/decoration/corners.rs +++ b/crates/wayland/src/decoration/corners.rs @@ -277,14 +277,14 @@ fn scale_pixel(buf: &mut [u8], width: usize, x: usize, y: usize, mask: f32) { /// cut anything *inside* it - so the strip's own "extra" rows (past its /// nominal `border_width`, present whenever `corner_radius > border_width` /// - see `render_border_top`'s own doc comment) stayed a solid *filled* -/// quarter-disk out to the centre column/row, then hit `clip_middle_ +/// quarter-disk out to the centre column/row, then hit `clip_middle_ /// beyond_thickness`'s hard, unblended rectangular cut at exactly column/ -/// row `radius` - which is essentially the disk's own *most opaque* -/// point (dead centre, mask ~1.0), not somewhere the curve had already -/// faded out. The result: a solid wedge of border colour with two straight -/// inner edges meeting the titlebar/content at a right angle, not a -/// uniform-width curved ring - confirmed live, zoomed: a clean rectangular -/// step, not a blend, reported as "squares on the inside corners." +/// row `radius` - which is essentially the disk's own *most opaque* +/// point (dead centre, mask ~1.0), not somewhere the curve had already +/// faded out. The result: a solid wedge of border colour with two straight +/// inner edges meeting the titlebar/content at a right angle, not a +/// uniform-width curved ring - confirmed live, zoomed: a clean rectangular +/// step, not a blend, reported as "squares on the inside corners." /// /// The fix: cut *this* pixel wherever it falls within `border_width` of /// the *same* shared centre `blend_corner_pixel` already cut around -- diff --git a/crates/wayland/src/decoration/shadow.rs b/crates/wayland/src/decoration/shadow.rs index 7c89ae0..9b7f89f 100644 --- a/crates/wayland/src/decoration/shadow.rs +++ b/crates/wayland/src/decoration/shadow.rs @@ -229,7 +229,7 @@ pub(super) fn rounded_edge_distance(dx: u32, dy: u32, radius: u32) -> u32 { /// How far outside `[margin, margin + extent)` - the window's own span /// along one axis, inside the shadow's `margin`-pixel border on each side /// - position `pos` sits, in pixels. `0` anywhere inside that span -/// (including exactly on its edge). +/// (including exactly on its edge). fn edge_distance(pos: u32, margin: u32, extent: u32) -> u32 { if pos < margin { margin - pos |