fix: no blur for desktop mode
fix: desktop blur chore: update libcosmic chore: update libcosmic chore: update libcosmic
This commit is contained in:
parent
674a33e3de
commit
0e761ba811
3 changed files with 39 additions and 20 deletions
56
src/app.rs
56
src/app.rs
|
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::app::{self, Core, Task, context_drawer};
|
||||
use cosmic::core::Auto;
|
||||
use cosmic::cosmic_config::{self, ConfigSet};
|
||||
use cosmic::iced::clipboard::dnd::DndAction;
|
||||
use cosmic::iced::core::SmolStr;
|
||||
|
|
@ -27,7 +28,7 @@ use cosmic::iced::{
|
|||
IcedMargin, IcedOutput, SctkLayerSurfaceSettings,
|
||||
},
|
||||
platform_specific::shell::wayland::commands::layer_surface::{
|
||||
Anchor, KeyboardInteractivity, Layer, destroy_layer_surface, get_layer_surface,
|
||||
Anchor, KeyboardInteractivity, Layer, destroy_layer_surface,
|
||||
},
|
||||
};
|
||||
use cosmic::widget::about::About;
|
||||
|
|
@ -2405,6 +2406,9 @@ impl Application for App {
|
|||
),
|
||||
]);
|
||||
|
||||
if matches!(flags.mode, Mode::Desktop) {
|
||||
core.set_auto_blur(Auto::Window | Auto::Popup);
|
||||
}
|
||||
let mut app = Self {
|
||||
core,
|
||||
about,
|
||||
|
|
@ -4495,6 +4499,7 @@ impl Application for App {
|
|||
commands.push(self.update(Message::CheckClipboard));
|
||||
commands.push(self.update(Message::Surface(
|
||||
cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| -> SctkPopupSettings {
|
||||
let anchor_rect = Rectangle {
|
||||
x: point.x as i32,
|
||||
|
|
@ -5264,24 +5269,37 @@ impl Application for App {
|
|||
.insert(surface_id, Window::new(WindowKind::Desktop(entity)));
|
||||
return Task::batch([
|
||||
command,
|
||||
get_layer_surface(SctkLayerSurfaceSettings {
|
||||
id: surface_id,
|
||||
layer: Layer::Bottom,
|
||||
keyboard_interactivity: KeyboardInteractivity::OnDemand,
|
||||
input_zone: None,
|
||||
anchor: Anchor::TOP | Anchor::BOTTOM | Anchor::LEFT | Anchor::RIGHT,
|
||||
output: IcedOutput::Output(output),
|
||||
namespace: "cosmic-files-applet".into(),
|
||||
size: Some((None, None)),
|
||||
margin: IcedMargin {
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
},
|
||||
exclusive_zone: 0,
|
||||
size_limits: Limits::NONE.min_width(1.0).min_height(1.0),
|
||||
}),
|
||||
cosmic::task::message(cosmic::action::cosmic(
|
||||
cosmic::app::Action::Surface(
|
||||
cosmic::surface::action::app_layer_shell(
|
||||
|_| Default::default(),
|
||||
move |_: &mut App| SctkLayerSurfaceSettings {
|
||||
id: surface_id,
|
||||
layer: Layer::Bottom,
|
||||
keyboard_interactivity: KeyboardInteractivity::OnDemand,
|
||||
input_zone: None,
|
||||
anchor: Anchor::TOP
|
||||
| Anchor::BOTTOM
|
||||
| Anchor::LEFT
|
||||
| Anchor::RIGHT,
|
||||
output: IcedOutput::Output(output.clone()),
|
||||
namespace: "cosmic-files-applet".into(),
|
||||
size: Some((None, None)),
|
||||
margin: IcedMargin {
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
},
|
||||
exclusive_zone: 0,
|
||||
size_limits: Limits::NONE
|
||||
.min_width(1.0)
|
||||
.min_height(1.0),
|
||||
},
|
||||
None,
|
||||
),
|
||||
),
|
||||
)),
|
||||
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
|
||||
overlap_notify(surface_id, true),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1795,6 +1795,7 @@ impl Application for App {
|
|||
let autosize_id = widget::Id::unique();
|
||||
commands.push(self.update(Message::Surface(
|
||||
cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| -> SctkPopupSettings {
|
||||
let anchor_rect = Rectangle {
|
||||
x: point.x as i32,
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ pub fn context_menu<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
container(column::with_children(children))
|
||||
container(cosmic::widget::menu::menu_column::MenuColumn::with_children(children))
|
||||
.padding(1)
|
||||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue