From b692cdcc05802c8dbd71279c89d64ebcf331f5b4 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 31 Jan 2023 17:24:11 -0500 Subject: [PATCH] chore: use latest libcosmic --- Cargo.lock | 30 ++++++++++++------------- cosmic-app-list/src/app.rs | 26 ++++++++++++--------- cosmic-applet-audio/src/main.rs | 10 ++++----- cosmic-applet-battery/src/app.rs | 10 ++++----- cosmic-applet-graphics/src/window.rs | 4 ++-- cosmic-applet-network/src/app.rs | 7 +++--- cosmic-applet-notifications/src/main.rs | 15 ++++++++----- cosmic-applet-power/src/main.rs | 6 ++--- 8 files changed, 57 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index abd3d2ad..05d66b1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -666,7 +666,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#310139295f0d3748f49d8bb13edfe659d3f80c4b" +source = "git+https://github.com/pop-os/cosmic-panel#c6078479c8c489c5a88186f4939621ea2a07b996" dependencies = [ "anyhow", "ron", @@ -1965,7 +1965,7 @@ dependencies = [ [[package]] name = "iced" version = "0.6.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "iced_core", "iced_dyrend", @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.6.2" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "bitflags", "palette", @@ -1993,7 +1993,7 @@ dependencies = [ [[package]] name = "iced_dyrend" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "iced_glow", "iced_graphics", @@ -2007,7 +2007,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "futures", "log", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "iced_glow" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "bytemuck", "euclid", @@ -2034,7 +2034,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.5.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "bitflags", "bytemuck", @@ -2054,7 +2054,7 @@ dependencies = [ [[package]] name = "iced_lazy" version = "0.3.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "iced_native", "ouroboros 0.13.0", @@ -2063,7 +2063,7 @@ dependencies = [ [[package]] name = "iced_native" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "iced_core", "iced_futures", @@ -2077,7 +2077,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "enum-repr", "float-cmp", @@ -2095,7 +2095,7 @@ dependencies = [ [[package]] name = "iced_softbuffer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "cosmic-text", "iced_graphics", @@ -2110,7 +2110,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.5.1" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "iced_core", "once_cell", @@ -2120,7 +2120,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "bitflags", "bytemuck", @@ -2310,7 +2310,7 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic/?branch=master#771ddff482de79264ce50191517715d09988924f" +source = "git+https://github.com/pop-os/libcosmic/?branch=master#843919e44f0a00c33c29358359be5b4bfa41ab00" dependencies = [ "apply", "cosmic-panel-config", @@ -4771,7 +4771,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/xdg-shell-wrapper#95f6a663e383d3f6f13f689f9e9d7e691b9fe28b" +source = "git+https://github.com/pop-os/xdg-shell-wrapper#f6ed0ba88ecdbcf23cbdea4d2a3e206506e55a2f" dependencies = [ "serde", "wayland-protocols-wlr", diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index a2192137..f654d5e1 100644 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -27,17 +27,17 @@ use cosmic::iced_native::subscription::events_with; use cosmic::iced_native::widget::vertical_space; use cosmic::iced_sctk::layout::Limits; use cosmic::iced_sctk::settings::InitialSurface; +use cosmic::iced_sctk::widget::vertical_rule; use cosmic::iced_style::application::{self, Appearance}; use cosmic::iced_style::Color; use cosmic::theme::Button; +use cosmic::widget::divider; use cosmic::widget::rectangle_tracker::rectangle_tracker_subscription; use cosmic::widget::rectangle_tracker::RectangleTracker; use cosmic::widget::rectangle_tracker::RectangleUpdate; -use cosmic::widget::{horizontal_rule, vertical_rule}; use cosmic::{Element, Theme}; use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1; use freedesktop_desktop_entry::DesktopEntry; -use iced::wayland::window::resize_window; use iced::widget::container; use iced::widget::horizontal_space; use iced::Alignment; @@ -485,18 +485,22 @@ impl Application for CosmicAppList { let content = match &self.applet_helper.anchor { PanelAnchor::Left | PanelAnchor::Right => container( - column![column(favorites), horizontal_rule(1), column(running)] - .spacing(4) - .align_items(Alignment::Center) - .height(Length::Fill) - .width(Length::Fill), + column![ + column(favorites), + divider::horizontal::light(), + column(running) + ] + .spacing(4) + .align_items(Alignment::Center) + .height(h) + .width(w), ), PanelAnchor::Top | PanelAnchor::Bottom => container( row![row(favorites), vertical_rule(1), row(running)] .spacing(4) .align_items(Alignment::Center) - .height(Length::Fill) - .width(Length::Fill), + .height(h) + .width(w), ), }; if self.popup.is_some() { @@ -542,9 +546,9 @@ impl Application for CosmicAppList { .on_press(Message::Activate(handle.clone())), ); } - content = content.push(horizontal_rule(1)); + content = content.push(divider::horizontal::light()); content = content.push(list_col); - content = content.push(horizontal_rule(1)); + content = content.push(divider::horizontal::light()); } content = content.push(if is_favorite { cosmic::widget::button(Button::Text) diff --git a/cosmic-applet-audio/src/main.rs b/cosmic-applet-audio/src/main.rs index d768527f..d67469b1 100644 --- a/cosmic-applet-audio/src/main.rs +++ b/cosmic-applet-audio/src/main.rs @@ -5,12 +5,12 @@ use cosmic::iced_native::layout::Limits; use cosmic::theme::Svg; use cosmic::applet::{CosmicAppletHelper, APPLET_BUTTON_THEME}; -use cosmic::widget::{button, icon}; +use cosmic::widget::{button, divider, icon}; use cosmic::Renderer; use cosmic::iced::{ self, - widget::{column, horizontal_rule, row, slider, text, toggler}, + widget::{column, row, slider, text, toggler}, window, Alignment, Application, Command, Length, Subscription, }; use cosmic::iced_style::application::{self, Appearance}; @@ -302,7 +302,7 @@ impl Application for Audio { .spacing(12) .align_items(Alignment::Center) .padding([8, 24]), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([12, 24]) .width(Length::Fill), revealer( @@ -340,7 +340,7 @@ impl Application for Audio { }; let content = column![ audio_content, - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([12, 24]) .width(Length::Fill), container(toggler( @@ -349,7 +349,7 @@ impl Application for Audio { Message::ToggleMediaControlsInTopPanel, )) .padding([0, 24]), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([12, 24]) .width(Length::Fill), button(APPLET_BUTTON_THEME) diff --git a/cosmic-applet-battery/src/app.rs b/cosmic-applet-battery/src/app.rs index 7c85f7d6..0e3f5ab3 100644 --- a/cosmic-applet-battery/src/app.rs +++ b/cosmic-applet-battery/src/app.rs @@ -22,7 +22,7 @@ use cosmic::iced_native::layout::Limits; use cosmic::iced_style::application::{self, Appearance}; use cosmic::iced_style::{svg, Color}; use cosmic::theme::Svg; -use cosmic::widget::{button, horizontal_rule, icon, toggler}; +use cosmic::widget::{button, divider, icon, toggler}; use cosmic::{Element, Theme}; use log::error; use std::time::Duration; @@ -255,7 +255,7 @@ impl Application for CosmicBatteryApplet { .padding([0, 24]) .spacing(8) .align_items(Alignment::Center), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .width(Length::Fill) .padding([0, 12]), button(APPLET_BUTTON_THEME) @@ -315,7 +315,7 @@ impl Application for CosmicBatteryApplet { .padding([8, 24]) .on_press(Message::SelectProfile(Power::Performance)) .width(Length::Fill), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .width(Length::Fill) .padding([0, 12]), container(toggler(fl!("max-charge"), self.charging_limit, |_| { @@ -323,7 +323,7 @@ impl Application for CosmicBatteryApplet { })) .padding([0, 24]) .width(Length::Fill), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .width(Length::Fill) .padding([0, 12]), row![ @@ -366,7 +366,7 @@ impl Application for CosmicBatteryApplet { ] .padding([0, 24]) .spacing(12), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .width(Length::Fill) .padding([0, 12]), button(APPLET_BUTTON_THEME) diff --git a/cosmic-applet-graphics/src/window.rs b/cosmic-applet-graphics/src/window.rs index e7f2191e..64073653 100644 --- a/cosmic-applet-graphics/src/window.rs +++ b/cosmic-applet-graphics/src/window.rs @@ -16,7 +16,7 @@ use cosmic::{ iced::{self, Application, Command, Length}, iced_native::window, theme::{Svg, Theme}, - widget::{button, horizontal_rule}, + widget::{button, divider}, Element, }; use zbus::Connection; @@ -328,7 +328,7 @@ impl Application for Window { .horizontal_alignment(Horizontal::Center) .size(24) .into(), - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([0, 12]) .width(Length::Fill) .into(), diff --git a/cosmic-applet-network/src/app.rs b/cosmic-applet-network/src/app.rs index 4c513929..f055467f 100644 --- a/cosmic-applet-network/src/app.rs +++ b/cosmic-applet-network/src/app.rs @@ -1,4 +1,3 @@ -use cosmic::iced_sctk::Rectangle; use cosmic::iced_style; use cosmic::{ applet::CosmicAppletHelper, @@ -18,7 +17,7 @@ use cosmic::{ }, iced_style::{application, button::StyleSheet, svg}, theme::{Button, Svg}, - widget::{button, horizontal_rule, icon, toggler}, + widget::{button, divider, icon, toggler}, Element, Theme, }; use cosmic_dbus_networkmanager::interface::enums::DeviceState; @@ -444,7 +443,7 @@ impl Application for CosmicNetworkApplet { .width(Length::Fill) ) .padding([0, 12]), - horizontal_rule(1), + divider::horizontal::light(), container( toggler(fl!("wifi"), self.nm_state.wifi_enabled, |m| { Message::ToggleWiFi(m) @@ -452,7 +451,7 @@ impl Application for CosmicNetworkApplet { .width(Length::Fill) ) .padding([0, 12]), - horizontal_rule(1), + divider::horizontal::light(), known_wifi, ] .align_items(Alignment::Center) diff --git a/cosmic-applet-notifications/src/main.rs b/cosmic-applet-notifications/src/main.rs index 10e63451..f1f4d96b 100644 --- a/cosmic-applet-notifications/src/main.rs +++ b/cosmic-applet-notifications/src/main.rs @@ -4,15 +4,14 @@ use cosmic::iced::wayland::{ SurfaceIdWrapper, }; use cosmic::iced::{ - widget::{button, column, horizontal_rule, row, text, Row, Space}, + widget::{button, column, row, text, Row, Space}, window, Alignment, Application, Color, Command, Length, Subscription, }; use cosmic::iced_style::application::{self, Appearance}; use cosmic::iced_style::svg; use cosmic::theme::Svg; -use cosmic::widget::icon; -use cosmic::widget::toggler; +use cosmic::widget::{divider, icon, toggler}; use cosmic::Renderer; use cosmic::{Element, Theme}; @@ -146,9 +145,13 @@ impl Application for Notifications { row![text("TODO: make app worky with notifications")] }; - let main_content = column![horizontal_rule(1), notifications, horizontal_rule(1)] - .padding([0, 24]) - .spacing(12); + let main_content = column![ + divider::horizontal::light(), + notifications, + divider::horizontal::light() + ] + .padding([0, 24]) + .spacing(12); let content = column![] .align_items(Alignment::Start) diff --git a/cosmic-applet-power/src/main.rs b/cosmic-applet-power/src/main.rs index 5a506393..6afef0bd 100644 --- a/cosmic-applet-power/src/main.rs +++ b/cosmic-applet-power/src/main.rs @@ -5,7 +5,7 @@ use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; use cosmic::iced::wayland::SurfaceIdWrapper; use cosmic::iced_native::layout::Limits; use cosmic::iced_native::widget::Space; -use cosmic::widget::{button, horizontal_rule, icon}; +use cosmic::widget::{button, divider, icon}; use cosmic::Renderer; use cosmic::iced::{ @@ -179,11 +179,11 @@ impl Application for Power { let content = column![ settings, - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([0, 12]) .width(Length::Fill), session, - container(horizontal_rule(1)) + container(divider::horizontal::light()) .padding([0, 12]) .width(Length::Fill), power