Fix images in background

This commit is contained in:
Emi Simpson 2022-01-26 16:24:10 -05:00
parent 415b4e7fc2
commit b97ae618b0
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
4 changed files with 13 additions and 16 deletions

4
.gitmodules vendored
View File

@ -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

10
Cargo.lock generated
View File

@ -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",

View File

@ -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

View File

@ -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<Message> {
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()