File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed
Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ template $GeopardWindow: Adw.ApplicationWindow {
7575 }
7676
7777 [end]
78- Gtk.MenuButton primary_menu_btn {
78+ Gtk.MenuButton main_menu_button {
7979 icon-name: "open-menu";
8080 menu-model: primary_menu;
8181 tooltip-text: _("Main menu");
@@ -168,13 +168,6 @@ template $GeopardWindow: Adw.ApplicationWindow {
168168 tooltip-text: _("Start searching");
169169 }
170170
171- [end]
172- Gtk.MenuButton {
173- icon-name: "open-menu";
174- menu-model: primary_menu;
175- tooltip-text: _("Main menu");
176- }
177-
178171 [end]
179172 Gtk.Button {
180173 icon-name: "view-grid-symbolic";
@@ -195,15 +188,13 @@ template $GeopardWindow: Adw.ApplicationWindow {
195188 next_box.visible: false;
196189 refresh_btn.visible: false;
197190 tab_new_btn.visible: false;
198- primary_menu_btn.visible: false;
199191 desktop_tab_overview_btn.visible: false;
200192 toolbar_view.reveal-bottom-bars: true;
201193 tab_bar_revealer.reveal-child: false;
202194 }
203195 }
204196}
205197
206-
207198menu primary_menu {
208199 section {
209200 item {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub mod imp {
7171 #[ template_child]
7272 pub ( crate ) tab_bar_revealer : TemplateChild < gtk:: Revealer > ,
7373 #[ template_child]
74- pub ( crate ) primary_menu_btn : TemplateChild < gtk:: MenuButton > ,
74+ pub ( crate ) main_menu_button : TemplateChild < gtk:: MenuButton > ,
7575 pub ( crate ) config : RefCell < config:: Config > ,
7676 pub ( crate ) progress_animation : RefCell < Option < adw:: SpringAnimation > > ,
7777 pub ( crate ) binded_tab_properties : RefCell < Vec < glib:: Binding > > ,
@@ -385,7 +385,9 @@ impl Window {
385385 fn setup_zoom_popover_item ( & self ) {
386386 let imp = self . imp ( ) ;
387387
388- let popover: gtk:: PopoverMenu = imp. primary_menu_btn . popover ( ) . unwrap ( ) . downcast ( ) . unwrap ( ) ;
388+ let menu_popover: gtk:: PopoverMenu =
389+ imp. main_menu_button . popover ( ) . unwrap ( ) . downcast ( ) . unwrap ( ) ;
390+
389391 let zoom_box = gtk:: Box :: builder ( )
390392 . spacing ( 12 )
391393 . margin_start ( 18 )
@@ -422,7 +424,7 @@ impl Window {
422424 . action_name ( "win.zoom-in" )
423425 . build ( ) ,
424426 ) ;
425- popover . add_child ( & zoom_box, "zoom" ) ;
427+ menu_popover . add_child ( & zoom_box. clone ( ) , "zoom" ) ;
426428 }
427429 fn setup_history_button <
428430 F : for < ' a > Fn (
You can’t perform that action at this time.
0 commit comments