deps: Unify iced version used by cosmic-comp and cosmic-time

This commit is contained in:
Victoria Brekenfeld 2023-06-02 13:11:06 +02:00
parent 53c6af5b21
commit 359cf70b49
5 changed files with 93 additions and 910 deletions

View file

@ -5,7 +5,7 @@ use crate::{
wayland::handlers::screencopy::ScreencopySessions,
};
use calloop::LoopHandle;
use cosmic::Element;
use cosmic::{iced_core::Color, Element};
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::InputType;
use smithay::{
backend::{
@ -311,8 +311,8 @@ impl Program for CosmicStackInternal {
mask.clone().unwrap()
}
fn background_color(&self) -> iced_core::Color {
iced_core::Color {
fn background_color(&self) -> Color {
Color {
r: 0.1176,
g: 0.1176,
b: 0.1176,

View file

@ -12,7 +12,7 @@ use crate::{
wayland::handlers::screencopy::ScreencopySessions,
};
use calloop::LoopHandle;
use cosmic::iced::Command;
use cosmic::{iced::Command, iced_core::Color};
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::InputType;
use smithay::{
backend::{
@ -258,16 +258,16 @@ impl Program for CosmicWindowInternal {
mask.clone().unwrap()
}
fn background_color(&self) -> iced_core::Color {
fn background_color(&self) -> Color {
if self.window.is_activated() {
iced_core::Color {
Color {
r: 0.1176,
g: 0.1176,
b: 0.1176,
a: 1.0,
}
} else {
iced_core::Color {
Color {
r: 0.153,
g: 0.153,
b: 0.153,

View file

@ -13,6 +13,8 @@ use cosmic::{
window::{Event as WindowEvent, Id},
Command, Point as IcedPoint, Rectangle as IcedRectangle, Size as IcedSize,
},
iced_core::{clipboard::Null as NullClipboard, renderer::Style, Color},
iced_renderer::Backend as BackendWrapper,
iced_runtime::{
command::Action,
program::{Program as IcedProgram, State},
@ -20,8 +22,6 @@ use cosmic::{
},
Renderer as IcedRenderer, Theme,
};
use iced_core::{renderer::Style, Color};
use iced_renderer::Backend as BackendWrapper;
use iced_tiny_skia::{
graphics::{damage, Primitive, Viewport},
Backend,
@ -279,7 +279,7 @@ impl<P: Program + Send + 'static> IcedElementInternal<P> {
&Style {
text_color: self.theme.cosmic().on_bg_color().into(),
},
&mut iced_core::clipboard::Null,
&mut NullClipboard,
&mut self.debug,
)
.1