feat: enhance configuration management and UI styling, remove unused theme module
This commit is contained in:
@@ -112,7 +112,12 @@ fn view(state: &KLauncherApp) -> Element<'_, Message> {
|
||||
.id(INPUT_ID.clone())
|
||||
.on_input(Message::QueryChanged)
|
||||
.padding(12)
|
||||
.size(cfg.search_font_size);
|
||||
.size(cfg.search_font_size)
|
||||
.style(|theme, _status| {
|
||||
let mut s = iced::widget::text_input::default(theme, iced::widget::text_input::Status::Active);
|
||||
s.border = Border { color: Color::TRANSPARENT, width: 0.0, radius: 0.0.into() };
|
||||
s
|
||||
});
|
||||
|
||||
let row_radius: f32 = cfg.row_radius;
|
||||
let title_size: f32 = cfg.title_size;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
mod app;
|
||||
pub mod theme;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
use iced::{
|
||||
Color, Gradient,
|
||||
gradient::{ColorStop, Linear},
|
||||
};
|
||||
|
||||
pub struct AeroColors {
|
||||
pub glass_bg: Color,
|
||||
pub gloss_highlight: Gradient,
|
||||
pub border_cyan: Color,
|
||||
}
|
||||
|
||||
pub static AERO: std::sync::LazyLock<AeroColors> =
|
||||
std::sync::LazyLock::new(AeroColors::standard);
|
||||
|
||||
impl AeroColors {
|
||||
pub fn standard() -> Self {
|
||||
Self {
|
||||
// Semi-transparent "Aero Glass" base
|
||||
glass_bg: Color::from_rgba8(255, 255, 255, 0.2),
|
||||
// Cyan/Blue glow typical of the 2008 era
|
||||
border_cyan: Color::from_rgb8(0, 183, 235),
|
||||
// We'll use this for the "shine" effect on buttons
|
||||
gloss_highlight: Gradient::Linear(Linear::new(0.0).add_stops([
|
||||
ColorStop {
|
||||
color: Color::from_rgba8(255, 255, 255, 0.5),
|
||||
offset: 0.0,
|
||||
},
|
||||
ColorStop {
|
||||
color: Color::from_rgba8(255, 255, 255, 0.0),
|
||||
offset: 1.0,
|
||||
},
|
||||
])),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user