File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
crates/egui/src/containers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -960,6 +960,10 @@ impl Prepared {
960
960
let main_range = Rangef :: new ( inner_rect. min [ d] , inner_rect. max [ d] ) ;
961
961
962
962
// Margin on either side of the scroll bar:
963
+ let inner_margin = match scroll_style. floating {
964
+ true => 0.0 ,
965
+ false => show_factor * scroll_style. bar_inner_margin ,
966
+ } ;
963
967
let outer_margin = show_factor * scroll_style. bar_outer_margin ;
964
968
965
969
let mut max_cross = outer_rect. max [ 1 - d] - outer_margin;
@@ -1005,12 +1009,12 @@ impl Prepared {
1005
1009
1006
1010
let outer_scroll_rect = if d == 0 {
1007
1011
Rect :: from_min_max (
1008
- pos2 ( inner_rect. left ( ) , cross. min ) ,
1012
+ pos2 ( inner_rect. left ( ) , cross. min - inner_margin ) ,
1009
1013
pos2 ( inner_rect. right ( ) , cross. max ) ,
1010
1014
)
1011
1015
} else {
1012
1016
Rect :: from_min_max (
1013
- pos2 ( cross. min , inner_rect. top ( ) ) ,
1017
+ pos2 ( cross. min - inner_margin , inner_rect. top ( ) ) ,
1014
1018
pos2 ( cross. max , inner_rect. bottom ( ) ) ,
1015
1019
)
1016
1020
} ;
You can’t perform that action at this time.
0 commit comments