summaryrefslogtreecommitdiff
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-03-11 12:12:59 +0100
commit4156d3b9330d0fd9260593b0dca707b3c8b69273 (patch)
tree59ded29e3f4eb10516cfbeed429128f14c9366ae
parenta1750a87bc2d9a908af3cedc15dd78b32212de8c (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)
-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";