Update libcosmic/iced for advanced text rebase
This commit is contained in:
parent
33df250f35
commit
b6336acbfb
6 changed files with 1114 additions and 815 deletions
1901
Cargo.lock
generated
1901
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -4,6 +4,7 @@ default-members = ["app"]
|
||||||
|
|
||||||
[workspace.dependencies.libcosmic]
|
[workspace.dependencies.libcosmic]
|
||||||
git = "https://github.com/pop-os/libcosmic"
|
git = "https://github.com/pop-os/libcosmic"
|
||||||
rev = "b85c504d72ee1c0d360c56042996474932df97cb"
|
# rev = "b85c504d72ee1c0d360c56042996474932df97cb"
|
||||||
|
branch = "cosmic-advanced-text"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["debug", "winit", "dyrend", "tokio"]
|
features = ["debug", "winit", "tokio"]
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,8 @@ use cosmic_settings_page::{self as page, section};
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::widget::{self, column, container, horizontal_space, row},
|
iced::widget::{self, column, container, horizontal_space, row},
|
||||||
iced::{self, Application, Command, Length, Subscription},
|
iced::{self, subscription, window, Application, Command, Length, Subscription},
|
||||||
iced_native::{subscription, window},
|
iced_runtime::window::{close, drag, minimize, toggle_maximize},
|
||||||
iced_winit::window::{close, drag, minimize, toggle_maximize},
|
|
||||||
keyboard_nav,
|
keyboard_nav,
|
||||||
theme::Theme,
|
theme::Theme,
|
||||||
widget::{
|
widget::{
|
||||||
|
|
@ -172,10 +171,10 @@ impl Application for SettingsApp {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Message::Page(page) => return self.activate_page(page),
|
Message::Page(page) => return self.activate_page(page),
|
||||||
Message::Drag => return drag(window::Id::new(0)),
|
Message::Drag => return drag(),
|
||||||
Message::Close => return close(window::Id::new(0)),
|
Message::Close => return close(),
|
||||||
Message::Minimize => return minimize(window::Id::new(0), true),
|
Message::Minimize => return minimize(true),
|
||||||
Message::Maximize => return toggle_maximize(window::Id::new(0)),
|
Message::Maximize => return toggle_maximize(),
|
||||||
Message::NavBar(key) => {
|
Message::NavBar(key) => {
|
||||||
if let Some(page) = self.nav_bar.data::<page::Entity>(key).copied() {
|
if let Some(page) = self.nav_bar.data::<page::Entity>(key).copied() {
|
||||||
return self.activate_page(page);
|
return self.activate_page(page);
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,10 @@ pub fn settings() -> Section<crate::pages::Message> {
|
||||||
for image_path in chunk.iter() {
|
for image_path in chunk.iter() {
|
||||||
image_row.push(if image_path.ends_with(".svg") {
|
image_row.push(if image_path.ends_with(".svg") {
|
||||||
svg(svg::Handle::from_path(image_path))
|
svg(svg::Handle::from_path(image_path))
|
||||||
.width(Length::Units(150))
|
.width(Length::Fixed(150.))
|
||||||
.into()
|
.into()
|
||||||
} else {
|
} else {
|
||||||
image(image_path).width(Length::Units(150)).into()
|
image(image_path).width(Length::Fixed(150.)).into()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
image_column.push(row(image_row).spacing(16).into());
|
image_column.push(row(image_row).spacing(16).into());
|
||||||
|
|
@ -69,7 +69,7 @@ pub fn settings() -> Section<crate::pages::Message> {
|
||||||
horizontal_space(Length::Fill),
|
horizontal_space(Length::Fill),
|
||||||
container(
|
container(
|
||||||
image("/usr/share/backgrounds/pop/kate-hazen-COSMIC-desktop-wallpaper.png")
|
image("/usr/share/backgrounds/pop/kate-hazen-COSMIC-desktop-wallpaper.png")
|
||||||
.width(Length::Units(300))
|
.width(Length::Fixed(300.))
|
||||||
)
|
)
|
||||||
.padding(4)
|
.padding(4)
|
||||||
.style(theme::Container::Background),
|
.style(theme::Container::Background),
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ pub fn search_header<Message>(
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
|
|
||||||
column_children.push(vertical_space(Length::Units(8)).into());
|
column_children.push(vertical_space(Length::Fixed(8.)).into());
|
||||||
column_children.push(divider::horizontal::heavy().into());
|
column_children.push(divider::horizontal::heavy().into());
|
||||||
|
|
||||||
column(column_children).into()
|
column(column_children).into()
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use crate::section::{self, Section};
|
use crate::section::{self, Section};
|
||||||
use crate::{Content, Info, Page};
|
use crate::{Content, Info, Page};
|
||||||
use cosmic::iced_native::command::{Action, Command};
|
use cosmic::iced_runtime::command::{Action, Command};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use slotmap::{SecondaryMap, SlotMap, SparseSecondaryMap};
|
use slotmap::{SecondaryMap, SlotMap, SparseSecondaryMap};
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue