LoganDark 2023-11-14 23:04:03 -08:00 committed by GitHub
parent cd46691423
commit fb8fa67afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -812,6 +812,11 @@ impl Prepared {
// Paint the bars:
for d in 0..2 {
// maybe force increase in offset to keep scroll stuck to end position
if stick_to_end[d] && state.scroll_stuck_to_end[d] {
state.offset[d] = content_size[d] - inner_rect.size()[d];
}
let show_factor = show_bars_factor[d];
if show_factor == 0.0 {
state.scroll_bar_interaction[d] = false;
@ -882,11 +887,6 @@ impl Prepared {
)
};
// maybe force increase in offset to keep scroll stuck to end position
if stick_to_end[d] && state.scroll_stuck_to_end[d] {
state.offset[d] = content_size[d] - inner_rect.size()[d];
}
let from_content = |content| remap_clamp(content, 0.0..=content_size[d], main_range);
let handle_rect = if d == 0 {