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:
b1n
2024-07-09 09:59:56 +08:00
parent c5cfb7e082
commit ed890a4186
14 changed files with 4919 additions and 1407 deletions

22
src/style/button.rs Normal file
View 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
View File

@@ -0,0 +1,2 @@
pub mod button;
pub mod svg;

7
src/style/svg.rs Normal file
View 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),
}
}