vcl/source/gdi/WidgetDefinition.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 86d9b85fb05d3d32fba4642e1231595341612d15
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Fri Mar 8 19:00:18 2019 +0100
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Sat Mar 9 15:15:40 2019 +0100

    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 <qui...@gmail.com>

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";
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to