diff options
author | Henner Drewes <henner.drewes@gmail.com> | 2022-10-21 10:07:45 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-11-07 14:45:05 +0100 |
commit | 801e6272dc299d4468ec094ce11b66494eb5018b (patch) | |
tree | fc32d573e0300b801d6370025684b8c4eb227bbf /vcl/source | |
parent | cfd49dc149896925c641181b8d710a32d8ebc2da (diff) |
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.tietze@documentfoundation.org>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/PriorityMergedHBox.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |