Introduce an appearance for a scrollable, ability to customize the scrollbar gap.
Update scrollable.rs
This commit is contained in:
parent
891f29eea0
commit
0f920e0435
4 changed files with 71 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use iced::executor;
|
||||
use iced::theme;
|
||||
use iced::widget::scrollable::{Properties, Scrollbar, Scroller};
|
||||
use iced::widget::scrollable::{Appearance, Properties, Scrollbar, Scroller};
|
||||
use iced::widget::{
|
||||
button, column, container, horizontal_space, progress_bar, radio, row,
|
||||
scrollable, slider, text, vertical_space,
|
||||
|
|
@ -355,6 +355,10 @@ struct ScrollbarCustomStyle;
|
|||
impl scrollable::StyleSheet for ScrollbarCustomStyle {
|
||||
type Style = Theme;
|
||||
|
||||
fn appearance(&self, style: &Self::Style) -> Appearance {
|
||||
style.appearance(&theme::Scrollable::Default)
|
||||
}
|
||||
|
||||
fn active(&self, style: &Self::Style) -> Scrollbar {
|
||||
style.active(&theme::Scrollable::Default)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue