using Gtk 4.0; using Adw 1; template $Window: Adw.ApplicationWindow { width-request: 360; height-request: 360; default-width: 1080; default-height: 768; title: "Biblioteca"; styles ["main-window"] Adw.Breakpoint window_breakpoint { condition ("max-width: 850sp") setters { split_view.collapsed: true; button_sidebar.visible: true; } } content: Adw.TabOverview tab_overview { enable-new-tab: true; view: tab_view; Adw.OverlaySplitView split_view { show-sidebar: bind button_sidebar.active; content: Adw.NavigationPage content_page { title: _("Documentation"); child: Adw.BreakpointBin { width-request: 360; height-request: 360; Adw.Breakpoint toolbar_breakpoint { condition ("max-width: 450sp") setters { bottom_toolbar.visible: true; button_new_tab.visible: false; tab_bar.visible: false; tab_button.visible: true; } } child: Adw.ToolbarView { [top] Box { name: "top-toolbars"; orientation: vertical; Adw.HeaderBar content_header_bar { title-widget: Stack header_bar_stack { StackPage { name: "title"; child: Adw.WindowTitle header_bar_title { title: bind content_page.title; }; } StackPage { name: "url_bar"; child: Adw.Clamp { Gtk.Entry url_bar { hexpand: true; input-purpose: url; } }; } }; [start] ToggleButton button_sidebar { icon-name: "sidebar-show-symbolic"; tooltip-text: _("Open Sidebar"); visible: false; active: bind split_view.show-sidebar; styles ["flat"] } [start] Box box_navigation { spacing: 6; halign: start; Button button_back { icon-name: "go-previous-symbolic"; tooltip-text: _("Back"); action-name: "win.navigation-back"; styles ["flat"] } Button button_forward { icon-name: "go-next-symbolic"; tooltip-text: _("Forward"); action-name: "win.navigation-forward"; styles ["flat"] } } [end] Button button_new_tab { icon-name: "tab-new-symbolic"; action-name: "win.new-tab"; action-target: '"file:///app/share/doc/gtk4/index.html"'; tooltip-text: _("New Tab"); styles ["flat"] } } Adw.TabBar tab_bar { view: tab_view; } ProgressBar load_bar { styles ["osd"] } } [bottom] ActionBar bottom_toolbar { visible: false; [end] Adw.TabButton tab_button { halign: end; view: tab_view; visible: false; } } Adw.TabView tab_view { vexpand: true; shortcuts: all_shortcuts; } }; }; }; } }; }