diff --git a/Cargo.toml b/Cargo.toml index f414c12..f4b412e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ -[package] +package] name = "pipedash" version = "0.1.0" edition = "2021" @@ -6,7 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -iced = {version = "0.7.0"} rodio = {version = "0.16.0"} home = {version = "0.5.4"} base64 = {version = "0.21.0"} diff --git a/src/main.rs b/src/main.rs index ca18df4..b5a95d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,22 @@ mod gd; -use iced::{ +/*use iced::{ widget::{ button, column, row, text, scrollable, - radio::Radio, - Column + Column, + Row, }, - Sandbox, + Application, Settings, Element, Alignment, + Theme, + executor, + Command, }; use rodio::{ source::Source, @@ -21,12 +24,6 @@ use rodio::{ OutputStream, Sink, }; -use std::{ - fs::File, - io::BufReader, - path::PathBuf, -}; -use gd::gd_path; struct Guider { @@ -37,13 +34,16 @@ enum Message { Msg, } -impl Sandbox for Guider { +impl Application for Guider { + type Executor = executor::Default; + type Flags = (); type Message = Message; - fn new() -> Self { - Self {} + type Theme = Theme; + fn new(_flags: Self::Flags) -> (Self, Command) { + (Self {}, Command::none()) } - fn view(&self) -> Element { + fn view(&self) -> Element { // column![button("pause").on_press(Message::Pause), button("play").on_press(Message::Play)].into() row![ scrollable(["lvl 1", "lvl 2", "lvl 3"].iter().fold( @@ -51,7 +51,7 @@ impl Sandbox for Guider { )), column![ row![ - column![text("Title"), text("Song Title & ID")], + column![text("Some Title Info?")], column![ text("G"), text("Y"), @@ -61,13 +61,14 @@ impl Sandbox for Guider { row![text("zoom in"), text("zoom out"), text("delete"), text("add"), text("edit")], text("view canvas"), ] - ].into() + ].align_items(Alignment::Fill).into() } - fn update(&mut self, message: Message) { + fn update(&mut self, message: Message) -> Command { match message { Message::Msg => {println!("Message received!")} } + Command::none() } fn title(&self) -> String { @@ -80,3 +81,4 @@ fn main() -> iced::Result { println!("{:?}", gd::get_outer_levels()); Guider::run(Settings::default()) } +*/