vcl/source/control/tabctrl.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit f21d804c1f479d3add8a6b7af697a2d9d97dde9d
Author:     Heiko Tietze <[email protected]>
AuthorDate: Mon Sep 29 15:03:27 2025 +0200
Commit:     Heiko Tietze <[email protected]>
CommitDate: Tue Sep 30 15:54:09 2025 +0200

    (Qt) Only selected tabs should cover the tab pane
    
    Change-Id: I68f9ef11ef1a60f4da9c35b3a5cdce77888b3b7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191626
    Reviewed-by: Heiko Tietze <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 1d6ffa3a1958..316890fb0639 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -883,10 +883,14 @@ void TabControl::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplTabItem co
         if (bLastInGroup)
             tiValue.mnAlignment |= TabitemFlags::LastInGroup;
 
-        tools::Rectangle aCtrlRegion( pItem->maRect );
-        aCtrlRegion.AdjustBottom(TabPaneValue::m_nOverlap);
-        bNativeOK = rRenderContext.DrawNativeControl(ControlType::TabItem, 
ControlPart::Entire,
-                                                     aCtrlRegion, nState, 
tiValue, OUString() );
+        tools::Rectangle aCtrlRegion(pItem->maRect);
+        // overlap the bottom line to visually merge tabitem and tabpane
+        if (nState & ControlState::SELECTED)
+            aCtrlRegion.AdjustBottom(TabPaneValue::m_nOverlap);
+
+        bNativeOK
+            = rRenderContext.DrawNativeControl(ControlType::TabItem, 
ControlPart::Entire,
+                                               aCtrlRegion, nState, tiValue, 
OUString());
     }
 
     if (!bNativeOK)

Reply via email to