renamed scrollable styles
This commit is contained in:
parent
4f41927155
commit
c337bf297d
3 changed files with 21 additions and 21 deletions
|
|
@ -858,9 +858,9 @@ pub fn draw<Renderer>(
|
||||||
let style = if state.y_scroller_grabbed_at.is_some() {
|
let style = if state.y_scroller_grabbed_at.is_some() {
|
||||||
theme.dragging(style)
|
theme.dragging(style)
|
||||||
} else if mouse_over_y_scrollbar {
|
} else if mouse_over_y_scrollbar {
|
||||||
theme.hovered(style)
|
theme.hovered_scrollbar(style)
|
||||||
} else if mouse_over_scrollable {
|
} else if mouse_over_scrollable {
|
||||||
theme.focused(style)
|
theme.hovered(style)
|
||||||
} else {
|
} else {
|
||||||
theme.active(style)
|
theme.active(style)
|
||||||
};
|
};
|
||||||
|
|
@ -873,9 +873,9 @@ pub fn draw<Renderer>(
|
||||||
let style = if state.x_scroller_grabbed_at.is_some() {
|
let style = if state.x_scroller_grabbed_at.is_some() {
|
||||||
theme.dragging_horizontal(style)
|
theme.dragging_horizontal(style)
|
||||||
} else if mouse_over_x_scrollbar {
|
} else if mouse_over_x_scrollbar {
|
||||||
theme.hovered_horizontal(style)
|
theme.hovered_scrollbar_horizontal(style)
|
||||||
} else if mouse_over_scrollable {
|
} else if mouse_over_scrollable {
|
||||||
theme.focused_horizontal(style)
|
theme.hovered_horizontal(style)
|
||||||
} else {
|
} else {
|
||||||
theme.active_horizontal(style)
|
theme.active_horizontal(style)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,15 @@ pub trait StyleSheet {
|
||||||
fn active(&self, style: &Self::Style) -> Scrollbar;
|
fn active(&self, style: &Self::Style) -> Scrollbar;
|
||||||
|
|
||||||
/// Produces the style of a hovered scrollbar.
|
/// Produces the style of a hovered scrollbar.
|
||||||
fn hovered(&self, style: &Self::Style) -> Scrollbar;
|
fn hovered_scrollbar(&self, style: &Self::Style) -> Scrollbar;
|
||||||
|
|
||||||
/// Produces the style of a scrollbar that is being dragged.
|
/// Produces the style of a scrollbar that is being dragged.
|
||||||
fn dragging(&self, style: &Self::Style) -> Scrollbar {
|
fn dragging(&self, style: &Self::Style) -> Scrollbar {
|
||||||
self.hovered(style)
|
self.hovered_scrollbar(style)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Produces the style of a scrollbar when mouse is over the scrollable area.
|
/// Produces the style of a scrollbar when mouse is over the scrollable area.
|
||||||
fn focused(&self, style: &Self::Style) -> Scrollbar {
|
fn hovered(&self, style: &Self::Style) -> Scrollbar {
|
||||||
self.active(style)
|
self.active(style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,17 +56,17 @@ pub trait StyleSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Produces the style of a hovered horizontal scrollbar.
|
/// Produces the style of a hovered horizontal scrollbar.
|
||||||
fn hovered_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
fn hovered_scrollbar_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
||||||
self.hovered(style)
|
self.hovered_scrollbar(style)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Produces the style of a horizontal scrollbar that is being dragged.
|
/// Produces the style of a horizontal scrollbar that is being dragged.
|
||||||
fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
||||||
self.hovered_horizontal(style)
|
self.hovered_scrollbar_horizontal(style)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Produces the style of a horizontal scrollbar when mouse is over the scrollable area.
|
/// Produces the style of a horizontal scrollbar when mouse is over the scrollable area.
|
||||||
fn focused_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
fn hovered_horizontal(&self, style: &Self::Style) -> Scrollbar {
|
||||||
self.active_horizontal(style)
|
self.active_horizontal(style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -906,7 +906,7 @@ impl scrollable::StyleSheet for Theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hovered(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
fn hovered_scrollbar(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||||
match style {
|
match style {
|
||||||
Scrollable::Default => {
|
Scrollable::Default => {
|
||||||
let palette = self.extended_palette();
|
let palette = self.extended_palette();
|
||||||
|
|
@ -924,21 +924,21 @@ impl scrollable::StyleSheet for Theme {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Scrollable::Custom(custom) => custom.hovered(self),
|
Scrollable::Custom(custom) => custom.hovered_scrollbar(self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dragging(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
fn dragging(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||||
match style {
|
match style {
|
||||||
Scrollable::Default => self.hovered(style),
|
Scrollable::Default => self.hovered_scrollbar(style),
|
||||||
Scrollable::Custom(custom) => custom.dragging(self),
|
Scrollable::Custom(custom) => custom.dragging(self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn focused(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
fn hovered(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||||
match style {
|
match style {
|
||||||
Scrollable::Default => self.active(style),
|
Scrollable::Default => self.active(style),
|
||||||
Scrollable::Custom(custom) => custom.focused(self),
|
Scrollable::Custom(custom) => custom.hovered(self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -949,10 +949,10 @@ impl scrollable::StyleSheet for Theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hovered_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
fn hovered_scrollbar_horizontal(&self, style: &Self::Style) -> scrollable::Scrollbar {
|
||||||
match style {
|
match style {
|
||||||
Scrollable::Default => self.hovered(style),
|
Scrollable::Default => self.hovered_scrollbar(style),
|
||||||
Scrollable::Custom(custom) => custom.hovered_horizontal(self),
|
Scrollable::Custom(custom) => custom.hovered_scrollbar_horizontal(self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -966,13 +966,13 @@ impl scrollable::StyleSheet for Theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn focused_horizontal(
|
fn hovered_horizontal(
|
||||||
&self,
|
&self,
|
||||||
style: &Self::Style,
|
style: &Self::Style,
|
||||||
) -> scrollable::Scrollbar {
|
) -> scrollable::Scrollbar {
|
||||||
match style {
|
match style {
|
||||||
Scrollable::Default => self.active_horizontal(style),
|
Scrollable::Default => self.active_horizontal(style),
|
||||||
Scrollable::Custom(custom) => custom.focused_horizontal(self),
|
Scrollable::Custom(custom) => custom.hovered_horizontal(self),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue