mirror of
https://github.com/pumpbin/pumpbin
synced 2026-03-14 23:04:30 -07:00
feat!: v1.0.0
Implementing a Plug-in System with Extism. Serialize the Plugin struct with Cap'n Proto for backward compatibility. Refactor the project code.
This commit is contained in:
22
src/style/button.rs
Normal file
22
src/style/button.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use iced::{
|
||||
widget::button::{Status, Style},
|
||||
Theme,
|
||||
};
|
||||
|
||||
pub fn selected(theme: &Theme, _: Status) -> Style {
|
||||
let palette = theme.extended_palette();
|
||||
let mut style = Style::default();
|
||||
style.border.width = 1.0;
|
||||
style.text_color = palette.success.base.color;
|
||||
style.border.color = palette.success.base.color;
|
||||
style
|
||||
}
|
||||
|
||||
pub fn unselected(theme: &Theme, _: Status) -> Style {
|
||||
let palette = theme.extended_palette();
|
||||
let mut style = Style::default();
|
||||
style.border.width = 1.0;
|
||||
style.text_color = palette.primary.base.color;
|
||||
style.border.color = palette.primary.base.color;
|
||||
style
|
||||
}
|
||||
2
src/style/mod.rs
Normal file
2
src/style/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
pub mod button;
|
||||
pub mod svg;
|
||||
7
src/style/svg.rs
Normal file
7
src/style/svg.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use iced::{widget::svg, Theme};
|
||||
|
||||
pub fn svg_primary_base(theme: &Theme, _: svg::Status) -> svg::Style {
|
||||
svg::Style {
|
||||
color: Some(theme.extended_palette().primary.base.color),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user