summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-11-22 16:56:45 +0100
committerJan Holesovsky <kendy@collabora.com>2014-11-22 20:14:15 +0100
commit4e8df25adcc930657eb35cdc527bf8d751fc72e7 (patch)
tree4ef6794c7ae407faca6a8bde1f1f70016cd7a9a0
parent1dbaaa73fe3528de36f19142a2950ec0661aa0e7 (diff)
Default to collapsed sidebars everywhere but in Impress.
Change-Id: I2fe092189c922ddf36efc8dd8d0fba14f91fc0b0
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index c85e9483bee5..927395c5fd8f 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -49,7 +49,20 @@ SidebarChildWindow::SidebarChildWindow (
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pWindow);
if (pDockingParent != NULL)
+ {
+ if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "simpress")
+ {
+ // When this is the first start (never had the sidebar open yet),
+ // default to non-expanded sidebars in Writer, Calc, and Draw
+ //
+ // HACK: unfortunately I haven't found a clean solution to do
+ // this, so do it this way:
+ //
+ pDockingParent->SetSizePixel(Size(TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor(),
+ pDockingParent->GetSizePixel().Height()));
+ }
pDockingParent->Initialize(pInfo);
+ }
SetHideNotDelete(true);
pWindow->Show();