scrollbar: Fix Scrollbar inset and remove bar border. (#236)
<img width="920" alt="image" src="https://github.com/user-attachments/assets/f834a920-8f89-4be8-9100-d2b5e4364449">
This commit is contained in:
parent
77cb8cb448
commit
cf551654fe
1 changed files with 7 additions and 7 deletions
|
|
@ -379,26 +379,26 @@ impl Element for Scrollbar {
|
|||
)
|
||||
};
|
||||
|
||||
let border_width = px(1.);
|
||||
let border_width = px(0.);
|
||||
let thumb_bounds = if is_vertical {
|
||||
Bounds::from_corners(
|
||||
point(
|
||||
bounds.origin.x + inset + border_width,
|
||||
bounds.origin.y + thumb_start,
|
||||
bounds.origin.y + thumb_start + inset,
|
||||
),
|
||||
point(
|
||||
bounds.origin.x + self.width - inset,
|
||||
bounds.origin.y + thumb_end,
|
||||
bounds.origin.y + thumb_end - inset,
|
||||
),
|
||||
)
|
||||
} else {
|
||||
Bounds::from_corners(
|
||||
point(
|
||||
bounds.origin.x + thumb_start,
|
||||
bounds.origin.x + thumb_start + inset,
|
||||
bounds.origin.y + inset + border_width,
|
||||
),
|
||||
point(
|
||||
bounds.origin.x + thumb_end,
|
||||
bounds.origin.x + thumb_end - inset,
|
||||
bounds.origin.y + self.width - inset,
|
||||
),
|
||||
)
|
||||
|
|
@ -420,10 +420,10 @@ impl Element for Scrollbar {
|
|||
}
|
||||
} else {
|
||||
Edges {
|
||||
top: px(1.),
|
||||
top: border_width,
|
||||
right: px(0.),
|
||||
bottom: px(0.),
|
||||
left: border_width,
|
||||
left: px(0.),
|
||||
}
|
||||
},
|
||||
border_color: bar_border,
|
||||
|
|
|
|||
Loading…
Reference in a new issue