better color

This commit is contained in:
2025-07-09 17:20:00 +02:00
parent 7047679ace
commit 440032ffdb

View File

@@ -1,5 +1,4 @@
mod polygon_draw;
use iced::widget::canvas::Program;
use polygon_draw::Polygon;
mod music;
@@ -14,6 +13,10 @@ use utils::str_to_sec;
use std::fs;
use iced::Element;
use iced::{
Color, Length, Task, Theme,
widget::{Column, button, canvas, container, pick_list, row, scrollable, slider},
};
use iced::{
Font,
widget::{
@@ -21,10 +24,6 @@ use iced::{
text_input::{Icon, Side},
},
};
use iced::{
Length, Task, Theme,
widget::{Column, button, canvas, container, pick_list, row, scrollable, slider},
};
use regex::Regex;
use std::f32::consts::PI;
@@ -36,8 +35,26 @@ use kira::{
use crate::utils::delta_to_string;
fn main() -> iced::Result {
let polytheme: Theme = {
let back = Color::from_rgb8(0x25, 0x26, 0x27);
let text = Color::from_rgb8(0xD3, 0xD4, 0xD9);
let prim = Color::from_rgb8(0x4B, 0x88, 0xA2);
let succ = Color::from_rgb8(0xFF, 0xF9, 0xFB);
let dan = Color::from_rgb8(0xBB, 0x0A, 0x21);
Theme::custom(
String::from("PolyTheme"),
iced::theme::Palette {
background: back,
text: text,
primary: prim,
success: succ,
danger: dan,
},
)
};
iced::application("My App", MyApp::update, MyApp::view)
.theme(|_| Theme::Dark)
.theme(move |_| polytheme.clone())
.subscription(MyApp::subscription)
.run_with(MyApp::new)
}