diff --git a/lact-gui/Cargo.toml b/lact-gui/Cargo.toml
index efbeff5e..95abeceb 100644
--- a/lact-gui/Cargo.toml
+++ b/lact-gui/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
[features]
default = ["gtk-tests"]
gtk-tests = []
-libadwaita = ["dep:libadwaita"]
+libadwaita = ["dep:adw"]
[dependencies]
lact-client = { path = "../lact-client" }
@@ -16,7 +16,7 @@ gtk = { version = "0.7", package = "gtk4", features = ["v4_6", "blueprint"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = "1.0"
-libadwaita = { version = "0.5.3", features = ["v1_4"], optional = true }
+adw = { package = "libadwaita", version = "0.5.3", features = ["v1_4"], optional = true }
[dev-dependencies]
pretty_assertions = "1.4.0"
diff --git a/lact-gui/src/app/dialogs.rs b/lact-gui/src/app/dialogs.rs
index af26c896..5c734874 100644
--- a/lact-gui/src/app/dialogs.rs
+++ b/lact-gui/src/app/dialogs.rs
@@ -2,13 +2,13 @@ use gtk::prelude::*;
use tracing::warn;
#[cfg(feature = "libadwaita")]
-use libadwaita::prelude::MessageDialogExt;
+use adw::prelude::MessageDialogExt;
#[cfg(feature = "libadwaita")]
#[macro_export]
macro_rules! info_dialog {
($parent:expr, $heading:expr, $body:expr, $response_id:expr, $response_txt:expr) => {{
- let diag = libadwaita::MessageDialog::builder()
+ let diag = adw::MessageDialog::builder()
.heading($heading)
.body($body)
.modal(true)
diff --git a/lact-gui/src/app/headerbar.rs b/lact-gui/src/app/headerbar.rs
index de7cf279..839da3d6 100644
--- a/lact-gui/src/app/headerbar.rs
+++ b/lact-gui/src/app/headerbar.rs
@@ -3,7 +3,7 @@ use super::{apply_box::ApplyBox, gpu_selector::GpuSelector};
#[derive(Debug, Clone)]
pub struct Headerbar {
#[cfg(feature = "libadwaita")]
- pub container: libadwaita::HeaderBar,
+ pub container: adw::HeaderBar,
#[cfg(not(feature = "libadwaita"))]
pub container: gtk::HeaderBar,
@@ -15,7 +15,7 @@ pub struct Headerbar {
impl Headerbar {
pub fn new() -> Self {
#[cfg(feature = "libadwaita")]
- let container = libadwaita::HeaderBar::builder().show_title(false).build();
+ let container = adw::HeaderBar::builder().show_title(false).build();
#[cfg(not(feature = "libadwaita"))]
let container = gtk::HeaderBar::builder()
diff --git a/lact-gui/src/app/mod.rs b/lact-gui/src/app/mod.rs
index 4fe4d84c..52513969 100644
--- a/lact-gui/src/app/mod.rs
+++ b/lact-gui/src/app/mod.rs
@@ -27,7 +27,7 @@ use std::time::Duration;
use tracing::{debug, error, trace, warn};
#[cfg(feature = "libadwaita")]
-use libadwaita::prelude::{AdwApplicationWindowExt, MessageDialogExt};
+use adw::prelude::{AdwApplicationWindowExt, MessageDialogExt};
// In ms
const STATS_POLL_INTERVAL: u64 = 250;
@@ -35,9 +35,9 @@ const STATS_POLL_INTERVAL: u64 = 250;
#[derive(Clone)]
pub struct App {
#[cfg(feature = "libadwaita")]
- application: libadwaita::Application,
+ application: adw::Application,
#[cfg(feature = "libadwaita")]
- pub window: libadwaita::ApplicationWindow,
+ pub window: adw::ApplicationWindow,
#[cfg(not(feature = "libadwaita"))]
application: Application,
@@ -53,13 +53,13 @@ pub struct App {
impl App {
pub fn new(daemon_client: DaemonClient) -> Self {
#[cfg(feature = "libadwaita")]
- let application = libadwaita::Application::new(Some(APP_ID), ApplicationFlags::default());
+ let application = adw::Application::new(Some(APP_ID), ApplicationFlags::default());
#[cfg(not(feature = "libadwaita"))]
let application = Application::new(Some(APP_ID), ApplicationFlags::default());
#[cfg(feature = "libadwaita")]
- let window = libadwaita::ApplicationWindow::builder()
+ let window = adw::ApplicationWindow::builder()
.title("LACT")
.default_width(820)
.default_height(750)
@@ -94,10 +94,10 @@ impl App {
#[cfg(feature = "libadwaita")]
{
- let root_view = libadwaita::ToolbarView::new();
+ let root_view = adw::ToolbarView::new();
root_view.add_top_bar(&headerbar.container);
root_view.add_bottom_bar(
- &libadwaita::ViewSwitcherBar::builder()
+ &adw::ViewSwitcherBar::builder()
.reveal(true)
.stack(&root_stack.container)
.build(),
@@ -528,7 +528,7 @@ impl App {
#[cfg(feature = "libadwaita")]
fn enable_overclocking(&self) {
let text = format!("This will enable the overdrive feature of the amdgpu driver by creating a file at {MODULE_CONF_PATH}");
- let dialog = libadwaita::MessageDialog::builder()
+ let dialog = adw::MessageDialog::builder()
.heading("Enable Overclocking")
.body_use_markup(true)
.body(text)
@@ -541,8 +541,8 @@ impl App {
dialog.add_response(res_cancel, "_Cancel");
dialog.add_response(res_ok, "_Ok");
- dialog.set_response_appearance(res_cancel, libadwaita::ResponseAppearance::Destructive);
- dialog.set_response_appearance(res_ok, libadwaita::ResponseAppearance::Suggested);
+ dialog.set_response_appearance(res_cancel, adw::ResponseAppearance::Destructive);
+ dialog.set_response_appearance(res_ok, adw::ResponseAppearance::Suggested);
dialog.connect_response(
None,
@@ -608,7 +608,7 @@ impl App {
#[cfg(feature = "libadwaita")]
fn ask_confirmation(&self, gpu_id: String, mut delay: u64) {
let text = confirmation_text(delay);
- let dialog = libadwaita::MessageDialog::builder()
+ let dialog = adw::MessageDialog::builder()
.heading("Confirm settings")
.body(text)
.modal(true)
@@ -620,8 +620,8 @@ impl App {
dialog.add_response(res_no, "_No");
dialog.add_response(res_yes, "_Yes");
- dialog.set_response_appearance(res_no, libadwaita::ResponseAppearance::Destructive);
- dialog.set_response_appearance(res_yes, libadwaita::ResponseAppearance::Suggested);
+ dialog.set_response_appearance(res_no, adw::ResponseAppearance::Destructive);
+ dialog.set_response_appearance(res_yes, adw::ResponseAppearance::Suggested);
let confirmed = Rc::new(AtomicBool::new(false));
glib::source::timeout_add_local(
diff --git a/lact-gui/src/app/root_stack/info_page/vulkan_info/feature_window/mod.rs b/lact-gui/src/app/root_stack/info_page/vulkan_info/feature_window/mod.rs
index 1a7f96d0..5329888c 100644
--- a/lact-gui/src/app/root_stack/info_page/vulkan_info/feature_window/mod.rs
+++ b/lact-gui/src/app/root_stack/info_page/vulkan_info/feature_window/mod.rs
@@ -7,7 +7,7 @@ use gtk::{gio, glib};
#[cfg(feature = "libadwaita")]
glib::wrapper! {
pub struct VulkanFeaturesWindow(ObjectSubclass)
- @extends gtk::Box, gtk::Widget, gtk::Window, libadwaita::Window,
+ @extends gtk::Box, gtk::Widget, gtk::Window, adw::Window,
@implements gtk::Orientable, gtk::Accessible, gtk::Buildable;
}
@@ -44,12 +44,18 @@ mod imp {
use std::cell::RefCell;
#[cfg(feature = "libadwaita")]
- use libadwaita::subclass::window::AdwWindowImpl;
+ use adw::subclass::window::AdwWindowImpl;
#[derive(CompositeTemplate, Properties, Default)]
#[properties(wrapper_type = super::VulkanFeaturesWindow)]
- #[cfg_attr(feature = "libadwaita", template(file = "ui/vulkan_features_window.blp"))]
- #[cfg_attr(not(feature = "libadwaita"), template(file = "ui/vulkan_features_window_gtk.blp"))]
+ #[cfg_attr(
+ feature = "libadwaita",
+ template(file = "ui/vulkan_features_window.blp")
+ )]
+ #[cfg_attr(
+ not(feature = "libadwaita"),
+ template(file = "ui/vulkan_features_window_gtk.blp")
+ )]
pub struct VulkanFeaturesWindow {
#[property(get, set)]
model: RefCell