Fix rule widget drawing outside of layout bounds
This commit is contained in:
parent
d475ae5b45
commit
0e46b3cbc8
1 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ where
|
||||||
let style = theme.style(&self.class);
|
let style = theme.style(&self.class);
|
||||||
|
|
||||||
let bounds = if self.is_horizontal {
|
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 (offset, line_width) = style.fill_mode.fill(bounds.width);
|
||||||
let line_x = bounds.x + offset;
|
let line_x = bounds.x + offset;
|
||||||
|
|
@ -146,7 +146,7 @@ where
|
||||||
height: bounds.height,
|
height: bounds.height,
|
||||||
}
|
}
|
||||||
} else {
|
} 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 (offset, line_height) = style.fill_mode.fill(bounds.height);
|
||||||
let line_y = bounds.y + offset;
|
let line_y = bounds.y + offset;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue