mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Round the corners of the color picker (#8439)
The color picker's gradients and background checkers now follow the style's corner radius, giving it a softer look. This required changing the painting from being Mesh-based to being texture-based it's subtle with the default settings: <img width="286" height="397" alt="Screenshot 2026-08-21 at 15 08 18" src="https://github.com/user-attachments/assets/3a9d5289-71fb-4f34-8a20-1fe96891ba36" /> But you can [increase it](https://github.com/emilk/egui/pull/8445): <img width="285" height="391" alt="Screenshot 2026-08-21 at 15 08 41" src="https://github.com/user-attachments/assets/b0dfa7da-5b96-40e0-a80d-1da385d57a1a" /> ### Before for reference <img width="286" height="392" alt="Screenshot 2026-08-21 at 19 08 27" src="https://github.com/user-attachments/assets/7c754f36-795c-4381-9f9f-1fc8dd9a0264" /> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,13 @@ impl RoundedRect {
|
||||
)
|
||||
}
|
||||
|
||||
/// Shrink the rectangle and the corner radii by the given amount.
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub fn shrink(self, amount: f32) -> Self {
|
||||
self.expand(-amount)
|
||||
}
|
||||
|
||||
/// Clamp the given position to lie within this rounded rectangle.
|
||||
///
|
||||
/// Positions in the corner regions are projected onto the corner arcs.
|
||||
|
||||
Reference in New Issue
Block a user