summaryrefslogtreecommitdiff
path: root/schist_desktop_gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'schist_desktop_gui/src')
-rw-r--r--schist_desktop_gui/src/gui/components/balances_view/view_balances_view.rs2
-rw-r--r--schist_desktop_gui/src/gui/components/buckets_view.rs2
-rw-r--r--schist_desktop_gui/src/gui/components/table/view_table.rs6
-rw-r--r--schist_desktop_gui/src/gui/components/transactions_view/view_transactions_view.rs2
-rw-r--r--schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs2
-rw-r--r--schist_desktop_gui/src/main.rs4
-rw-r--r--schist_desktop_gui/src/theme.rs11
7 files changed, 20 insertions, 9 deletions
diff --git a/schist_desktop_gui/src/gui/components/balances_view/view_balances_view.rs b/schist_desktop_gui/src/gui/components/balances_view/view_balances_view.rs
index 22f22b6..013a6fb 100644
--- a/schist_desktop_gui/src/gui/components/balances_view/view_balances_view.rs
+++ b/schist_desktop_gui/src/gui/components/balances_view/view_balances_view.rs
@@ -24,7 +24,7 @@ impl<'a> Viewable<'a, Message> for BalancesView {
]
.align_y(alignment::Vertical::Center)
.height(Length::Fill)
- .spacing(SPACING_LG)
+ .spacing(u32::from(SPACING_LG))
.into()
}
}
diff --git a/schist_desktop_gui/src/gui/components/buckets_view.rs b/schist_desktop_gui/src/gui/components/buckets_view.rs
index 7f5b218..8f12019 100644
--- a/schist_desktop_gui/src/gui/components/buckets_view.rs
+++ b/schist_desktop_gui/src/gui/components/buckets_view.rs
@@ -115,7 +115,7 @@ impl<'a> Viewable<'a, Message> for BucketsView {
]
.align_y(alignment::Vertical::Center)
.height(Length::Fill)
- .spacing(SPACING_LG)
+ .spacing(u32::from(SPACING_LG))
.into()
}
}
diff --git a/schist_desktop_gui/src/gui/components/table/view_table.rs b/schist_desktop_gui/src/gui/components/table/view_table.rs
index 3d4da64..725c5ff 100644
--- a/schist_desktop_gui/src/gui/components/table/view_table.rs
+++ b/schist_desktop_gui/src/gui/components/table/view_table.rs
@@ -18,7 +18,7 @@ where
.width(iced::Length::Fixed(col.width))
.into()
}))
- .spacing(SPACING_MD);
+ .spacing(u32::from(SPACING_MD));
let rows = column(self.rows.iter().map(|row_data| {
row(self.cols.iter().map(|col| {
@@ -34,11 +34,11 @@ where
.width(iced::Length::Fixed(col.width))
.into()
}))
- .spacing(SPACING_MD)
+ .spacing(u32::from(SPACING_MD))
.into()
}));
- scrollable(column![headers, rows].spacing(SPACING_MD))
+ scrollable(column![headers, rows].spacing(u32::from(SPACING_MD)))
.direction(ScrollableDirection::Both {
horizontal: Default::default(),
vertical: Default::default(),
diff --git a/schist_desktop_gui/src/gui/components/transactions_view/view_transactions_view.rs b/schist_desktop_gui/src/gui/components/transactions_view/view_transactions_view.rs
index d1f6af2..8102314 100644
--- a/schist_desktop_gui/src/gui/components/transactions_view/view_transactions_view.rs
+++ b/schist_desktop_gui/src/gui/components/transactions_view/view_transactions_view.rs
@@ -20,7 +20,7 @@ impl<'a> Viewable<'a, Message> for TransactionsView {
]
.align_y(alignment::Vertical::Center)
.height(Length::Fill)
- .spacing(SPACING_LG)
+ .spacing(u32::from(SPACING_LG))
.into()
}
}
diff --git a/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs b/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
index 9852b53..86ce910 100644
--- a/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
+++ b/schist_desktop_gui/src/gui/screens/main_screen/main_screen.rs
@@ -65,7 +65,7 @@ impl<'a> Viewable<'a, Message> for MainScreen {
]
.align_y(alignment::Vertical::Center)
.height(Length::Fill)
- .spacing(SPACING_LG)
+ .spacing(u32::from(SPACING_LG))
.into()
}
}
diff --git a/schist_desktop_gui/src/main.rs b/schist_desktop_gui/src/main.rs
index a5749d3..3f18452 100644
--- a/schist_desktop_gui/src/main.rs
+++ b/schist_desktop_gui/src/main.rs
@@ -24,11 +24,11 @@ use crate::{
fn main() -> anyhow::Result<()> {
let cache = get_cache().unwrap_or_else(|_| Cache::default());
let config = Config::default();
- iced::application("Schist", Gui::update, Gui::view)
+ iced::application(move || Gui::new(&cache), Gui::update, Gui::view)
.settings(make_settings(&config.clone()))
.subscription(gui::subscription)
.theme(make_theme)
.window(make_window_settings(&config.clone()))
- .run_with(move || Gui::new(&cache))
+ .run()
.context("Failed to run Schist GUI")
}
diff --git a/schist_desktop_gui/src/theme.rs b/schist_desktop_gui/src/theme.rs
index 98df36f..0e71689 100644
--- a/schist_desktop_gui/src/theme.rs
+++ b/schist_desktop_gui/src/theme.rs
@@ -14,12 +14,18 @@ pub fn make_theme(_state: &Gui) -> Theme {
primary: accent_8(),
success: accent_8(),
danger: red_4(),
+ warning: red_4(),
},
|palette| palette::Extended {
background: palette::Background {
base: palette::Pair::new(black(), palette.text),
+ neutral: palette::Pair::new(black(), palette.text),
weak: palette::Pair::new(grey_2(), palette.text),
+ weaker: palette::Pair::new(grey_2(), palette.text),
+ weakest: palette::Pair::new(grey_2(), palette.text),
strong: palette::Pair::new(grey_2(), palette.text),
+ stronger: palette::Pair::new(grey_2(), palette.text),
+ strongest: palette::Pair::new(grey_2(), palette.text),
},
primary: palette::Primary {
base: palette::Pair::new(palette.background, palette.text),
@@ -41,6 +47,11 @@ pub fn make_theme(_state: &Gui) -> Theme {
weak: palette::Pair::new(palette.background, red_7()),
strong: palette::Pair::new(palette.background, red_4()),
},
+ warning: palette::Warning {
+ base: palette::Pair::new(palette.background, red_7()),
+ weak: palette::Pair::new(palette.background, red_7()),
+ strong: palette::Pair::new(palette.background, red_4()),
+ },
is_dark: true,
},
)