[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 19 21:06:20 UTC 2018


 svx/source/dialog/charmap.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit c763002727049752879dd81daf6ee59a8a9d0da9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 19 14:21:10 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 19 22:05:55 2018 +0100

    tdf#121232 set a size request that will result in a 0 m_nXGap by default
    
    Change-Id: I25ce389bd46beff2dd9b0507581736f2f9511383
    Reviewed-on: https://gerrit.libreoffice.org/63575
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 1b78839c4f97..0d8a869a63d6 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -82,8 +82,16 @@ SvxShowCharSet::SvxShowCharSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWi
 void SvxShowCharSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
     CustomWidgetController::SetDrawingArea(pDrawingArea);
-    mxScrollArea->set_size_request(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 4,
-                                   ROW_COUNT * pDrawingArea->get_text_height() * 2);
+
+    Size aSize(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 5.25,
+               ROW_COUNT * pDrawingArea->get_text_height() * 2);
+
+    nX = aSize.Width() / COLUMN_COUNT;
+    nY = aSize.Height() / ROW_COUNT;
+
+    // tdf#121232 set a size request that will result in a 0 m_nXGap by default
+    mxScrollArea->set_size_request(COLUMN_COUNT * nX + mxScrollArea->get_vscroll_width() + 2,
+                                   ROW_COUNT * nY);
 }
 
 void SvxShowCharSet::init()


More information about the Libreoffice-commits mailing list