summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basides1.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-01-22 12:04:05 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-01-22 17:18:28 +0000
commit867af25bd8d36c7e5ef6f16c2876ac82e63648cc (patch)
tree474cf5199768fbc6ffd9ae742f15ca1423a37076 /basctl/source/basicide/basides1.cxx
parent04d4af8496c8fae5515c7f76e143310eb7098702 (diff)
tdf#96683 Move tabs in Basic IDE to an own row
So that the tab height does not depend on the scrollbar height (which is subject to the desktop theme) Change-Id: Ie2d787528152aed92c9943fe76955bf499d7d2a9 Reviewed-on: https://gerrit.libreoffice.org/21707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'basctl/source/basicide/basides1.cxx')
-rw-r--r--basctl/source/basicide/basides1.cxx23
1 files changed, 7 insertions, 16 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 7315853aefeb..3051308497fd 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1186,30 +1186,21 @@ void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
if ( GetViewFrame()->GetWindow().GetOutputSizePixel().Height() == 0 )
return;
+ Size aTabBarSize;
+ aTabBarSize.Height() = GetViewFrame()->GetWindow().GetFont().GetHeight() + 4;
+ aTabBarSize.Width() = rSize.Width();
+
Size aSz( rSize );
Size aScrollBarBoxSz( aScrollBarBox->GetSizePixel() );
aSz.Height() -= aScrollBarBoxSz.Height();
+ aSz.Height() -= aTabBarSize.Height();
Size aOutSz( aSz );
aSz.Width() -= aScrollBarBoxSz.Width();
aScrollBarBox->SetPosPixel( Point( rSize.Width() - aScrollBarBoxSz.Width(), rSize.Height() - aScrollBarBoxSz.Height() ) );
aVScrollBar->SetPosSizePixel( Point( rPos.X()+aSz.Width(), rPos.Y() ), Size( aScrollBarBoxSz.Width(), aSz.Height() ) );
- if ( bTabBarSplitted )
- {
- // SplitSize is 0 at a resize!
- long nSplitPos = pTabBar->GetSizePixel().Width();
- if ( nSplitPos > aSz.Width() )
- nSplitPos = aSz.Width();
- pTabBar->SetPosSizePixel( Point( rPos.X(), rPos.Y()+aSz.Height() ), Size( nSplitPos, aScrollBarBoxSz.Height() ) );
- long nScrlStart = rPos.X() + nSplitPos;
- aHScrollBar->SetPosSizePixel( Point( nScrlStart, rPos.Y()+aSz.Height() ), Size( aSz.Width() - nScrlStart + 1, aScrollBarBoxSz.Height() ) );
- aHScrollBar->Update();
- }
- else
- {
- aHScrollBar->SetPosSizePixel( Point( rPos.X()+ aSz.Width()/2 - 1, rPos.Y()+aSz.Height() ), Size( aSz.Width()/2 + 2, aScrollBarBoxSz.Height() ) );
- pTabBar->SetPosSizePixel( Point( rPos.X(), rPos.Y()+aSz.Height() ), Size( aSz.Width()/2, aScrollBarBoxSz.Height() ) );
- }
+ aHScrollBar->SetPosSizePixel( Point( rPos.X(), rPos.Y()+aSz.Height() ), Size( aSz.Width(), aScrollBarBoxSz.Height() ) );
+ pTabBar->SetPosSizePixel( Point( rPos.X(), rPos.Y()+aScrollBarBoxSz.Height()+aSz.Height()), aTabBarSize );
if (pLayout)
pLayout->SetPosSizePixel(rPos, dynamic_cast<DialogWindow*>(pCurWin.get()) ? aSz : aOutSz);