NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
49.62k stars 5.7k forks source link

Common Control Styling for Icon Buttons #5546

Open Aurumaker72 opened 1 year ago

Aurumaker72 commented 1 year ago

Is your feature request related to a problem? Please describe. Icon Buttons use the generic "raised frame" graphics on Windows platforms.

Regular Push Buttons utilize the native common control visual style, which looks vastly different from the generic raised frame visual.

This is jarring, as Icon Buttons and Push Buttons often appear in proximity.

Describe the solution you'd like

Icon Buttons should utilize the current's visual style raised frame graphics.

Mockup

Here's a mockup (including a before and after) of the suggested change.

image image

dragonmacher commented 1 year ago

This is a reasonable request. We should revisit the need for custom button borders in Ghidra.

Aurumaker72 commented 1 year ago

Any idea about where the Icon Button creation and styling code for Win32 is located? I'd like to take a look.

dragonmacher commented 1 year ago

The code for styling these buttons is inside of EmptyBorderButton. When this class was created, it was done to provide a uniform look to the tool's buttons, specifically on the toolbar. Iirc, the buttons were made to match what Windows XP was doing at the time.

The question is whether we should just let the native Look and Feel decide how the buttons should look? Or, should we strike a compromise for toolbar buttons, where they keep the empty border behavior, but update which border is used when the user hovers? Allowing the LaF to decide how the button looks is the easiest, but may ruin the highly attractive Ghidra UI aesthetic.

Aurumaker72 commented 1 year ago

Thank you for the pointers. In my opinion, using the latest native styles makes more sense. On Windows 11, the window chrome is rounded and most controls in Ghidra have the latest visuals anyway. In my opinion, letting specific parts of the UI "rot" and create a visual inconsistency is a bad call.

Aurumaker72 commented 1 year ago

image

I'm working on it.

dev747368 commented 1 year ago

highly attractive Ghidra UI aesthetic.

That is some dry humor. :rofl:

Aurumaker72 commented 1 month ago

Hi, just checking in - is this backlogged internally or are contributions pertaining to this still accepted?

dragonmacher commented 1 month ago

We have not put any cycles into this recently. A contribution pull-request would be helpful in as much as it could clarify desire and intention. This task is more challenging than it may seem due to having to ensure the solution works and looks relatively good for each look and feel.