Created attachment 171171 [details] Views of normal and changed toolbar Steps to reproduce: 1) Use user interface Groupedbar Compact 2) Add table So far, toolbar is still normal (see libreoffice_focus_page.png) 3) Click anywhere in the table Toolbar changes (see libreoffice_focus_table.png) 4) Click outside table Toolbar stays changed First time clicking in the table might change the Groupedbar Compact to context (table), but only once. Might have relation to https://bugs.documentfoundation.org/show_bug.cgi?id=126632
confirm in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4677345e3695bac158bb04048b4d5c608ed764b4 CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL
*** Bug 141486 has been marked as a duplicate of this bug. ***
I reproduce the same behaviour. However, after step 3, I noticed that the groupedbar is properly refreshed when I change the focus to an other window (other application) and change it back to the Writer window. I don't need to move the cursor outside the table. Version: 7.2.4.1 / LibreOffice Community Build ID: b8e68b5bf61ce56d972a163ea31a18aecdcd64cd CPU threads: 4; OS: Linux 4.9; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.utf8); UI: fr-FR Calc: threaded
Created attachment 183038 [details] Simple patch to fix the issue In PriorityMergedHBox::Resize() the notebook bar groups are hidden or shown depending on the available width. If at least one group is hidden, the drop down button is shown. When changing the context (e.g. from text to table), resize is called multiple times with 0 width or other temporary (small) width values, so that all the groups are hidden and only the button is shown. Therefore the control reports a height of just the button height and not the actual notebook bar height. So the the bottom rows get cut off. During the next resize, as groups are already visible, the correct height is reported, and the full height is restored, all controls are shown. Setting the the size twice in PriorityHBox::SetSizeFromParent() therefore fixes the problem.
Created attachment 183039 [details] 2nd patch: trying to get closer to the root of the problem Instead of resizing the control twice, it also helps to filter out the resize operations with the temporary widths. So the repetitive showing and hiding of all the groups is avoided. The TEMP_WIDTH of 200 or 206 is assigned in ContextVBox::SetContext().
(In reply to Henner Drewes from comment #5) > Created attachment 183039 [details] > 2nd patch: trying to get closer to the root of the problem > > Instead of resizing the control twice, it also helps to filter out the > resize operations with the temporary widths. > > So the repetitive showing and hiding of all the groups is avoided. > > The TEMP_WIDTH of 200 or 206 is assigned in ContextVBox::SetContext(). Could you please propose your patches to gerrit https://wiki.documentfoundation.org/Development/GetInvolved
I proposed to gerrit https://gerrit.libreoffice.org/c/core/+/141612/1
Henner Drewes committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/801e6272dc299d4468ec094ce11b66494eb5018b tdf#141684 fix disappearance of icons in Groupedbar and Groupedbar compact UI It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bcf9e47791d5b3e1d6a75c73f3b8c9940abda8eb tdf#153078: Revert "tdf#141684 fix disappearance of icons in Groupedbar and Groupedbar compact UI" It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/1f8d118dd0ea63a73592a712efb364c343c71082 tdf#153078: Revert "tdf#141684 fix disappearance of icons in Groupedbar and Groupedbar compact UI" It will be available in 7.5.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
After some additional digging: My first patch attached here seems to be more reliable https://bugs.documentfoundation.org/attachment.cgi?id=183038 see explanation https://bugs.documentfoundation.org/show_bug.cgi?id=141684#c4 I still consider it a hack, but apparently it does its job. I tried a couple of other things. But for a better solution a number of things in the logic of showing/hiding child controls during context change and resize, and reporting correct required sizes should be changed. But I am afraid that I lack a deeper knowledge of the code to do more.
Szymon, what do you think?
This one should be fixed after I fixed https://bugs.documentfoundation.org/show_bug.cgi?id=147740 Seems to be duplicate.
sorry, haven't read the last comment :) My patch measures size (height) of the biggest element we will need to show. It prevents us not only from this bug but also jumping/resizing height of a group bar when we resize the window. I think it is the correct way to solve the bug as it always reports the same height so there is no just "luck" that it works
(In reply to Szymon Kłos from comment #13) > This one should be fixed I tried to confirm, but couldn't reproduce the problem in 7.6 oldest bisect (before Szymon's fix). It should be fixed in 7.5.1 and 7.4.6. Can someone check and close this bug report if it was already resolved? If not, it might be a duplicate of bug 140557.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2cdb48eee93a3a93074184c5c8a82e571fb0bd04 tdf#141684 tdf#147740 notebookbar: fix disappearing icons in groupbar #2 It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #16) > tdf#141684 tdf#147740 notebookbar: fix disappearing icons in groupbar #2 This patch does not intentionally fix this bug report. I assume it already was fixed, and that my code just cleans up the real fix.