fix(applets_inner): use radius_s for dnd items

Also fixes compile errors on the Bluetooth page.
This commit is contained in:
Vukašin Vojinović 2025-06-08 16:21:43 +02:00 committed by Ashley Wulber
parent 7ca678e18e
commit 8b2bf931ae
3 changed files with 7 additions and 8 deletions

View file

@ -199,7 +199,7 @@ impl page::Page<crate::pages::Message> for Page {
}
if let Some(connection) = self.connection.take() {
let adapters = self.adapters.clone();
let adapters = self.model.adapters.clone();
// Block the current thread to ensure that discovery is stopped
// on all adapters when the app is closed.
@ -382,12 +382,12 @@ impl Page {
}
Event::UpdatedAdapter(path, update) => {
if let Some(existing) = self.adapters.get_mut(&path) {
if let Some(existing) = self.model.adapters.get_mut(&path) {
tracing::debug!("Adapter {} updated: {update:#?}", existing.address);
existing.update(update);
existing.update(update.clone());
}
self.update_status();
self.model.update_status();
if let Some(connection) = self.connection.clone() {
if let Some(discovery_future) =
self.model.updated_adapter(path, update, connection)
@ -987,7 +987,7 @@ fn multiple_adapter() -> Section<crate::pages::Message> {
widget::horizontal_space().into(),
widget::icon::from_name("go-next-symbolic").into(),
];
if page.adapter_connected(path) {
if page.model.adapter_connected(path) {
items.insert(
4,
text(&descriptions[device_connected])

View file

@ -670,7 +670,7 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> {
.padding(8)
.class(theme::Container::Custom(Box::new(move |theme| {
let mut style = container::Catalog::style(theme, &theme::Container::Primary);
style.border.radius = 8.0.into();
style.border.radius = theme.cosmic().radius_s().into();
if is_dragged {
style.border.color = theme.cosmic().accent_color().into();
style.border.width = 2.0;
@ -702,7 +702,7 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> {
.padding(8)
.class(theme::Container::Custom(Box::new(move |theme| {
let mut style = container::Catalog::style(theme, &theme::Container::Primary);
style.border.radius = 8.0.into();
style.border.radius = theme.cosmic().radius_s().into();
style.border.color = theme.cosmic().bg_divider().into();
style.border.width = 2.0;
style.background = Some(Color::TRANSPARENT.into());

View file

@ -25,7 +25,6 @@ use cosmic_settings_config::shortcuts::{self, Action, Shortcuts};
use cosmic_settings_page::Section;
use cosmic_settings_page::{self as page, section};
use itertools::Itertools;
use sctk::seat::keyboard::Keysym;
use shortcuts::action::System as SystemAction;
use slab::Slab;
use slotmap::{DefaultKey, Key, SecondaryMap, SlotMap};