Fix rule widget drawing outside of layout bounds

This commit is contained in:
Héctor Ramón Jiménez 2025-08-02 20:28:12 +02:00
parent d475ae5b45
commit 0e46b3cbc8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -134,7 +134,7 @@ where
let style = theme.style(&self.class);
let bounds = if self.is_horizontal {
let line_y = (bounds.y + (bounds.height / 2.0)).round();
let line_y = bounds.y.round();
let (offset, line_width) = style.fill_mode.fill(bounds.width);
let line_x = bounds.x + offset;
@ -146,7 +146,7 @@ where
height: bounds.height,
}
} else {
let line_x = (bounds.x + (bounds.width / 2.0)).round();
let line_x = bounds.x.round();
let (offset, line_height) = style.fill_mode.fill(bounds.height);
let line_y = bounds.y + offset;