mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Color picker: fix rare infinite loop in very weird situtations
This commit is contained in:
@@ -19,6 +19,9 @@ const N: u32 = 6 * 6;
|
||||
|
||||
fn background_checkers(painter: &Painter, rect: Rect) {
|
||||
let rect = rect.shrink(0.5); // Small hack to avoid the checkers from peeking through the sides
|
||||
if !rect.is_positive() {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut top_color = Color32::from_gray(128);
|
||||
let mut bottom_color = Color32::from_gray(32);
|
||||
|
||||
Reference in New Issue
Block a user