mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use libadwaita for app & app window
This commit is contained in:
parent
e2ab831d57
commit
9e5a2a490c
11 changed files with 57 additions and 47 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue