summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-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 f6aa2fdf5222..fbba48b032a3 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -52,7 +52,20 @@ SidebarChildWindow::SidebarChildWindow (
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(this->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);
this->pWindow->Show();