summaryrefslogtreecommitdiffstats
path: root/style/src/theme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/theme.rs')
-rw-r--r--style/src/theme.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/style/src/theme.rs b/style/src/theme.rs
index 8ed15408..a7a95ab0 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -8,7 +8,6 @@ use crate::core::widget::text;
use crate::menu;
use crate::pane_grid;
use crate::pick_list;
-use crate::rule;
use crate::svg;
use crate::text_editor;
use crate::toggler;
@@ -511,48 +510,6 @@ impl pane_grid::StyleSheet for Theme {
}
}
-/// The style of a rule.
-#[derive(Default)]
-pub enum Rule {
- /// The default style.
- #[default]
- Default,
- /// A custom style.
- Custom(Box<dyn rule::StyleSheet<Style = Theme>>),
-}
-
-impl<T: Fn(&Theme) -> rule::Appearance + 'static> From<T> for Rule {
- fn from(f: T) -> Self {
- Self::Custom(Box::new(f))
- }
-}
-
-impl rule::StyleSheet for Theme {
- type Style = Rule;
-
- fn appearance(&self, style: &Self::Style) -> rule::Appearance {
- let palette = self.extended_palette();
-
- match style {
- Rule::Default => rule::Appearance {
- color: palette.background.strong.color,
- width: 1,
- radius: 0.0.into(),
- fill_mode: rule::FillMode::Full,
- },
- Rule::Custom(custom) => custom.appearance(self),
- }
- }
-}
-
-impl<T: Fn(&Theme) -> rule::Appearance> rule::StyleSheet for T {
- type Style = Theme;
-
- fn appearance(&self, style: &Self::Style) -> rule::Appearance {
- (self)(style)
- }
-}
-
/**
* Svg
*/