summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-05 14:07:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-05 16:40:04 +0200
commit97fdf8a04b50b2f7763eba7b16096868a358d313 (patch)
tree67e87436b4d9106a1457999fa423e7c3dae8a6d6
parent1944e3ddc0b2247de3138d2a441cd6999e21fd9a (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/layout.hxx3
-rw-r--r--vcl/source/window/dialog.cxx13
2 files changed, 8 insertions, 8 deletions
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()