diff options
author | António Fernandes <antoniof@gnome.org> | 2021-12-19 12:40:34 +0000 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-01-05 11:32:12 +0000 |
commit | c0d624c18d8cc4001081197aeb0237611104c09a (patch) | |
tree | 75b5042015b37bcb55c087492ef5960180b6d1c5 /src/resources/ui/nautilus-toolbar.ui | |
parent | 12d3deb7765e2d3191c2678b31a91f354c96c021 (diff) | |
download | nautilus-c0d624c18d8cc4001081197aeb0237611104c09a.tar.gz |
toolbar: Don't subclass HdyHeaderBar
In GTK4 we are not going to be able to subclass headerbars.
But subclassing GtkWidget directly implies adding a lot of
boilerplate to behave as a container.
The easy way around that is going to be AdwBin. Use GtkBin for the
time being, but introduce a wraper for a missing method.
Diffstat (limited to 'src/resources/ui/nautilus-toolbar.ui')
-rw-r--r-- | src/resources/ui/nautilus-toolbar.ui | 385 |
1 files changed, 195 insertions, 190 deletions
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui index fe95facfd..8bb25bf2e 100644 --- a/src/resources/ui/nautilus-toolbar.ui +++ b/src/resources/ui/nautilus-toolbar.ui @@ -135,203 +135,105 @@ </object> </child> </object> - <template class="NautilusToolbar" parent="HdyHeaderBar"> + <template class="NautilusToolbar" parent="GtkBin"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="show_close_button">True</property> - <child type="title"> - <object class="GtkBox" id="header_toolbar"> - <property name="width_request">270</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkStack" id="toolbar_switcher"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="valign">center</property> - <property name="hexpand">False</property> - <property name="transition_type">crossfade</property> - <child> - <object class="GtkBox" id="path_bar_container"> - <property name="can_focus">False</property> - <property name="valign">center</property> - </object> - <packing> - <property name="name">pathbar</property> - </packing> - </child> - <child> - <object class="GtkBox" id="location_entry_container"> - <property name="can_focus">False</property> - <style> - <class name="linked"/> - </style> - </object> - <packing> - <property name="name">location</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="search_container"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="name">search</property> - <property name="position">2</property> - </packing> - </child> - </object> - </child> - <child> - <object class="GtkToggleButton" id="search_button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Search</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="action_name">slot.search-visible</property> - <child> - <object class="GtkImage" id="search_icon"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">edit-find-symbolic</property> - <property name="icon_size">1</property> - </object> - </child> - <style> - <class name="image-button"/> - </style> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - </object> - </child> <child> - <object class="GtkBox" id="navigation_box"> + <object class="HdyHeaderBar"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="GtkButton" id="back_button"> + <property name="show_close_button">True</property> + <child type="title"> + <object class="GtkBox" id="header_toolbar"> + <property name="width_request">270</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Go back</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="action_name">win.back</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> <child> - <object class="GtkImage" id="back_icon"> + <object class="GtkStack" id="toolbar_switcher"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="icon_name">go-previous-symbolic</property> - <property name="icon_size">1</property> + <property name="valign">center</property> + <property name="hexpand">False</property> + <property name="transition_type">crossfade</property> + <child> + <object class="GtkBox" id="path_bar_container"> + <property name="can_focus">False</property> + <property name="valign">center</property> + </object> + <packing> + <property name="name">pathbar</property> + </packing> + </child> + <child> + <object class="GtkBox" id="location_entry_container"> + <property name="can_focus">False</property> + <style> + <class name="linked"/> + </style> + </object> + <packing> + <property name="name">location</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="search_container"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + </object> + <packing> + <property name="name">search</property> + <property name="position">2</property> + </packing> + </child> </object> </child> - <style> - <class name="image-button"/> - </style> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="forward_button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Go forward</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="action_name">win.forward</property> <child> - <object class="GtkImage" id="forward_icon"> + <object class="GtkToggleButton" id="search_button"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">go-next-symbolic</property> - <property name="icon_size">1</property> - </object> - </child> - <style> - <class name="image-button"/> - </style> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <style> - <class name="linked"/> - <class name="raised"/> - </style> - </object> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_start">72</property> - <child> - <object class="GtkRevealer" id="operations_revealer"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="transition_type">slide-right</property> - <child> - <object class="GtkMenuButton" id="operations_button"> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Show operations</property> - <property name="margin_end">6</property> - <property name="popover">operations_popover</property> - <signal name="toggled" handler="on_operations_button_toggled" object="NautilusToolbar" swapped="yes"/> + <property name="tooltip_text" translatable="yes">Search</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="action_name">slot.search-visible</property> <child> - <object class="GtkDrawingArea" id="operations_icon"> - <property name="width_request">16</property> - <property name="height_request">16</property> + <object class="GtkImage" id="search_icon"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <signal name="draw" handler="on_operations_icon_draw" object="NautilusToolbar" swapped="no"/> + <property name="icon_name">edit-find-symbolic</property> + <property name="icon_size">1</property> </object> </child> <style> - <class name="button"/> + <class name="image-button"/> </style> </object> + <packing> + <property name="position">2</property> + </packing> </child> </object> - <packing> - <property name="position">0</property> - </packing> </child> <child> - <object class="GtkBox"> + <object class="GtkBox" id="navigation_box"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="margin_end">6</property> <child> - <object class="GtkButton" id="view_toggle_button"> + <object class="GtkButton" id="back_button"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Toggle view</property> - <property name="action_name">slot.files-view-mode-toggle</property> + <property name="tooltip_text" translatable="yes">Go back</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="action_name">win.back</property> <child> - <object class="GtkImage" id="view_toggle_icon"> + <object class="GtkImage" id="back_icon"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="icon_name">go-previous-symbolic</property> <property name="icon_size">1</property> </object> </child> @@ -344,23 +246,24 @@ </packing> </child> <child> - <object class="GtkMenuButton" id="view_button"> + <object class="GtkButton" id="forward_button"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" comments="“View” is a noun">View options</property> - <property name="halign">start</property> - <property name="action_name">win.view-menu</property> - <property name="menu-model">view_menu</property> + <property name="receives_default">False</property> + <property name="tooltip_text" translatable="yes">Go forward</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="action_name">win.forward</property> <child> - <object class="GtkImage"> + <object class="GtkImage" id="forward_icon"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="icon_name">pan-down-symbolic</property> + <property name="icon_name">go-next-symbolic</property> + <property name="icon_size">1</property> </object> </child> <style> - <class name="disclosure-button"/> + <class name="image-button"/> </style> </object> <packing> @@ -369,41 +272,143 @@ </child> <style> <class name="linked"/> + <class name="raised"/> </style> </object> - <packing> - <property name="position">2</property> - </packing> </child> <child> - <object class="GtkMenuButton" id="app_button"> + <object class="GtkBox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="menu-model">app_menu</property> + <property name="can_focus">False</property> + <property name="margin_start">72</property> <child> - <object class="GtkImage"> + <object class="GtkRevealer" id="operations_revealer"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="icon_name">open-menu-symbolic</property> - <property name="icon_size">1</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="transition_type">slide-right</property> + <child> + <object class="GtkMenuButton" id="operations_button"> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="tooltip_text" translatable="yes">Show operations</property> + <property name="margin_end">6</property> + <property name="popover">operations_popover</property> + <signal name="toggled" handler="on_operations_button_toggled" object="NautilusToolbar" swapped="yes"/> + <child> + <object class="GtkDrawingArea" id="operations_icon"> + <property name="width_request">16</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <signal name="draw" handler="on_operations_icon_draw" object="NautilusToolbar" swapped="no"/> + </object> + </child> + <style> + <class name="button"/> + </style> + </object> + </child> </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="margin_end">6</property> + <child> + <object class="GtkButton" id="view_toggle_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="tooltip_text" translatable="yes">Toggle view</property> + <property name="action_name">slot.files-view-mode-toggle</property> + <child> + <object class="GtkImage" id="view_toggle_icon"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_size">1</property> + </object> + </child> + <style> + <class name="image-button"/> + </style> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkMenuButton" id="view_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes" comments="“View” is a noun">View options</property> + <property name="halign">start</property> + <property name="action_name">win.view-menu</property> + <property name="menu-model">view_menu</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">pan-down-symbolic</property> + </object> + </child> + <style> + <class name="disclosure-button"/> + </style> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + <style> + <class name="linked"/> + </style> + </object> + <packing> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkMenuButton" id="app_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="menu-model">app_menu</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">open-menu-symbolic</property> + <property name="icon_size">1</property> + </object> + </child> + <style> + <class name="image-button"/> + </style> + </object> + <packing> + <property name="position">3</property> + </packing> </child> - <style> - <class name="image-button"/> - </style> </object> <packing> + <property name="pack_type">end</property> <property name="position">3</property> </packing> </child> </object> - <packing> - <property name="pack_type">end</property> - <property name="position">3</property> - </packing> </child> </template> </interface> |