summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Wagner <thorsten.wagner.4@gmail.com>2017-05-01 16:36:27 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-05-22 16:09:27 +0200
commitcd71e5b97fb8042df8770470ffa75fd5227ad5e6 (patch)
treed0d50b33ef7befa77cf8315b55219c7524018a58
parentf928ed66267330a8872a97767f11b97c219e0899 (diff)
tdf#103896: Fix wrong leading and trailing tabs within dialogs on macOS
Change-Id: Ia18b530f3cfd48273ae00471e23131cae0df9eda Reviewed-on: https://gerrit.libreoffice.org/37123 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--vcl/source/control/tabctrl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index f571ea20be0f..a20282e153f0 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1185,13 +1185,13 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect
if (bDrawTabsRTL)
{
pFirstTab = mpTabCtrlData->maItemList.data();
- pLastTab = pFirstTab + mpTabCtrlData->maItemList.size();
+ pLastTab = pFirstTab + mpTabCtrlData->maItemList.size() - 1;
idx = mpTabCtrlData->maItemList.size() - 1;
}
else
{
pLastTab = mpTabCtrlData->maItemList.data();
- pFirstTab = pLastTab + mpTabCtrlData->maItemList.size();
+ pFirstTab = pLastTab + mpTabCtrlData->maItemList.size() - 1;
idx = 0;
}
@@ -1207,8 +1207,8 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect
aClipRgn.Intersect(rRect);
if (!aClipRgn.IsEmpty())
{
- ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/,
- pItem == pFirstTab);
+ ImplDrawItem(rRenderContext, pItem, aCurRect,
+ pItem == pFirstTab, pItem == pLastTab);
}
}
@@ -2693,13 +2693,13 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co
if (bDrawTabsRTL)
{
pFirstTab = mpTabCtrlData->maItemList.data();
- pLastTab = pFirstTab + mpTabCtrlData->maItemList.size();
+ pLastTab = pFirstTab + mpTabCtrlData->maItemList.size() - 1;
idx = mpTabCtrlData->maItemList.size() - 1;
}
else
{
pLastTab = mpTabCtrlData->maItemList.data();
- pFirstTab = pLastTab + mpTabCtrlData->maItemList.size();
+ pFirstTab = pLastTab + mpTabCtrlData->maItemList.size() - 1;
idx = 0;
}
@@ -2715,8 +2715,8 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co
aClipRgn.Intersect(rRect);
if (!aClipRgn.IsEmpty())
{
- ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/,
- pItem == pFirstTab);
+ ImplDrawItem(rRenderContext, pItem, aCurRect,
+ pItem == pFirstTab, pItem == pLastTab);
}
}