diff --git a/.gitmodules b/.gitmodules index d828aea..40ce689 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = rodio url = https://github.com/Alch-Emi/rodio.git branch = new-from-format-reader +[submodule "iced"] + path = iced + url = https://github.com/Alch-Emi/iced.git + branch = image-modes diff --git a/Cargo.lock b/Cargo.lock index e4f0067..8b13d88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1474,7 +1474,6 @@ checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" [[package]] name = "iced" version = "0.3.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", "iced_futures", @@ -1487,7 +1486,6 @@ dependencies = [ [[package]] name = "iced_core" version = "0.4.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "bitflags", ] @@ -1495,7 +1493,6 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.3.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "futures", "log", @@ -1506,7 +1503,6 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.2.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "bytemuck", "font-kit", @@ -1521,7 +1517,6 @@ dependencies = [ [[package]] name = "iced_lazy" version = "0.1.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_native", "ouroboros", @@ -1530,7 +1525,6 @@ dependencies = [ [[package]] name = "iced_native" version = "0.4.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", "iced_futures", @@ -1543,7 +1537,6 @@ dependencies = [ [[package]] name = "iced_style" version = "0.3.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_core", ] @@ -1551,7 +1544,6 @@ dependencies = [ [[package]] name = "iced_web" version = "0.4.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "base64", "dodrio", @@ -1568,7 +1560,6 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.4.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "bitflags", "bytemuck", @@ -1588,7 +1579,6 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.3.0" -source = "git+https://github.com/iced-rs/iced.git#b7bc169120d3447ead238e974007027a5152d341" dependencies = [ "iced_futures", "iced_graphics", diff --git a/Cargo.toml b/Cargo.toml index b64768a..1531ba2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,20 +31,20 @@ version = "0.3.0" [dependencies.iced] # Display windows & graphics features = ["canvas", "image"] -git = "https://github.com/iced-rs/iced.git" +path = "./iced/" [dependencies.iced_native] # Native-display only GUI features -git = "https://github.com/iced-rs/iced.git" +path = "./iced/native" [dependencies.iced_lazy] # Responsive widget design -git = "https://github.com/iced-rs/iced.git" +path = "./iced/lazy" [dependencies.iced_futures] # Display windows & graphics features = ["smol"] -git = "https://github.com/iced-rs/iced.git" +path = "./iced/futures" [dependencies.rodio] # Playing audio diff --git a/src/editor.rs b/src/editor.rs index 1133d1a..6bc0c0b 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -6,6 +6,7 @@ use iced::Alignment; use iced::widget::scrollable::{self, Scrollable}; use iced::Space; use iced::Canvas; +use iced::ContentFit; use crate::styles::{Theme, FONT_VG5000}; use crate::controls::Controls; use crate::model::Editing; @@ -22,10 +23,12 @@ pub fn view_editor(editing: &mut Editing) -> Element { let (img1, img2) = ( Image::new(margin_bg.clone()) .width(Length::FillPortion(1)) - .height(Length::Fill), + .height(Length::Fill) + .fit(ContentFit::Cover), Image::new(margin_bg.clone()) .width(Length::FillPortion(1)) - .height(Length::Fill), + .height(Length::Fill) + .fit(ContentFit::Cover), ); Row::new()