Implement theme styling for Rule

This commit is contained in:
Héctor Ramón Jiménez 2022-06-01 01:56:46 +02:00
parent 6f69df3d41
commit c275fde67a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
8 changed files with 86 additions and 123 deletions

View file

@ -6,6 +6,7 @@ use crate::application;
use crate::button;
use crate::pane_grid;
use crate::radio;
use crate::rule;
use crate::slider;
use crate::toggler;
@ -279,3 +280,21 @@ impl pane_grid::StyleSheet for Theme {
})
}
}
/*
* Rule
*/
impl rule::StyleSheet for Theme {
type Style = ();
fn style(&self, _style: Self::Style) -> rule::Appearance {
let palette = self.extended_palette();
rule::Appearance {
color: palette.background.strong.color,
width: 1,
radius: 0.0,
fill_mode: rule::FillMode::Full,
}
}
}