mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 07:10:04 -04:00
Nicer window resize icon
This commit is contained in:
@@ -268,6 +268,7 @@ fn paint_resize_corner(
|
|||||||
style: &Style,
|
style: &Style,
|
||||||
interact: &InteractInfo,
|
interact: &InteractInfo,
|
||||||
) -> PaintCmd {
|
) -> PaintCmd {
|
||||||
|
if false {
|
||||||
// TODO: Path::circle_sector() or something
|
// TODO: Path::circle_sector() or something
|
||||||
let quadrant = 0.0; // Bottom-right
|
let quadrant = 0.0; // Bottom-right
|
||||||
let mut path = Path::default();
|
let mut path = Path::default();
|
||||||
@@ -282,4 +283,21 @@ fn paint_resize_corner(
|
|||||||
fill_color: style.interact_fill_color(&interact),
|
fill_color: style.interact_fill_color(&interact),
|
||||||
outline: style.interact_outline(&interact),
|
outline: style.interact_outline(&interact),
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
let offset = 3.0;
|
||||||
|
let center = center;
|
||||||
|
let radius = radius - offset;
|
||||||
|
let quadrant = 0.0; // Bottom-right
|
||||||
|
let mut path = Path::default();
|
||||||
|
path.add_circle_quadrant(center, radius, quadrant);
|
||||||
|
PaintCmd::Path {
|
||||||
|
path,
|
||||||
|
closed: false,
|
||||||
|
fill_color: None,
|
||||||
|
outline: Some(Outline::new(
|
||||||
|
style.interact_stroke_width(&interact),
|
||||||
|
style.interact_stroke_color(&interact),
|
||||||
|
)),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user