mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Floating scroll bars (#3539)
* Move scroll bar spacing settings to a `struct ScrollSpacing` * Add a demo for changing scroll bar appearance * Add setting for ScrollBarVisibility in demo * Add `#[inline]` to a `ScrollArea` builder methods * Refactor how scroll bar show/hide is computed * Add support for floating scroll bars * Tweak color and opacity of the scroll handle * Allow allocating a fixed size even for floating scroll bars * Add three pre-sets of scroll bars: solid, thin, floating * Use floating scroll bars as the default * Fix id-clash with bidir scroll areas * Improve demo * Fix doclink * Remove reset button from demo * Fix doclinks * Fix visual artifact with thin rounded rectangles * Fix doclink * typos
This commit is contained in:
@@ -366,9 +366,9 @@ impl<'a> TableBuilder<'a> {
|
||||
fn available_width(&self) -> f32 {
|
||||
self.ui.available_rect_before_wrap().width()
|
||||
- if self.scroll_options.vscroll {
|
||||
self.ui.spacing().scroll_bar_inner_margin
|
||||
+ self.ui.spacing().scroll_bar_width
|
||||
+ self.ui.spacing().scroll_bar_outer_margin
|
||||
self.ui.spacing().scroll.bar_inner_margin
|
||||
+ self.ui.spacing().scroll.bar_width
|
||||
+ self.ui.spacing().scroll.bar_outer_margin
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user