mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
allow any kind of widget
This commit is contained in:
parent
f13aff2fa8
commit
b2237879be
3 changed files with 18 additions and 13 deletions
|
|
@ -1,4 +1,7 @@
|
|||
use gtk::{prelude::BoxExt, Box, Button, Entry, Orientation};
|
||||
use gtk::{
|
||||
prelude::{BoxExt, IsA},
|
||||
Box, Orientation,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
||||
const MARGIN: i32 = 6;
|
||||
|
|
@ -11,11 +14,11 @@ pub struct Widget {
|
|||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
base: &Button,
|
||||
history: &Box,
|
||||
reload: &Button,
|
||||
request: &Entry,
|
||||
bookmark: &Button,
|
||||
base: &impl IsA<gtk::Widget>,
|
||||
history: &impl IsA<gtk::Widget>,
|
||||
reload: &impl IsA<gtk::Widget>,
|
||||
request: &impl IsA<gtk::Widget>,
|
||||
bookmark: &impl IsA<gtk::Widget>,
|
||||
) -> Arc<Self> {
|
||||
let gobject = Box::builder()
|
||||
.orientation(Orientation::Horizontal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue