Color picker: fix rare infinite loop in very weird situtations
This commit is contained in:
parent
f4ddc21740
commit
2dea4d8db2
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue