Skip to content

Commit 3d3c297

Browse files
committedSep 21, 2024·
feat: use the 0.7.1 iced_layershell
publish new version
1 parent 3fe1c53 commit 3d3c297

File tree

4 files changed

+25
-50
lines changed

4 files changed

+25
-50
lines changed
 

‎Cargo.lock

+20-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ resolver = "2"
33
members = ["./lala_bar", "./iced_zbus_notification"]
44

55
[workspace.package]
6-
version = "0.3.16"
6+
version = "0.4.0"
77
edition = "2021"
88
authors = ["Decodertalkers <aakari@tutanota.com>"]
99
license = "MIT"
1010
repository = "https://github.com/Decodetalkers/lala-bar"
1111
readme = "README.md"
1212

1313
[workspace.dependencies]
14-
iced_zbus_notification = { version = "0.3.14", path = "iced_zbus_notification" }
14+
iced_zbus_notification = { version = "0.4.0", path = "iced_zbus_notification" }
1515
futures = "0.3.30"
1616
serde = { version = "1.0.210", features = ["derive"] }
1717
url = "2.5.2"

‎lala_bar/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ iced = { version = "0.13.1", features = [
2020
"svg",
2121
] }
2222
iced_runtime = "0.13.0"
23-
iced_layershell = "0.7.0-beta1"
23+
iced_layershell = "0.7.1"
2424
tokio = { version = "1.40", features = ["full"] }
2525
iced_futures = "0.13.1"
2626
env_logger = "0.11.5"

‎lala_bar/src/main.rs

+2-39
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ use iced::widget::{
99
};
1010
use iced::{executor, Alignment, Font};
1111
use iced::{Element, Length, Task as Command, Theme};
12-
use iced_layershell::actions::{
13-
LayershellCustomActionsWithIdAndInfo, LayershellCustomActionsWithInfo,
14-
};
1512
use iced_zbus_notification::{
1613
start_connection, ImageInfo, LaLaMako, MessageSender, NotifyMessage, NotifyUnit, VersionInfo,
1714
DEFAULT_ACTION, NOTIFICATION_SERVICE_PATH,
@@ -22,6 +19,7 @@ use zbus_mpirs::ServiceInfo;
2219
use chrono::prelude::*;
2320
use iced_layershell::reexport::{Anchor, KeyboardInteractivity, Layer, NewLayerShellSettings};
2421
use iced_layershell::settings::{LayerShellSettings, Settings};
22+
use iced_layershell::to_layer_message;
2523
use iced_layershell::MultiApplication;
2624
use iced_runtime::window::Action as WindowAction;
2725
use iced_runtime::Action;
@@ -34,9 +32,6 @@ mod aximer;
3432
mod launcher;
3533
mod zbus_mpirs;
3634

37-
type LaLaShellIdAction = LayershellCustomActionsWithIdAndInfo<LaLaInfo>;
38-
type LalaShellAction = LayershellCustomActionsWithInfo<LaLaInfo>;
39-
4035
const BEGINNING_UP_MARGIN: i32 = 10;
4136

4237
const UNIT_MARGIN: i32 = 135;
@@ -533,7 +528,7 @@ impl LalaMusicBar {
533528
}
534529
}
535530

536-
#[derive(Debug, Clone)]
531+
#[to_layer_message(multi, info_name = "LaLaInfo", derives = "Debug Clone")]
537532
enum Message {
538533
RequestPre,
539534
RequestNext,
@@ -560,38 +555,6 @@ enum Message {
560555
QuiteMode(bool),
561556
CloseErrorNotification(iced::window::Id),
562557
Ready(Sender<NotifyCommand>),
563-
564-
// LayerShellInfo
565-
NewLayerShell {
566-
info: LaLaInfo,
567-
settings: NewLayerShellSettings,
568-
},
569-
ForgetLastOutput,
570-
MarginChange {
571-
id: iced::window::Id,
572-
margin: (i32, i32, i32, i32),
573-
},
574-
}
575-
576-
impl TryInto<LaLaShellIdAction> for Message {
577-
type Error = Self;
578-
fn try_into(self) -> Result<LaLaShellIdAction, Self::Error> {
579-
match self {
580-
Self::NewLayerShell { info, settings } => Ok(LaLaShellIdAction::new(
581-
None,
582-
LalaShellAction::NewLayerShell((settings, info)),
583-
)),
584-
Self::ForgetLastOutput => Ok(LaLaShellIdAction::new(
585-
None,
586-
LalaShellAction::ForgetLastOutput,
587-
)),
588-
Self::MarginChange { id, margin } => Ok(LaLaShellIdAction::new(
589-
Some(id),
590-
LalaShellAction::MarginChange(margin),
591-
)),
592-
_ => Err(self),
593-
}
594-
}
595558
}
596559

597560
impl From<NotifyMessage> for Message {

0 commit comments

Comments
 (0)