summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/scrollable.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs
index e084d4b0..c1df8c39 100644
--- a/native/src/widget/scrollable.rs
+++ b/native/src/widget/scrollable.rs
@@ -1116,8 +1116,9 @@ impl Scrollbars {
// Bounds of just the scrollbar
let scrollbar_bounds = Rectangle {
- x: bounds.x + bounds.width - total_scrollbar_width / 2.0
- + width / 2.0,
+ x: bounds.x + bounds.width
+ - total_scrollbar_width / 2.0
+ - width / 2.0,
y: bounds.y,
width,
height: (bounds.height - x_scrollbar_height).max(0.0),
@@ -1129,8 +1130,9 @@ impl Scrollbars {
let scroller_offset = offset.y * ratio;
let scroller_bounds = Rectangle {
- x: bounds.x + bounds.width - total_scrollbar_width / 2.0
- + scroller_width / 2.0,
+ x: bounds.x + bounds.width
+ - total_scrollbar_width / 2.0
+ - scroller_width / 2.0,
y: (scrollbar_bounds.y + scroller_offset - x_scrollbar_height)
.max(0.0),
width: scroller_width,
@@ -1175,8 +1177,9 @@ impl Scrollbars {
// Bounds of just the scrollbar
let scrollbar_bounds = Rectangle {
x: bounds.x,
- y: bounds.y + bounds.height - total_scrollbar_height / 2.0
- + width / 2.0,
+ y: bounds.y + bounds.height
+ - total_scrollbar_height / 2.0
+ - width / 2.0,
width: (bounds.width - scrollbar_y_width).max(0.0),
height: width,
};
@@ -1189,9 +1192,9 @@ impl Scrollbars {
let scroller_bounds = Rectangle {
x: (scrollbar_bounds.x + scroller_offset - scrollbar_y_width)
.max(0.0),
- y: bounds.y + bounds.height - total_scrollbar_height / 2.0
- + scroller_width / 2.0,
-
+ y: bounds.y + bounds.height
+ - total_scrollbar_height / 2.0
+ - scroller_width / 2.0,
width: scroller_length,
height: scroller_width,
};