Merge remote-tracking branch 'upstream/master'
Some checks failed
Validate .desktop files / validate (push) Has been cancelled

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	src/main.rs
This commit is contained in:
Lionel DARNIS 2026-08-19 21:59:21 +02:00
commit 7f22e7ce73
29 changed files with 1107 additions and 667 deletions

View file

@ -901,7 +901,7 @@ impl Application for App {
/// Creates the application, and optionally emits command on initialize.
fn init(mut core: Core, flags: Self::Flags) -> (Self, Task<Self::Message>) {
core.window.content_container = false;
core.window.border_padding = Some(0);
#[cfg(feature = "xdg-portal")]
let inhibit = {
@ -1062,18 +1062,6 @@ impl Application for App {
}
}
fn style(&self) -> Option<cosmic::iced::core::theme::Style> {
// This ensures we have a solid background color even when using no content container
let theme = self.core.system_theme();
Some(cosmic::iced::core::theme::Style {
background_color: theme.cosmic().bg_color().into(),
icon_color: theme.cosmic().on_bg_color().into(),
text_color: theme.cosmic().on_bg_color().into(),
})
}
/// Handle application events here.
fn update(&mut self, message: Self::Message) -> Task<Self::Message> {
match message {
@ -1740,7 +1728,7 @@ impl Application for App {
};
let Some(video) = &self.video_opt else {
//TODO: use space variables
// TODO: use space variables
let column = widget::column::with_capacity(4)
.align_x(Alignment::Center)
.spacing(24)
@ -1757,11 +1745,7 @@ impl Application for App {
.push(widget::button::suggested(fl!("open-file")).on_press(Message::FileOpen))
.push(widget::space::vertical());
return widget::container(column)
.width(Length::Fill)
.height(Length::Fill)
.class(theme::Container::WindowBackground)
.into();
return column.into();
};
let muted = video.muted();
@ -1781,8 +1765,9 @@ impl Application for App {
let mut background_color = Color::BLACK;
let mut text_color_opt = None;
if !video.has_video() {
background_color = theme.cosmic().bg_component_color().into();
text_color_opt = Some(Color::from(theme.cosmic().on_bg_component_color()));
let bg = theme.cosmic().background(theme.transparent);
background_color = Color::TRANSPARENT;
text_color_opt = Some(Color::from(bg.on));
let mut col = widget::column::with_capacity(10);
col = col.push(widget::space::vertical());
@ -1974,7 +1959,7 @@ impl Application for App {
//TODO: move style to libcosmic
.class(theme::Container::custom(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background(false).component;
let component = &cosmic.background(theme.transparent).component;
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),