Skip to content

Commit

Permalink
feat: actually add the adwaita feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-zlobintsev committed Dec 2, 2023
1 parent 6278025 commit c4b31cb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
37 changes: 35 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lact-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition = "2021"
[features]
default = ["gtk-tests"]
gtk-tests = []
adw = []

[dependencies]
lact-client = { path = "../lact-client" }
Expand All @@ -16,6 +15,9 @@ gtk = { version = "0.7", package = "gtk4", features = ["v4_6", "blueprint"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = "1.0"
adw = { package = "libadwaita", version = "0.5.3", features = [
"v1_4",
], optional = true }

[dev-dependencies]
pretty_assertions = "1.4.0"
4 changes: 4 additions & 0 deletions lact-gui/src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ pub struct App {

impl App {
pub fn new(daemon_client: DaemonClient) -> Self {
#[cfg(feature = "adw")]
let application: Application =
adw::Application::new(Some(APP_ID), ApplicationFlags::default()).upcast();
#[cfg(not(feature = "adw"))]
let application = Application::new(Some(APP_ID), ApplicationFlags::default());

let header = Header::new();
Expand Down

0 comments on commit c4b31cb

Please sign in to comment.