mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement separated dialogs for the Bookmarks and History menu items
This commit is contained in:
parent
e548efc93f
commit
ebb38008e1
14 changed files with 378 additions and 171 deletions
|
|
@ -1,17 +1,13 @@
|
|||
mod bar;
|
||||
|
||||
use super::{Action as WindowAction, BrowserAction, Profile};
|
||||
use super::{Action as WindowAction, BrowserAction};
|
||||
use adw::{TabView, ToolbarView};
|
||||
use bar::Bar;
|
||||
use gtk::Box;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub trait Header {
|
||||
fn header(
|
||||
action: (&Rc<BrowserAction>, &Rc<WindowAction>),
|
||||
profile: &Rc<Profile>,
|
||||
tab_view: &TabView,
|
||||
) -> Self;
|
||||
fn header(action: (&Rc<BrowserAction>, &Rc<WindowAction>), tab_view: &TabView) -> Self;
|
||||
}
|
||||
|
||||
impl Header for ToolbarView {
|
||||
|
|
@ -20,16 +16,11 @@ impl Header for ToolbarView {
|
|||
/// Build new `Self`
|
||||
fn header(
|
||||
(browser_action, window_action): (&Rc<BrowserAction>, &Rc<WindowAction>),
|
||||
profile: &Rc<Profile>,
|
||||
tab_view: &TabView,
|
||||
) -> Self {
|
||||
let toolbar_view = ToolbarView::builder().build();
|
||||
|
||||
toolbar_view.add_top_bar(&Box::bar(
|
||||
(browser_action, window_action),
|
||||
profile,
|
||||
tab_view,
|
||||
));
|
||||
toolbar_view.add_top_bar(&Box::bar((browser_action, window_action), tab_view));
|
||||
|
||||
toolbar_view
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue