theme improvements
[?]
May 17, 2025, 4:04 PM
PKJCFSBMXXA2H3US47IJEB7QMIYLEKTLGWQUYEZSKCDODDQTD6HQCDependencies
- [2]
GWZGYNIBadd view crate - [3]
23SFYK4Qbig view refactor into a new crate - [4]
OPXFZKEBview tests setup - [5]
3QVNMRNMtest non-empty repo app view - [6]
MYGIBRRHwip custom theme
Change contents
- edit in inflorescence_view/src/theme.rs at line 6
gradient::{ColorStop, Linear}, - replacement in inflorescence_view/src/theme.rs at line 13
window, Background, Border, Color,window, Background, Border, Color, Gradient, Radians, - replacement in inflorescence_view/src/theme.rs at line 16
const DARK_BLUE: Color = color!(0x010032);const TEAL: Color = color!(0x3b8588);const MAGENTA: Color = color!(0xe933f6);const BLUE: Color = color!(0x010032);const BLUE_DARKER: Color = color!(0x010022);const BLUE_LIGHT: Color = color!(0x020056);const BLUE_DARK: Color = color!(0x000002);const TEAL: Color = color!(0x3B8588);const TEAL_LIGHTEST: Color = color!(0x97C9CB);const TEAL_LIGHT: Color = color!(0x5F9FA2);const TEAL_DARK: Color = color!(0x247074);const TEAL_DARKEST: Color = color!(0x115B5E);const MAGENTA: Color = color!(0xE933F6);const MAGENTA_LIGHT: Color = color!(0xEE5DF8);const MAGENTA_LIGHTEST: Color = color!(0xF38EFA);const MAGENTA_DARK: Color = color!(0xE208F1);const MAGENTA_DARKEST: Color = color!(0x68436B); - edit in inflorescence_view/src/theme.rs at line 34
const TURQOISE_LIGHT: Color = color!(0xA5FDE2);const TURQOISE_DARK: Color = color!(0x4CF5C2);const TEXT_COLOR: Color = TEAL_LIGHTEST;const APP_BG: Background = Background::Gradient(Gradient::Linear(Linear {angle: Radians(0.),stops: [Some(ColorStop {offset: 0.,color: BLUE,}),Some(ColorStop {offset: 1.,color: BLUE_DARKER,}),None,None,None,None,None,None,],})); - replacement in inflorescence_view/src/theme.rs at line 61
background: DARK_BLUE,background: BLUE, - edit in inflorescence_view/src/theme.rs at line 76
}#[derive(Debug, Clone, Copy)]pub enum Container {Normal,AppBg,}#[derive(Debug, Clone, Copy)]pub enum Text {Normal, - replacement in inflorescence_view/src/theme.rs at line 96
background_color: PALETTE.background,text_color: PALETTE.text,background_color: BLUE,text_color: TEXT_COLOR, - replacement in inflorescence_view/src/theme.rs at line 102
Some(PALETTE)None - edit in inflorescence_view/src/theme.rs at line 118
let primary = palette::Primary::generate(PALETTE.primary,PALETTE.background,PALETTE.text,); - replacement in inflorescence_view/src/theme.rs at line 119
background: Some(Background::Color(primary.base.color)),text_color: primary.base.text,border: border::rounded(2),background: Some(Background::Color(TURQOISE)),text_color: TEAL_DARKEST, - replacement in inflorescence_view/src/theme.rs at line 127
background: Some(Background::Color(primary.strong.color)),background: Some(Background::Color(TURQOISE_LIGHT)),text_color: BLUE, - edit in inflorescence_view/src/theme.rs at line 140
let border_radius = border::radius(2.);let border_width = 1.; - replacement in inflorescence_view/src/theme.rs at line 146
width: 1.0,..default()width: border_width,radius: border_radius, - replacement in inflorescence_view/src/theme.rs at line 152
background: Some(Background::Color(MAGENTA)),background: Some(Background::Color(MAGENTA_LIGHTEST)),text_color: BLUE_DARK, - replacement in inflorescence_view/src/theme.rs at line 155
color: Color::WHITE,width: 1.0,..default()color: MAGENTA,width: border_width,radius: border_radius, - replacement in inflorescence_view/src/theme.rs at line 166
type Class<'a> = ();type Class<'a> = Container; - replacement in inflorescence_view/src/theme.rs at line 169
()Container::Normal - replacement in inflorescence_view/src/theme.rs at line 173
container::Style::default()match class {Container::Normal => container::Style::default(),Container::AppBg => container::Style {background: Some(APP_BG),..default()},} - replacement in inflorescence_view/src/theme.rs at line 216
type Class<'a> = ();type Class<'a> = Text; - replacement in inflorescence_view/src/theme.rs at line 219
()Text::Normal - replacement in inflorescence_view/src/theme.rs at line 223
text::Style { color: None }match item {Text::Normal => text::Style { color: None },} - edit in inflorescence_view/src/theme.rs at line 265
// pub fn theme<S>(_state: &S, _window_id: window::Id) -> Theme {// let text = scale_rgb(TEAL, 2.);// Theme::custom(// "Inflorescence".to_string(),// theme::Palette {// background: DARK_BLUE,// text,// primary: MAGENTA,// success: TURQOISE,// warning: MAGENTA,// danger: MAGENTA,// },// )// } - replacement in inflorescence_view/src/lib.rs at line 5
mod util;mod element; - edit in inflorescence_view/src/lib.rs at line 8
pub use element::el; - edit in inflorescence_view/src/lib.rs at line 10
pub use util::el; - file move: util.rs → element.rs
- replacement in inflorescence_view/src/app.rs at line 8
use iced::widget::{button, column, row, scrollable, text};use iced::widget::{button, column, container, row, scrollable, text}; - replacement in inflorescence_view/src/app.rs at line 154
if let Some(repo) = state.repo.as_ref() {let inner = if let Some(repo) = state.repo.as_ref() { - replacement in inflorescence_view/src/app.rs at line 171
button(text(path))button(text(path).wrapping(text::Wrapping::WordOrGlyph)) - replacement in inflorescence_view/src/app.rs at line 191
text(file_path))text(file_path).wrapping(text::Wrapping::WordOrGlyph)) - replacement in inflorescence_view/src/app.rs at line 372
}};el(container(inner).class(theme::Container::AppBg).width(Length::Fill).height(Length::Fill)) - edit in inflorescence_view/src/app/test.rs at line 82
"a_very_veeeerrrrrrrrrryyyyyy_looooooooooonnnnnggggggg_name.rs".to_string(), - replacement in inflorescence_view/src/app/test.rs at line 84
changed_files: BTreeMap::from_iter([("changed_file.rs".to_string(),BTreeSet::default(),),("also_a_very_veeeerrrrrrrrrryyyyyy_looooooooooonnnnnggggggg_name.rs".to_string(),BTreeSet::default(),),("a/sub/dir/somewhere/deep/changed_file.rs".to_string(),BTreeSet::default(),),changed_files: BTreeMap::from_iter([("changed_file.rs".to_string(), BTreeSet::default()),("a/sub/dir/somewhere/deep/changed_file.rs".to_string(),BTreeSet::default(),), - replacement in inflorescence_view/src/app/test.rs at line 117
ix: 1,ix: 0,