working on updating
This commit is contained in:
parent
cb3cefd326
commit
679a2cafa5
8 changed files with 1979 additions and 1882 deletions
3792
Cargo.lock
generated
3792
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -57,8 +57,8 @@ default-features = false
|
|||
features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "wayland", "rfd", "dbus-config", "a11y", "wgpu", "multi-window", "process"]
|
||||
|
||||
[dependencies.iced_video_player]
|
||||
git = "https://github.com/jackpot51/iced_video_player.git"
|
||||
branch = "cosmic"
|
||||
git = "https://github.com/wash2/iced_video_player.git"
|
||||
branch = "iced-rebase"
|
||||
features = ["wgpu"]
|
||||
|
||||
# [profile.dev]
|
||||
|
|
|
|||
17
src/main.rs
17
src/main.rs
|
|
@ -22,14 +22,14 @@ use cosmic::widget::dnd_destination::dnd_destination;
|
|||
use cosmic::widget::menu::key_bind::Modifier;
|
||||
use cosmic::widget::menu::{ItemWidth, KeyBind};
|
||||
use cosmic::widget::nav_bar::nav_bar_style;
|
||||
use cosmic::widget::space::horizontal;
|
||||
use cosmic::widget::tooltip::Position as TPosition;
|
||||
use cosmic::widget::{
|
||||
Container, divider, menu, settings, text_input,
|
||||
};
|
||||
use cosmic::widget::{
|
||||
Space, button, context_menu, horizontal_space, mouse_area,
|
||||
nav_bar, nav_bar_toggle, responsive, scrollable, search_input,
|
||||
tooltip,
|
||||
Space, button, context_menu, mouse_area, nav_bar, nav_bar_toggle,
|
||||
responsive, scrollable, search_input, tooltip,
|
||||
};
|
||||
use cosmic::widget::{container, text};
|
||||
use cosmic::widget::{icon, slider};
|
||||
|
|
@ -699,6 +699,7 @@ impl cosmic::Application for App {
|
|||
// debug!(?platform_specific);
|
||||
None
|
||||
}
|
||||
iced::Event::InputMethod(event) => todo!(),
|
||||
}
|
||||
}
|
||||
event::Status::Captured => None,
|
||||
|
|
@ -736,7 +737,7 @@ impl cosmic::Application for App {
|
|||
row![
|
||||
column![title, subtitle]
|
||||
.spacing(space_xxs),
|
||||
horizontal_space(),
|
||||
horizontal(),
|
||||
tooltip(
|
||||
icon::from_name("add")
|
||||
.symbolic(true).apply(button::icon)
|
||||
|
|
@ -824,7 +825,7 @@ impl cosmic::Application for App {
|
|||
.padding(space_s)
|
||||
.align_right(Length::Fill)
|
||||
.align_top(60),
|
||||
horizontal_space().height(space_xxl),
|
||||
horizontal().height(space_xxl),
|
||||
settings::section()
|
||||
.title("Obs Settings")
|
||||
.add(obs_socket)
|
||||
|
|
@ -1704,7 +1705,7 @@ impl cosmic::Application for App {
|
|||
.padding(space_s)
|
||||
.width(Length::FillPortion(2))
|
||||
} else {
|
||||
Container::new(horizontal_space().width(0))
|
||||
Container::new(horizontal().width(0))
|
||||
};
|
||||
|
||||
let editor = self.editor_mode.as_ref().map_or_else(
|
||||
|
|
@ -1763,7 +1764,7 @@ impl cosmic::Application for App {
|
|||
|
||||
let preview_bar = if self.editor_mode.is_none() {
|
||||
if self.service.is_empty() {
|
||||
Container::new(horizontal_space())
|
||||
Container::new(horizontal())
|
||||
} else {
|
||||
Container::new(
|
||||
self.presenter
|
||||
|
|
@ -1775,7 +1776,7 @@ impl cosmic::Application for App {
|
|||
.center_y(180)
|
||||
}
|
||||
} else {
|
||||
Container::new(horizontal_space())
|
||||
Container::new(horizontal())
|
||||
};
|
||||
|
||||
let main_area = self.editor_mode.as_ref().map_or_else(
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ use cosmic::{
|
|||
iced_widget::{column, row},
|
||||
theme,
|
||||
widget::{
|
||||
self, Space, button, container, horizontal_space, icon, text,
|
||||
text_input,
|
||||
self, Space, button, container, icon, space::horizontal,
|
||||
text, text_input,
|
||||
},
|
||||
};
|
||||
use tracing::{debug, error, warn};
|
||||
|
|
@ -94,7 +94,7 @@ impl ImageEditor {
|
|||
#[must_use]
|
||||
pub fn view(&self) -> Element<Message> {
|
||||
let container = self.image.as_ref().map_or_else(
|
||||
|| Space::new(0, 0).apply(container),
|
||||
|| Space::new().apply(container),
|
||||
|pic| widget::image(pic.path.clone()).apply(container),
|
||||
);
|
||||
let column = column![
|
||||
|
|
@ -120,7 +120,7 @@ impl ImageEditor {
|
|||
row![
|
||||
text::body("Title:"),
|
||||
title_box,
|
||||
horizontal_space(),
|
||||
horizontal(),
|
||||
image_selector
|
||||
]
|
||||
.align_y(Vertical::Center)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@ use cosmic::{
|
|||
theme,
|
||||
widget::{
|
||||
Container, DndSource, Space, button, container, context_menu,
|
||||
dnd_destination, horizontal_space, icon,
|
||||
dnd_destination, icon,
|
||||
menu::{self, Action as MenuAction},
|
||||
mouse_area, responsive, row, scrollable, text, text_input,
|
||||
mouse_area, responsive, row, scrollable,
|
||||
space::horizontal,
|
||||
text, text_input,
|
||||
},
|
||||
};
|
||||
use miette::{IntoDiagnostic, Result};
|
||||
|
|
@ -1183,7 +1185,7 @@ impl<'a> Library {
|
|||
let texts = column([text.into(), subtext.into()]);
|
||||
|
||||
Container::new(
|
||||
rowm![horizontal_space().width(0), texts]
|
||||
rowm![horizontal().width(0), texts]
|
||||
.spacing(10)
|
||||
.align_y(Vertical::Center),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ use cosmic::{
|
|||
iced_widget::{column, row},
|
||||
theme,
|
||||
widget::{
|
||||
self, Space, button, container, context_menu,
|
||||
horizontal_space, icon, image::Handle, menu, mouse_area,
|
||||
scrollable, text, text_input,
|
||||
self, Space, button, container, context_menu, icon,
|
||||
image::Handle, menu, mouse_area, scrollable,
|
||||
space::horizontal, text, text_input,
|
||||
},
|
||||
};
|
||||
use miette::{IntoDiagnostic, Result, miette};
|
||||
|
|
@ -335,7 +335,7 @@ impl PresentationEditor {
|
|||
|
||||
pub fn view(&self) -> Element<Message> {
|
||||
let presentation = self.current_slide.as_ref().map_or_else(
|
||||
|| container(Space::new(0, 0)),
|
||||
|| container(Space::new()),
|
||||
|slide| {
|
||||
container(
|
||||
widget::image(slide)
|
||||
|
|
@ -350,7 +350,7 @@ impl PresentationEditor {
|
|||
);
|
||||
let pdf_pages: Vec<Element<Message>> =
|
||||
self.slides.as_ref().map_or_else(
|
||||
|| vec![horizontal_space().into()],
|
||||
|| vec![horizontal().into()],
|
||||
|pages| {
|
||||
pages
|
||||
.iter()
|
||||
|
|
|
|||
|
|
@ -19,12 +19,13 @@ use cosmic::{
|
|||
scrollable::{
|
||||
AbsoluteOffset, Direction, Scrollbar, scroll_to,
|
||||
},
|
||||
stack, vertical_rule,
|
||||
stack,
|
||||
},
|
||||
prelude::*,
|
||||
widget::{
|
||||
Container, Id, Row, Space, container, context_menu, image,
|
||||
menu, mouse_area, responsive, scrollable, text,
|
||||
Container, Id, Row, Space, container, context_menu,
|
||||
divider::vertical, image, menu, mouse_area, responsive,
|
||||
scrollable, text,
|
||||
},
|
||||
};
|
||||
use derive_more::Debug;
|
||||
|
|
@ -723,7 +724,7 @@ impl Presenter {
|
|||
.align_top(Length::Fill)
|
||||
.align_left(Length::Fill)
|
||||
.padding([0, 0, 0, 35]);
|
||||
let divider = vertical_rule(2);
|
||||
let divider = vertical::light();
|
||||
items.push(
|
||||
container(stack!(row, label_container))
|
||||
.padding([5, 2])
|
||||
|
|
@ -981,7 +982,7 @@ pub(crate) fn slide_view<'a>(
|
|||
) -> Element<'a, Message> {
|
||||
responsive(move |size| {
|
||||
let width = size.height * 16.0 / 9.0;
|
||||
let black = Container::new(Space::new(0, 0))
|
||||
let black = Container::new(Space::new())
|
||||
.style(|_| {
|
||||
container::background(Background::Color(Color::BLACK))
|
||||
})
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ use cosmic::{
|
|||
combo_box, container, divider, dnd_destination, dnd_source,
|
||||
dropdown,
|
||||
grid::{self},
|
||||
horizontal_space, icon, mouse_area, popover, progress_bar,
|
||||
scrollable, text, text_editor, text_input, tooltip,
|
||||
icon, mouse_area, popover, progress_bar, scrollable,
|
||||
space::horizontal,
|
||||
text, text_editor, text_input, tooltip,
|
||||
},
|
||||
};
|
||||
use derive_more::Debug;
|
||||
|
|
@ -900,7 +901,7 @@ impl SongEditor {
|
|||
pub fn view(&self) -> Element<Message> {
|
||||
let video_elements: Element<Message> =
|
||||
self.video.as_ref().map_or_else(
|
||||
|| horizontal_space().into(),
|
||||
|| horizontal().into(),
|
||||
|video| {
|
||||
let play_button =
|
||||
button::icon(if video.paused() {
|
||||
|
|
@ -913,8 +914,8 @@ impl SongEditor {
|
|||
0.0..=video.duration().as_secs_f32(),
|
||||
video.position().as_secs_f32(),
|
||||
)
|
||||
.height(cosmic::theme::spacing().space_s)
|
||||
.width(Length::Fill);
|
||||
.girth(cosmic::theme::spacing().space_s)
|
||||
.length(Length::Fill);
|
||||
container(
|
||||
row![play_button, video_track]
|
||||
.align_y(Vertical::Center)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue