BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.02k stars 446 forks source link

[Manager] Project icon size in simple view is inconsistent between platforms. #4789

Open Vulpine05 opened 2 years ago

Vulpine05 commented 2 years ago

Describe the bug As we were comparing how the tasks pull-down looked in different platforms, I noticed the icon in the projects pull-down was not consistent.

For Linux: image

For Windows: image

For Mac: image

Credit to @RichardHaselgrove for the Windows and Linux screenshots, @CharlieFenton for the Mac screenshot.

The icon in the Linux pull-down is clipped. For Mac, it is larger than the pull-down (but not clipped). Windows appears just right.

Steps To Reproduce N/A

Expected behavior At the very least, the icons should fit the pull-down properly.

Screenshots See above.

System Information

Additional context N/A

CharlieFenton commented 2 years ago

For Mac, it is larger than the pull-down (but not clipped).

At the risk of too much information:

I spent many hours trying to get the projects pull-down menu on the Mac to be tall enough when collapsed to hold the icon without clipping it, but was not able to do so with a native control. My goal when I redesigned the Simple View was to use only native controls, at least on the Mac and Windows. This is to ensure that BONC is accessible to users with disabilities, (is Americans with Disabilities Act compliant) because screen readers and other assistive software automatically work correctly for native controls. ADA compliance is important not only because it is the right thing to do, but also because the development was partly funded by the National Science Foundation, and ADA compliance is required for government funded software.

The Windows version uses a Combo Box, which is a native control on Windows. Unfortunately, the Mac dos not have a native control corresponding to Windows' Combo Box, so the wxWidgets implementation of Combo Box for the Mac simulates the Windows Combo Box using non-native code. I was forced to create an ugly workaround hack: a Mac-BOINC-specific approach clientgui/mac/MacBitmapComboBox.cpp which uses the Mac's native pull-down menu (via wxChoice) but draws the selected icon over it when the menu is collapsed. Without that, the icon would be clipped on the Mac.

AenBleidd commented 2 years ago

@CharlieFenton, if the OSX version has such a huge issues with Combobox, maybe it's reasonable to change the design of this window a little bit? For example, do not show Project icon in Combobox list but instead put this icon for the selected Project at the left of the Combobox (for all OSs)?

CharlieFenton commented 2 years ago

if the OSX version has such a huge issues with Combobox, maybe it's reasonable to change the design of this window a little bit?

IMO, as they say, "if it ain't broke, don't fix it." Actually, that change would also eliminate the project icons showing in the menu when it is popped up.

It works fine as is (except for the slight clipping on Linux.) Perhaps Linux could use the same code as the Mac to fix it. I believe the only change needed to have Linux use the same code as Mac would be to change line 44 of _clientgui/sgPanelBase.h from this: #ifdef __WXMAC__ to this: #ifndef __WXMSW__

You might want to test that on Linux.

AenBleidd commented 2 years ago

Actually, that change would also eliminate the project icons showing in the menu when it is popped up.

I know, but for me it's fine. At least better not to have them there than just put an icon on top of Combobox, but as you wish.

Perhaps Linux could use the same code as the Mac to fix it.

I'll check it. Maybe it require just some additional sizing. In any case, I'll take a look.