diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-05 14:07:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-05 16:40:04 +0200 |
commit | 97fdf8a04b50b2f7763eba7b16096868a358d313 (patch) | |
tree | 67e87436b4d9106a1457999fa423e7c3dae8a6d6 /vcl | |
parent | 1944e3ddc0b2247de3138d2a441cd6999e21fd9a (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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
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() |