Bug 152157 - Update Available icon (on menu bar) messes up ability to work with multiple Calc windows
Summary: Update Available icon (on menu bar) messes up ability to work with multiple C...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Main-Menu Icon-Themes-Code
  Show dependency treegraph
 
Reported: 2022-11-21 15:11 UTC by Gary Jacobson
Modified: 2022-11-24 20:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Unfocused Calc window (68.15 KB, image/png)
2022-11-22 08:55 UTC, Gary Jacobson
Details
Focused Calc window (65.72 KB, image/png)
2022-11-22 08:56 UTC, Gary Jacobson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Jacobson 2022-11-21 15:11:40 UTC
The Update Available icon appears at the top right of the currently selected window, and disappears when the window loses focus. When it appears/disappears, it changes the height of the menu bar which makes everything else move slightly.

If you have 2 Calc windows side by side, and are using the mouse to click between them, this has the effect of making you click on the wrong cell. If you attempt to click somewhere in the top half of a particular cell, it focuses the window, the Update Available icon appears and shifts everything down, and only then does it apply your click to the cell that is now under your mouse, which is not the one you tried to click.

Possible solutions:
- Decrease height of icon
- Increase height of menu bar
- Show icon on every window, not just the focused one
Comment 1 V Stuart Foote 2022-11-21 19:06:49 UTC
The update icon is written to the 'InfoBar', used for many alerts and classifications. So don't think we'd want to make any changes there.

Instead, since the update notification is not overly functional, IIUC you can disable that notification by unchecking the check for updates feature.

Tools -> Options -> Online Update uncheck the 'Check for updates automatically'

You can then run it manually when more convenient.  Also, since you are on 7.4.0.3  recent auto notifying of the update at 7.4.2 is expected.

IMHO => NAB
Comment 2 Heiko Tietze 2022-11-22 08:26:02 UTC
On Linux with version 5.2 I get an icon with the same size as the close button right of it. Looking into updatecheck.cxx and co it seems to be a stock icon.

Do you agree with Stuart's suggestion to just disable the check, Gary? Otherwise please add some details about the system and maybe a screen shot.
Comment 3 Gary Jacobson 2022-11-22 08:55:37 UTC
Created attachment 183715 [details]
Unfocused Calc window
Comment 4 Gary Jacobson 2022-11-22 08:56:05 UTC
Created attachment 183716 [details]
Focused Calc window
Comment 5 Gary Jacobson 2022-11-22 08:56:40 UTC
Personally I would think it should be fixed, since it occurs with default settings, and it is not obvious what is happening so people wouldn't know how to work around it. Unless there is something peculiar to my system causing the problem.

I am using Windows 10 with 2 monitors, one is 3840x2160 with 200% scaling, the other is 1920x1080 with no scaling. The problem occurs on either monitor.
Comment 6 Heiko Tietze 2022-11-22 10:08:31 UTC
Rizal, do you know out of the blue what icon this is?
Comment 7 Rizal Muttaqin 2022-11-22 11:03:08 UTC
(In reply to Heiko Tietze from comment #6)
> Rizal, do you know out of the blue what icon this is?

/icon-themes/<icon-theme-name>/extensions/res/update/ui/onlineupdate_16.<png;svg>
/icon-themes/<icon-theme-name>/extensions/res/update/ui/onlineupdate_26.<png;svg>
Comment 8 Heiko Tietze 2022-11-22 12:05:24 UTC
So the issue is that large icons must not be used on the menu bar. Would it be enough to just delete the 26px variant/s, Caolan? I mean do we fall back to 16px?
Comment 9 Caolán McNamara 2022-11-22 15:32:16 UTC
I think it is taking the onlineupdate_16.<png;svg> file and the menu is 19pixels high, but ImplAddButtonBorder in toolbox.cxx is adding 7pixels of height to the image to give a 23px high result so the menubar grows/shrinks the diff. I wonder why the 7pixels is for.
Comment 10 Heiko Tietze 2022-11-23 08:05:06 UTC
(In reply to Caolán McNamara from comment #9)
>  ImplAddButtonBorder in toolbox.cxx is adding 7pixels

And ImplDrawItem() deducts it later. Maybe to ensure a minimum size?
Comment 11 Heiko Tietze 2022-11-23 08:11:34 UTC
(In reply to Heiko Tietze from comment #10)
> Maybe to ensure a minimum size?

Or the idea was to just change the icon size but keep the button width/height.
Comment 12 Caolán McNamara 2022-11-23 20:13:07 UTC
reducing/removing the padding makes toolbars (and this thing is a little toolbar inside the menu area) in general look nasty. Making the menubar always large enough for the toolbar makes the menubar higher than it "should" be, so looks a little different to everything else on Windows. Making the icons visible on all menubars, not just the active one, sounds the most attractive solution. Albeit needs some effort.
Comment 13 Commit Notification 2022-11-24 20:34:14 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f1d5143c2f66936104f8236cc83417853d39f873

Resolves: tdf#152157 show update icon on all menubars

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.