summaryrefslogtreecommitdiffstats
path: root/style/src/scrollable.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-03-08 14:00:28 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-08 14:00:28 +0100
commitedf7d7ca7593f660f4b15f154257471c26df87de (patch)
tree7cee3cbfbeb2ae5145f1bf6087b61fce4cbed8c9 /style/src/scrollable.rs
parent2074757cdc65ec16eeb1c7a12a5ff3bb5ed00859 (diff)
parent8919f2593e39f76b273513e959fa6d5ffb78fde2 (diff)
downloadiced-edf7d7ca7593f660f4b15f154257471c26df87de.tar.gz
iced-edf7d7ca7593f660f4b15f154257471c26df87de.tar.bz2
iced-edf7d7ca7593f660f4b15f154257471c26df87de.zip
Merge pull request #2312 from iced-rs/theming-reloaded
Theming reloaded
Diffstat (limited to 'style/src/scrollable.rs')
-rw-r--r--style/src/scrollable.rs55
1 files changed, 0 insertions, 55 deletions
diff --git a/style/src/scrollable.rs b/style/src/scrollable.rs
deleted file mode 100644
index d2348510..00000000
--- a/style/src/scrollable.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-//! Change the appearance of a scrollable.
-use crate::container;
-use crate::core::{Background, Border, Color};
-
-/// The appearance of a scrolable.
-#[derive(Debug, Clone, Copy)]
-pub struct Appearance {
- /// The [`container::Appearance`] of a scrollable.
- pub container: container::Appearance,
- /// The [`Scrollbar`] appearance.
- pub scrollbar: Scrollbar,
- /// The [`Background`] of the gap between a horizontal and vertical scrollbar.
- pub gap: Option<Background>,
-}
-
-/// The appearance of the scrollbar of a scrollable.
-#[derive(Debug, Clone, Copy)]
-pub struct Scrollbar {
- /// The [`Background`] of a scrollbar.
- pub background: Option<Background>,
- /// The [`Border`] of a scrollbar.
- pub border: Border,
- /// The appearance of the [`Scroller`] of a scrollbar.
- pub scroller: Scroller,
-}
-
-/// The appearance of the scroller of a scrollable.
-#[derive(Debug, Clone, Copy)]
-pub struct Scroller {
- /// The [`Color`] of the scroller.
- pub color: Color,
- /// The [`Border`] of the scroller.
- pub border: Border,
-}
-
-/// A set of rules that dictate the style of a scrollable.
-pub trait StyleSheet {
- /// The supported style of the [`StyleSheet`].
- type Style: Default;
-
- /// Produces the [`Appearance`] of an active scrollable.
- fn active(&self, style: &Self::Style) -> Appearance;
-
- /// Produces the [`Appearance`] of a scrollable when it is being hovered.
- fn hovered(
- &self,
- style: &Self::Style,
- is_mouse_over_scrollbar: bool,
- ) -> Appearance;
-
- /// Produces the [`Appearance`] of a scrollable when it is being dragged.
- fn dragging(&self, style: &Self::Style) -> Appearance {
- self.hovered(style, true)
- }
-}