summaryrefslogtreecommitdiff
path: root/svx/source/dialog/dlgctrl.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-30 17:13:24 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-07-01 01:36:34 +0200
commit9bef09cb2f0c9c9e6819f28ed8e83c0edd6eadb6 (patch)
tree9a8adc6ac950879fdbbd78a7b2d973ebc906dc8c /svx/source/dialog/dlgctrl.cxx
parent7b00fbddfb1cd55a68ed7481ebd4a5d5f60c6128 (diff)
tdf#134357 we can reduce the min toolbar sidebar width
since, commit 754bea8c6a17889f9d4d23bf98847b6b67253220 Date: Wed Apr 29 15:06:42 2020 +0100 remove the padding around the dropdown button of GtkMenuToolButtons the GtkMenuToolButton aren't as wide anymore so we don't need a min of 5 GtkToolButtons widths for tdf#130197, now the max of either 4 GtkToolButtons or that of 1 GtkToolButtons + 2 GtkMenuToolButton is sufficient Change-Id: I7296805b4b3c0d86ce3d08cadc8c2659104af619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97544 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'svx/source/dialog/dlgctrl.cxx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index f63196c37e2a..75f9319fce5f 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1446,9 +1446,11 @@ void padWidthForSidebar(weld::Toolbar& rToolbar, const css::uno::Reference<css::
// use the, filled-in by dispatcher, width of measurewidth as the width
// of a "standard" column in a two column panel
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, "svx/ui/measurewidthbar.ui"));
- std::unique_ptr<weld::Toolbar> xToolbar(xBuilder->weld_toolbar("measurewidth"));
- std::unique_ptr<ToolbarUnoDispatcher> xDispatcher(new ToolbarUnoDispatcher(*xToolbar, *xBuilder, rFrame));
- nColumnWidth = xToolbar->get_preferred_size().Width();
+ std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar("measurewidth1"));
+ std::unique_ptr<ToolbarUnoDispatcher> xDispatcher1(new ToolbarUnoDispatcher(*xToolbar1, *xBuilder, rFrame));
+ std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar("measurewidth2"));
+ std::unique_ptr<ToolbarUnoDispatcher> xDispatcher2(new ToolbarUnoDispatcher(*xToolbar2, *xBuilder, rFrame));
+ nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width());
eSize = rToolbar.get_icon_size();
}
rToolbar.set_size_request(nColumnWidth, -1);