[Libreoffice-commits] core.git: include/vcl vcl/source

Caolán McNamara caolanm at redhat.com
Thu Oct 5 14:40:36 UTC 2017


 include/vcl/layout.hxx       |    3 ++-
 vcl/source/window/dialog.cxx |   13 ++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 97fdf8a04b50b2f7763eba7b16096868a358d313
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 5 14:07:19 2017 +0100

    Resolves: tdf#86547 width of button box is taken before spacing added
    
    Change-Id: I2497dfcea98682db7e507704227052c13a18d9dd
    Reviewed-on: https://gerrit.libreoffice.org/43168
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index f52b95e3a9ec..49f69db5b421 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -16,6 +16,7 @@
 #include <vcl/fixed.hxx>
 #include <vcl/scrbar.hxx>
 #include <vcl/split.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/vclmedit.hxx>
 #include <vcl/window.hxx>
 #include <vcl/vclptr.hxx>
@@ -198,7 +199,7 @@ class VCL_DLLPUBLIC VclButtonBox : public VclBox
 {
 public:
     VclButtonBox(vcl::Window *pParent)
-        : VclBox(pParent, false, 0/*nSpacing*/)
+        : VclBox(pParent, false, Application::GetSettings().GetStyleSettings().GetDialogStyle().button_spacing)
         , m_eLayoutStyle(VclButtonBoxStyle::Default)
     {
     }
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c6d54e3de38a..84189899b775 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -542,6 +542,12 @@ Dialog::Dialog(vcl::Window* pParent, WinBits nStyle, InitFlag eFlag)
 void Dialog::set_action_area(VclButtonBox* pBox)
 {
     mpActionArea.set(pBox);
+    if (pBox)
+    {
+        const DialogStyle& rDialogStyle =
+            GetSettings().GetStyleSettings().GetDialogStyle();
+        pBox->set_border_width(rDialogStyle.action_area_border);
+    }
 }
 
 void Dialog::set_content_area(VclBox* pBox)
@@ -557,13 +563,6 @@ void Dialog::settingOptimalLayoutSize(Window *pBox)
     pBox2->set_border_width(rDialogStyle.content_area_border);
     pBox2->set_spacing(pBox2->get_spacing() +
         rDialogStyle.content_area_spacing);
-
-    VclButtonBox *pActionArea = getActionArea(this);
-    if (pActionArea)
-    {
-        pActionArea->set_border_width(rDialogStyle.action_area_border);
-        pActionArea->set_spacing(rDialogStyle.button_spacing);
-    }
 }
 
 Dialog::~Dialog()


More information about the Libreoffice-commits mailing list