include/sfx2/sidebar/TabBar.hxx | 2 sfx2/source/sidebar/TabBar.cxx | 2 sfx2/uiconfig/ui/tabbarcontents.ui | 82 +++++++++++++++++++++---------------- 3 files changed, 49 insertions(+), 37 deletions(-)
New commits: commit c420b05745a507d6649c84279b6de5455d7d6ecb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jul 6 12:22:30 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jul 6 15:20:55 2021 +0200 gtk4: insert an intermediate GtkBox as 'toplevel' so we only have to concern outselves about GtkBox and GtkGrid as containers Change-Id: I7154c6256d26b0bb1e13a75eb063ae86d3632bf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118479 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index 4c9b30e3f6e8..d788f9f01c1b 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -92,7 +92,7 @@ private: // gtk will warn on loading a .ui with an accelerator defined, so use a // temporary toplevel to suppress that and move the contents after load std::unique_ptr<weld::Builder> mxAuxBuilder; - std::unique_ptr<weld::Container> mxTempToplevel; + std::unique_ptr<weld::Box> mxTempToplevel; std::unique_ptr<weld::Widget> mxContents; std::unique_ptr<weld::MenuButton> mxMenuButton; diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index eda97378bcae..a233519f4752 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -48,7 +48,7 @@ TabBar::TabBar(vcl::Window* pParentWindow, : InterimItemWindow(pParentWindow, "sfx/ui/tabbar.ui", "TabBar") , mxFrame(rxFrame) , mxAuxBuilder(Application::CreateBuilder(m_xContainer.get(), "sfx/ui/tabbarcontents.ui")) - , mxTempToplevel(mxAuxBuilder->weld_container("toplevel")) + , mxTempToplevel(mxAuxBuilder->weld_box("toplevel")) , mxContents(mxAuxBuilder->weld_widget("TabBarContents")) , mxMenuButton(mxAuxBuilder->weld_menu_button("menubutton")) , mxMainMenu(mxAuxBuilder->weld_menu("mainmenu")) diff --git a/sfx2/uiconfig/ui/tabbarcontents.ui b/sfx2/uiconfig/ui/tabbarcontents.ui index 31a8ceb818b4..d1fe113122b4 100644 --- a/sfx2/uiconfig/ui/tabbarcontents.ui +++ b/sfx2/uiconfig/ui/tabbarcontents.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.1 --> +<!-- Generated with glade 3.38.2 --> <interface domain="sfx"> <requires lib="gtk+" version="3.20"/> <object class="GtkImage" id="image6"> @@ -72,65 +72,77 @@ </object> </child> </object> - <object class="GtkWindow" id="toplevel"> + <object class="GtkWindow" id="window"> <property name="can-focus">False</property> <child> - <object class="GtkBox" id="TabBarContents"> + <object class="GtkBox" id="toplevel"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkBox"> + <object class="GtkBox" id="TabBarContents"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="border-width">2</property> <property name="orientation">vertical</property> <child> - <object class="GtkMenuButton" id="menubutton"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="tooltip-text" translatable="yes" context="tabbar|menubutton|tool_tip">Sidebar Settings</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="margin-bottom">3</property> - <property name="image">image6</property> - <property name="relief">none</property> - <property name="always-show-image">True</property> - <property name="popup">mainmenu</property> - <property name="use-popover">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkToolbar" id="measure"> + <object class="GtkBox"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="halign">center</property> + <property name="border-width">2</property> <property name="orientation">vertical</property> - <property name="toolbar-style">icons</property> - <property name="show-arrow">False</property> <child> - <object class="GtkToggleToolButton" id="toggle"> + <object class="GtkMenuButton" id="menubutton"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="tabbar|menubutton|tool_tip">Sidebar Settings</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="margin-bottom">3</property> + <property name="image">image6</property> + <property name="relief">none</property> + <property name="always-show-image">True</property> + <property name="popup">mainmenu</property> + <property name="use-popover">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="measure"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="use-underline">True</property> - <property name="icon-name">sfx2/res/symphony/sidebar-property-large.png</property> + <property name="halign">center</property> + <property name="orientation">vertical</property> + <property name="toolbar-style">icons</property> + <property name="show-arrow">False</property> + <child> + <object class="GtkToggleToolButton" id="toggle"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="use-underline">True</property> + <property name="icon-name">sfx2/res/symphony/sidebar-property-large.png</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> - <property name="homogeneous">True</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> </object> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits