Quasars / orange-spectroscopy

Other
52 stars 58 forks source link

[ENH] Improved the context menu display on Mac #673

Closed borondics closed 1 year ago

borondics commented 1 year ago

Previously, the context menu of OWSpectra didn't display keyboard shortcuts on Mac (Ventura) and the window edges were very close to the elements.

image

Now this is changed to the following:

image

Needs testing on Linux and Windows.

borondics commented 1 year ago

The combobox items (Axis x and Axis y, Color) are still a bit weird in OWHyper... Too much space between them. And the Color item is not the same right margin for whatever reason!

image

borondics commented 1 year ago

Should fix #547

markotoplak commented 1 year ago

The added spacing on the left makes HyperSpectra looks worse on Linux. The problem is that different platforms use different spacing to draw things so we should never hardcode it.

image

To make spacing symmetric, I recommend using box.setContentsMargins(10, 0, 10, 0) or even 5, 0, 5, 0.

Interesting that vertical spacing is so strange on Macs...

borondics commented 1 year ago

Can we hunt down the parameters and reference them dynamically? I don't know what type of spaces are added to different elements in that Menu window.

markotoplak commented 1 year ago

Can we hunt down the parameters and reference them dynamically? I don't know what type of spaces are added to different elements in that Menu window.

Maybe, but just maybe. Who knows, what we'll forget. We are abusing the menus here anyway.