vcl/source/control/PriorityMergedHBox.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 801e6272dc299d4468ec094ce11b66494eb5018b
Author:     Henner Drewes <henner.dre...@gmail.com>
AuthorDate: Fri Oct 21 10:07:45 2022 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Mon Nov 7 14:45:05 2022 +0100

    tdf#141684 fix disappearance of icons in Groupedbar and Groupedbar compact 
UI
    
    Change-Id: I3f0e5edd196420c8c51b19cd1ceee8caba7f7fd9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141612
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/vcl/source/control/PriorityMergedHBox.cxx 
b/vcl/source/control/PriorityMergedHBox.cxx
index 75a26daa52c1..c5e21c7c002c 100644
--- a/vcl/source/control/PriorityMergedHBox.cxx
+++ b/vcl/source/control/PriorityMergedHBox.cxx
@@ -27,6 +27,7 @@
 
 #define DUMMY_WIDTH 50
 #define BUTTON_WIDTH 30
+#define TEMP_WIDTH 200
 
 /*
 * PriorityMergedHBox is a VclHBox which hides its own children if there is no 
sufficient space.
@@ -57,6 +58,9 @@ void PriorityMergedHBox::Resize()
     }
 
     tools::Long nWidth = GetSizePixel().Width();
+    if (nWidth <= 1 || nWidth == TEMP_WIDTH || nWidth == TEMP_WIDTH + 6)
+        return VclHBox::Resize();
+
     tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + 
BUTTON_WIDTH;
 
     // Hide lower priority controls
@@ -155,7 +159,7 @@ Size PriorityMergedHBox::calculateRequisition() const
         accumulateMaxes(aChildSize, aSize);
     }
 
-    setPrimaryDimension(aSize, 200);
+    setPrimaryDimension(aSize, TEMP_WIDTH);
     return finalizeMaxes(aSize, nVisibleChildren);
 }
 

Reply via email to