fix(applets_inner): use radius_s for dnd items
Also fixes compile errors on the Bluetooth page.
This commit is contained in:
parent
7ca678e18e
commit
8b2bf931ae
3 changed files with 7 additions and 8 deletions
|
|
@ -199,7 +199,7 @@ impl page::Page<crate::pages::Message> for Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(connection) = self.connection.take() {
|
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
|
// Block the current thread to ensure that discovery is stopped
|
||||||
// on all adapters when the app is closed.
|
// on all adapters when the app is closed.
|
||||||
|
|
@ -382,12 +382,12 @@ impl Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::UpdatedAdapter(path, update) => {
|
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);
|
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(connection) = self.connection.clone() {
|
||||||
if let Some(discovery_future) =
|
if let Some(discovery_future) =
|
||||||
self.model.updated_adapter(path, update, connection)
|
self.model.updated_adapter(path, update, connection)
|
||||||
|
|
@ -987,7 +987,7 @@ fn multiple_adapter() -> Section<crate::pages::Message> {
|
||||||
widget::horizontal_space().into(),
|
widget::horizontal_space().into(),
|
||||||
widget::icon::from_name("go-next-symbolic").into(),
|
widget::icon::from_name("go-next-symbolic").into(),
|
||||||
];
|
];
|
||||||
if page.adapter_connected(path) {
|
if page.model.adapter_connected(path) {
|
||||||
items.insert(
|
items.insert(
|
||||||
4,
|
4,
|
||||||
text(&descriptions[device_connected])
|
text(&descriptions[device_connected])
|
||||||
|
|
|
||||||
|
|
@ -670,7 +670,7 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> {
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.class(theme::Container::Custom(Box::new(move |theme| {
|
.class(theme::Container::Custom(Box::new(move |theme| {
|
||||||
let mut style = container::Catalog::style(theme, &theme::Container::Primary);
|
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 {
|
if is_dragged {
|
||||||
style.border.color = theme.cosmic().accent_color().into();
|
style.border.color = theme.cosmic().accent_color().into();
|
||||||
style.border.width = 2.0;
|
style.border.width = 2.0;
|
||||||
|
|
@ -702,7 +702,7 @@ impl<'a, Message: 'static + Clone> AppletReorderList<'a, Message> {
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.class(theme::Container::Custom(Box::new(move |theme| {
|
.class(theme::Container::Custom(Box::new(move |theme| {
|
||||||
let mut style = container::Catalog::style(theme, &theme::Container::Primary);
|
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.color = theme.cosmic().bg_divider().into();
|
||||||
style.border.width = 2.0;
|
style.border.width = 2.0;
|
||||||
style.background = Some(Color::TRANSPARENT.into());
|
style.background = Some(Color::TRANSPARENT.into());
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ use cosmic_settings_config::shortcuts::{self, Action, Shortcuts};
|
||||||
use cosmic_settings_page::Section;
|
use cosmic_settings_page::Section;
|
||||||
use cosmic_settings_page::{self as page, section};
|
use cosmic_settings_page::{self as page, section};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use sctk::seat::keyboard::Keysym;
|
|
||||||
use shortcuts::action::System as SystemAction;
|
use shortcuts::action::System as SystemAction;
|
||||||
use slab::Slab;
|
use slab::Slab;
|
||||||
use slotmap::{DefaultKey, Key, SecondaryMap, SlotMap};
|
use slotmap::{DefaultKey, Key, SecondaryMap, SlotMap};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue