summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-12-08 11:50:28 -0500
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-26 15:29:47 +0200
commiteef4898f463c552a1e378e7ca7426fbec91d6873 (patch)
tree3abac6136ae9b8cef8d8c55e2cbcc224b264d87b /sfx2
parentb01f4eb13e15d5149379561e9608bed5d670271b (diff)
sfx: LOK: no sidebar tabbar
Change-Id: I210df42fec4404ed9629c9b1c24c78b680212214 Reviewed-on: https://gerrit.libreoffice.org/73517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index b2094e04631b..7261b12eeb82 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -340,7 +340,7 @@ void SidebarController::NotifyResize()
}
vcl::Window* pParentWindow = mpTabBar->GetParent();
- sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
+ const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
const sal_Int32 nWidth (pParentWindow->GetSizePixel().Width());
const sal_Int32 nHeight (pParentWindow->GetSizePixel().Height());
@@ -372,13 +372,17 @@ void SidebarController::NotifyResize()
else // attach the Sidebar towards the right-side of screen
{
nDeckX = 0;
- nTabX = nWidth-nTabBarDefaultWidth;
+ nTabX = nWidth - nTabBarDefaultWidth;
}
// Place the deck first.
if (bIsDeckVisible)
{
- mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);
+ // No TabBar in LOK.
+ if (comphelper::LibreOfficeKit::isActive())
+ mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, nHeight);
+ else
+ mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);
mpCurrentDeck->Show();
mpCurrentDeck->RequestLayout();
}
@@ -387,8 +391,8 @@ void SidebarController::NotifyResize()
// Now place the tab bar.
mpTabBar->setPosSizePixel(nTabX, 0, nTabBarDefaultWidth, nHeight);
- mpTabBar->Show();
-
+ if (!comphelper::LibreOfficeKit::isActive())
+ mpTabBar->Show(); // Don't show TabBar in LOK.
}
// Determine if the closer of the deck can be shown.