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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 25 19:44:14 UTC 2020


 vcl/source/control/tabctrl.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 96e5121869e95a8e28788a91ce0dc480e5f10c0b
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Sat Apr 25 11:28:58 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Sat Apr 25 21:43:32 2020 +0200

    tdf#123292 notebookbar: vertical align for shortcuts toolbar
    
    Change-Id: I2f2ccee9d6c01962d5d8609ea55c0c2bca6b5cb6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92892
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 031effde2959..9d05aa450b4a 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2345,10 +2345,14 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
 
     // position the shortcutbox
     if (m_pShortcuts)
-        m_pShortcuts->SetPosPixel(Point(0, 0));
+    {
+        long nPosY = (m_nHeaderHeight - m_pShortcuts->GetSizePixel().getHeight()) / 2;
+        m_pShortcuts->SetPosPixel(Point(0, nPosY));
+    }
 
+    long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 2;
     // position the menu
-    m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, 0));
+    m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, nPosY));
 
     return true;
 }


More information about the Libreoffice-commits mailing list