summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-03-08 19:00:18 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-08-29 20:10:53 +0900
commitc78975eb6c16a2e6ad50db073ffc2c8af63e67f0 (patch)
tree17179c66ddeaff4a5f0e71ae90f28d638576c8e8 /vcl
parent24a274e3735f2f7274b7b105b6665853fa661c57 (diff)
Fix multiline tabs drawing of first / last tab
Use is{Left,Right}Aligned instead of is{First,Last}. In multi-line tabs, not only first/last item needs to be drawn differently, but also some middle, which is now the first in the new line now. Change-Id: I81ddde192eca794f16df98d629f47991c59732c7 Reviewed-on: https://gerrit.libreoffice.org/68945 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 86d9b85fb05d3d32fba4642e1231595341612d15)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/WidgetDefinition.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/gdi/WidgetDefinition.cxx b/vcl/source/gdi/WidgetDefinition.cxx
index 25eba80ecb13..5d316298da37 100644
--- a/vcl/source/gdi/WidgetDefinition.cxx
+++ b/vcl/source/gdi/WidgetDefinition.cxx
@@ -75,11 +75,12 @@ WidgetDefinitionPart::getStates(ControlType eType, ControlState eState,
auto const& rTabItemValue = static_cast<TabitemValue const&>(rValue);
- if (rTabItemValue.isFirst() && rTabItemValue.isLast())
+ if (rTabItemValue.isLeftAligned() && rTabItemValue.isRightAligned()
+ && rTabItemValue.isFirst() && rTabItemValue.isLast())
sExtra = "first_last";
- else if (rTabItemValue.isFirst())
+ else if (rTabItemValue.isLeftAligned() || rTabItemValue.isFirst())
sExtra = "first";
- else if (rTabItemValue.isLast())
+ else if (rTabItemValue.isRightAligned() || rTabItemValue.isLast())
sExtra = "last";
else
sExtra = "middle";