diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2017-03-23 13:40:35 +0100 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2017-03-23 14:18:20 +0000 |
commit | 51efa8fb3f92de9f8c02d2cc4e3bffcaa5caee7f (patch) | |
tree | 6fb23524db36a72a1ea79cdade2c40f95e161f33 /vcl | |
parent | 6903066822900a700ccf67ae70fa171c94644a9a (diff) |
Notebookbar: move shortcuts if multiple rows of tabs
Change-Id: I8b164a34eeff13d70712a84d5621d169b6528962
Reviewed-on: https://gerrit.libreoffice.org/35588
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 753aa8996a2d..52afe6b4924f 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2487,6 +2487,12 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth ) n++; } + if( m_pShortcuts && ( it == mpTabCtrlData->maItemList.begin() ) ) + { + Point aPos(nIDX + nDX + nDX, nLineHeightAry[n-1]); + m_pShortcuts->SetPosPixel(aPos); + } + it->maRect.Left() += nIDX; it->maRect.Right() += nIDX + nDX; it->maRect.Top() = nLineHeightAry[n-1]; @@ -2505,6 +2511,14 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth ) } else { // only one line + + if( m_pShortcuts && mpTabCtrlData + && mpTabCtrlData->maItemList.begin() != mpTabCtrlData->maItemList.end() ) + { + Point aPos(mpTabCtrlData->maItemList.begin()->maRect.Right(), 0); + m_pShortcuts->SetPosPixel(aPos); + } + if(ImplGetSVData()->maNWFData.mbCenteredTabs) { int nRightSpace = nMaxWidth;//space left on the right by the tabs |