feat: use EchidnaSidebar in window ui file
parent
6144feb857
commit
6ad708cfc1
|
@ -1,7 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::CompositeTemplate;
|
||||
|
@ -11,6 +11,8 @@ use gtk::CompositeTemplate;
|
|||
pub struct EchidnaWindow {
|
||||
#[template_child]
|
||||
pub notebook: TemplateChild<gtk::Notebook>,
|
||||
#[template_child]
|
||||
pub sidebar: TemplateChild<super::super::sidebar::EchidnaSidebar>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
@ -19,7 +21,6 @@ impl ObjectSubclass for EchidnaWindow {
|
|||
type Type = super::EchidnaWindow;
|
||||
type ParentType = gtk::ApplicationWindow;
|
||||
|
||||
|
||||
fn class_init(class: &mut Self::Class) {
|
||||
Self::bind_template(class);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<object class="GtkBox" id="bars-box">
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkStackSidebar" id="sidebar"></object>
|
||||
<object class="EchidnaSidebar" id="sidebar"></object>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
|
@ -26,6 +26,7 @@
|
|||
<child>
|
||||
-->
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
<object id="getting-started" class="GtkLabel">
|
||||
<property name="label">Hello from Echidna!</property>
|
||||
|
|
Loading…
Reference in New Issue