added function focused and focused_horizontal to theme.rs
This commit is contained in:
parent
eaa2238600
commit
49e9a9a537
2 changed files with 19 additions and 2 deletions
|
|
@ -859,7 +859,7 @@ pub fn draw<Renderer>(
|
|||
} else if mouse_over_scrollable {
|
||||
theme.focused(style)
|
||||
} else {
|
||||
theme.focused(style)
|
||||
theme.active(style)
|
||||
};
|
||||
|
||||
draw_scrollbar(renderer, style, &scrollbar);
|
||||
|
|
@ -874,7 +874,7 @@ pub fn draw<Renderer>(
|
|||
} else if mouse_over_scrollable {
|
||||
theme.focused_horizontal(style)
|
||||
} else {
|
||||
theme.focused_horizontal(style)
|
||||
theme.active_horizontal(style)
|
||||
};
|
||||
|
||||
draw_scrollbar(renderer, style, &scrollbar);
|
||||
|
|
|
|||
|
|
@ -935,6 +935,13 @@ impl scrollable::StyleSheet for Theme {
|
|||
}
|
||||
}
|
||||
|
||||
fn focused(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||
match style {
|
||||
Scrollable::Default => self.active(style),
|
||||
Scrollable::Custom(custom) => custom.focused(self),
|
||||
}
|
||||
}
|
||||
|
||||
fn active_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||
match style {
|
||||
Scrollable::Default => self.active(style),
|
||||
|
|
@ -958,6 +965,16 @@ impl scrollable::StyleSheet for Theme {
|
|||
Scrollable::Custom(custom) => custom.dragging_horizontal(self),
|
||||
}
|
||||
}
|
||||
|
||||
fn focused_horizontal(
|
||||
&self,
|
||||
style: &Self::Style,
|
||||
) -> scrollable::Scrollbar {
|
||||
match style {
|
||||
Scrollable::Default => self.active_horizontal(style),
|
||||
Scrollable::Custom(custom) => custom.focused_horizontal(self),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The style of text.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue