vcl/source/control/imivctl.hxx  |    7 -------
 vcl/source/control/imivctl1.cxx |   31 -------------------------------
 2 files changed, 38 deletions(-)

New commits:
commit c8234947b60d320565fe0ca843e095858eb9975a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Jul 23 11:00:42 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jul 24 05:44:55 2024 +0200

    tdf#161501 icon choice ctrl: Drop debug-only mode switch feature
    
    Drop code that allows switching the text mode of
    the currently selected tab item in a vertical tab
    bar using Shift+F10 or Ctrl+F10, which is only
    available in dbgutil builds, and was therefore
    likely meant to be used for debugging purposes
    only.
    
    As related code will be changed in a follow-up
    commit, this would have to be adjusted to keep
    it working. Instead of spending time on that,
    just drop it. Testing how using another mode is still
    possible e.g. by locally changing the value assigned
    to `SvxIconChoiceCtrlEntry::eTextMode` in the
    `SvxIconChoiceCtrlEntry` ctor instead.
    
    Change-Id: If309f84fcd9a99337bc5896ce5c3238333427da5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170892
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 6eed1911ce6e..505f32d3e960 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -277,12 +277,6 @@ public:
                             bool bInScrollBarEvent=false
                         );
 
-#ifdef DBG_UTIL
-    void                SetEntryTextMode(
-                            SvxIconChoiceCtrlTextMode,
-                            SvxIconChoiceCtrlEntry& rEntry
-                        );
-#endif
     size_t              GetEntryCount() const { return maEntries.size(); }
     SvxIconChoiceCtrlEntry* GetEntry( size_t nPos )
                             {
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index a61e6cd357ab..eb1b576e044f 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -623,22 +623,6 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& 
rKEvt )
 
         case KEY_SPACE:
             break;
-
-#ifdef DBG_UTIL
-        case KEY_F10:
-            if( rKEvt.GetKeyCode().IsShift() )
-            {
-                if( pCursor )
-                    SetEntryTextMode(SvxIconChoiceCtrlTextMode::Full, 
*pCursor);
-            }
-            if( rKEvt.GetKeyCode().IsMod1() )
-            {
-                if( pCursor )
-                    SetEntryTextMode(SvxIconChoiceCtrlTextMode::Short, 
*pCursor);
-            }
-            break;
-#endif
-
         case KEY_ADD:
         case KEY_DIVIDE :
         case KEY_A:
@@ -1715,19 +1699,6 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, 
DocRectChangedHdl, Timer *, void)
     aDocRectChangedIdle.Stop();
 }
 
-#ifdef DBG_UTIL
-void SvxIconChoiceCtrl_Impl::SetEntryTextMode(SvxIconChoiceCtrlTextMode eMode, 
SvxIconChoiceCtrlEntry& rEntry)
-{
-    if (rEntry.eTextMode != eMode)
-    {
-        rEntry.eTextMode = eMode;
-        InvalidateEntry(&rEntry );
-        pView->Invalidate(GetEntryBoundRect(&rEntry));
-        AdjustVirtSize(rEntry.aRect);
-    }
-}
-#endif
-
 // Draw my own focusrect, because the focusrect of the outputdevice has got 
the inverted color
 // of the background. But what will we see, if the backgroundcolor is gray ? - 
We will see
 // a gray focusrect on a gray background !!!
commit efd060187aadb768f12a5b5e510db9e6e7687e23
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Jul 22 11:39:48 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jul 24 05:44:42 2024 +0200

    tdf#161501 icon choice ctrl: Drop extra space between items
    
    Drop the extra spacing between vertical tab bar items, which
    became quite noticeable as extra white area between the otherwise
    light-grey entries when using the Breeze (light) style and the
    kf5 VCL plugin for the "Insert" -> "Hyperlink" dialog now that
    the tab items are drawn natively since
    
        Change-Id: Ie0c8ba1b56f6bb76ece6761253b93a109bb3a3f4
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Mon Jul 22 11:05:30 2024 +0200
    
            tdf#161501 icon choice ctrl: Draw whole entry natively
    
    and which is also more visible for non-natively drawn items
    since
    
        Change-Id: I578755a8a82ea811765b2e0dc3815fb47f67863c
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Tue Jul 23 10:41:16 2024 +0200
    
            tdf#161501 icon choice ctrl: Draw selection within item bounds
    
    With this in place, the extra margin between entries
    in tab items with icons in the "Insert" -> "Hyperlink"
    dialog in Writer is gone for both, the gen VCL plugin
    and the kf5 one (tested with the Breeze style).
    
    For the gen VCL plugin, there's still a small gap between
    text-only items (e.g. in the "Format" -> "Page Style" dialog
    which has a different cause and will be addressed in a separate
    commit.
    
    Change-Id: Iac34098ef8d0f90f1ac0844df63839a6a99b83a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170850
    Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index d02b0299cd6e..6eed1911ce6e 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -64,7 +64,6 @@ namespace o3tl {
 #define TBOFFS_WINBORDER            4
 // for the bounding rectangle
 #define LROFFS_BOUND                2
-#define TBOFFS_BOUND                2
 // distance icon to text
 #define HOR_DIST_BMP_STRING         3
 #define VER_DIST_BMP_STRING         3
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 8ecf9cf16656..a61e6cd357ab 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -1557,7 +1557,6 @@ Size SvxIconChoiceCtrl_Impl::GetMinGrid() const
 
     Size aMinSize( aImageSize );
     aMinSize.AdjustWidth(2 * LROFFS_BOUND );
-    aMinSize.AdjustHeight(TBOFFS_BOUND );  // single offset is enough (FileDlg)
     if( nWinBits & WB_ICON )
     {
         aMinSize.AdjustHeight(VER_DIST_BMP_STRING );
@@ -1636,7 +1635,6 @@ void SvxIconChoiceCtrl_Impl::SetDefaultTextSize()
     tools::Long nDY = nGridDY;
     nDY -= aImageSize.Height();
     nDY -= VER_DIST_BMP_STRING;
-    nDY -= 2 * TBOFFS_BOUND;
     if (nDY <= 0)
         nDY = 2;
 

Reply via email to