mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
complete widget submodule refactory
This commit is contained in:
parent
e45b7f0a4a
commit
1e42a75f2e
29 changed files with 585 additions and 145 deletions
24
src/browser/main/tab/label/widget.rs
Normal file
24
src/browser/main/tab/label/widget.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
use gtk::prelude::BoxExt;
|
||||
|
||||
pub struct Label {
|
||||
gtk: gtk::Box,
|
||||
}
|
||||
|
||||
impl Label {
|
||||
// Construct new object
|
||||
pub fn new(pin: >k::Image, title: >k::Label) -> Label {
|
||||
let gtk = gtk::Box::builder()
|
||||
.orientation(gtk::Orientation::Horizontal)
|
||||
.build();
|
||||
|
||||
gtk.append(pin);
|
||||
gtk.append(title);
|
||||
|
||||
Self { gtk }
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gtk(&self) -> >k::Box {
|
||||
&self.gtk
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue