use libadwaita for app & app window

This commit is contained in:
yggverse 2024-10-09 10:50:41 +03:00
parent e2ab831d57
commit 9e5a2a490c
11 changed files with 57 additions and 47 deletions

View file

@ -2,8 +2,8 @@ mod database;
use database::Database;
use adw::HeaderBar;
use gtk::{prelude::GtkWindowExt, ApplicationWindow, Box};
use adw::ApplicationWindow;
use gtk::{prelude::GtkWindowExt, Box};
use sqlite::Transaction;
// Default options
@ -17,11 +17,10 @@ pub struct Widget {
impl Widget {
// Construct
pub fn new(titlebar: &HeaderBar, child: &Box) -> Self {
pub fn new(content: &Box) -> Self {
// Init GTK
let gobject = ApplicationWindow::builder()
.titlebar(titlebar)
.child(child)
.content(content)
.default_height(DEFAULT_HEIGHT)
.default_width(DEFAULT_WIDTH)
.maximized(MAXIMIZED)