diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-14 12:05:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-14 22:08:28 +0200 |
commit | 98ac01e74ab95c735b7383601ad2e4ed09962184 (patch) | |
tree | dbb519340f3b89f829599cbd9ad285e35128c96c /vcl/unx/gtk3 | |
parent | b555f76b9d27d8f7b4d7413650230097bd97025e (diff) |
do setPreviewsToSamePlace at SfxTabDialogController display time
Change-Id: Ia38c1a577b7d054ab4e7e70a8f2cbce16a3573f5
Reviewed-on: https://gerrit.libreoffice.org/55810
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index cc927fe89742..47ef69b4077a 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1747,6 +1747,47 @@ public: } }; +class GtkInstanceSizeGroup : public weld::SizeGroup +{ +private: + GtkSizeGroup* m_pGroup; +public: + GtkInstanceSizeGroup() + : m_pGroup(gtk_size_group_new(GTK_SIZE_GROUP_NONE)) + { + } + virtual void add_widget(weld::Widget* pWidget) override + { + GtkInstanceWidget* pVclWidget = dynamic_cast<GtkInstanceWidget*>(pWidget); + assert(pVclWidget); + gtk_size_group_add_widget(m_pGroup, pVclWidget->getWidget()); + } + virtual void set_mode(VclSizeGroupMode eVclMode) override + { + GtkSizeGroupMode eGtkMode; + switch (eVclMode) + { + case VclSizeGroupMode::NONE: + eGtkMode = GTK_SIZE_GROUP_NONE; + break; + case VclSizeGroupMode::Horizontal: + eGtkMode = GTK_SIZE_GROUP_HORIZONTAL; + break; + case VclSizeGroupMode::Vertical: + eGtkMode = GTK_SIZE_GROUP_VERTICAL; + break; + case VclSizeGroupMode::Both: + eGtkMode = GTK_SIZE_GROUP_BOTH; + break; + } + gtk_size_group_set_mode(m_pGroup, eGtkMode); + } + virtual ~GtkInstanceSizeGroup() override + { + g_object_unref(m_pGroup); + } +}; + class GtkInstanceContainer : public GtkInstanceWidget, public virtual weld::Container { private: @@ -4885,6 +4926,11 @@ public: return nullptr; return new GtkInstanceMenu(pMenu, bTakeOwnership); } + + virtual weld::SizeGroup* create_size_group() override + { + return new GtkInstanceSizeGroup; + } }; void GtkInstanceWindow::help() |