iced being annoying, looking for new framework (xilem or vizia?)

main
aprzn 2 years ago
parent b7829be9b0
commit 3a7ea1e7eb

@ -1,4 +1,4 @@
[package] package]
name = "pipedash" name = "pipedash"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
@ -6,7 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
iced = {version = "0.7.0"}
rodio = {version = "0.16.0"} rodio = {version = "0.16.0"}
home = {version = "0.5.4"} home = {version = "0.5.4"}
base64 = {version = "0.21.0"} base64 = {version = "0.21.0"}

@ -1,19 +1,22 @@
mod gd; mod gd;
use iced::{ /*use iced::{
widget::{ widget::{
button, button,
column, column,
row, row,
text, text,
scrollable, scrollable,
radio::Radio, Column,
Column Row,
}, },
Sandbox, Application,
Settings, Settings,
Element, Element,
Alignment, Alignment,
Theme,
executor,
Command,
}; };
use rodio::{ use rodio::{
source::Source, source::Source,
@ -21,12 +24,6 @@ use rodio::{
OutputStream, OutputStream,
Sink, Sink,
}; };
use std::{
fs::File,
io::BufReader,
path::PathBuf,
};
use gd::gd_path;
struct Guider { struct Guider {
@ -37,13 +34,16 @@ enum Message {
Msg, Msg,
} }
impl Sandbox for Guider { impl Application for Guider {
type Executor = executor::Default;
type Flags = ();
type Message = Message; type Message = Message;
fn new() -> Self { type Theme = Theme;
Self {} fn new(_flags: Self::Flags) -> (Self, Command<Self::Message>) {
(Self {}, Command::none())
} }
fn view(&self) -> Element<Message> { fn view(&self) -> Element<Self::Message> {
// column![button("pause").on_press(Message::Pause), button("play").on_press(Message::Play)].into() // column![button("pause").on_press(Message::Pause), button("play").on_press(Message::Play)].into()
row![ row![
scrollable(["lvl 1", "lvl 2", "lvl 3"].iter().fold( scrollable(["lvl 1", "lvl 2", "lvl 3"].iter().fold(
@ -51,7 +51,7 @@ impl Sandbox for Guider {
)), )),
column![ column![
row![ row![
column![text("Title"), text("Song Title & ID")], column![text("Some Title Info?")],
column![ column![
text("G"), text("G"),
text("Y"), text("Y"),
@ -61,13 +61,14 @@ impl Sandbox for Guider {
row![text("zoom in"), text("zoom out"), text("delete"), text("add"), text("edit")], row![text("zoom in"), text("zoom out"), text("delete"), text("add"), text("edit")],
text("view canvas"), text("view canvas"),
] ]
].into() ].align_items(Alignment::Fill).into()
} }
fn update(&mut self, message: Message) { fn update(&mut self, message: Message) -> Command<Self::Message> {
match message { match message {
Message::Msg => {println!("Message received!")} Message::Msg => {println!("Message received!")}
} }
Command::none()
} }
fn title(&self) -> String { fn title(&self) -> String {
@ -80,3 +81,4 @@ fn main() -> iced::Result {
println!("{:?}", gd::get_outer_levels()); println!("{:?}", gd::get_outer_levels());
Guider::run(Settings::default()) Guider::run(Settings::default())
} }
*/

Loading…
Cancel
Save