iced-template: init

This commit is contained in:
electria 2026-08-03 12:02:10 -07:00
commit 8f0abd2b78
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
8 changed files with 4192 additions and 0 deletions

30
src/app/mod.rs Normal file
View file

@ -0,0 +1,30 @@
use iced::{Color, Element, Renderer, Task, Theme, application, theme, widget};
enum Message {}
struct State {}
impl State {
fn new() -> Self {
Self {}
}
fn update(&mut self, message: Message) -> Task<Message> {
Task::none()
}
fn view(&self) -> Element<'_, Message, Theme, Renderer> {
widget::text("hiiiiiii").into()
}
}
pub fn run() -> Result<(), impl std::error::Error> {
application(State::new, State::update, State::view)
.theme(theme::Theme::custom(
"high-contrast-dark",
theme::Palette {
background: Color::from_rgb8(10, 10, 10),
text: Color::WHITE,
..theme::Palette::DARK
},
))
.run()
}

5
src/main.rs Normal file
View file

@ -0,0 +1,5 @@
mod app;
fn main() -> Result<(), impl std::error::Error> {
app::run()
}