RapidCRC-Unicode icon indicating copy to clipboard operation
RapidCRC-Unicode copied to clipboard

RapidCRC doesn't remember column sizes, fails to optimize for display

Open rmenessec opened this issue 6 years ago • 4 comments

The app doesn't appear to calculate or set column sizes based on what's appropriate for the window size. As a result, the File and Info columns are frequently hidden and the SHA-1, SHA-256, and SHA-512 columns are far larger than needed to display their contents; especially when they're empty. See this attached screenshot from a Windows 10 1803 system using stock fonts and other stock metrics (100% zoom / no scaling) on a relatively typical 24" 1080p monitor:

rapidcrc-columns

I could compensate for this in part if RapidCRC remembered column sizes between sessions, but I'd really like to see automatically calculated column sizes based on window metrics. It would also help if RapidCRC displayed only necessary columns based on the contents of hash files instead of adhering to the column display toggles with absolute strictness. When not reading hash file contents, it would be nice if it were at least an option to display only the columns toggled on for calculation, instead of requiring these columns to be synced manually (if at all).

rmenessec avatar Aug 17 '18 14:08 rmenessec

RCRC calculates the column widths like this: each visible hash column gets a width of (number of hash characters * average character width), info column gets (average character width * 17), the file column gets the rest.

With job queueing enabled you can have the results of a hash file and a new calculation at the same time, so I can't really hide the columns if you open a hash file.

OV2 avatar Aug 17 '18 16:08 OV2

@OV2, understood on the job queueing.

That computed average seems to exceed the maximum necessary column width by up to 20% or so with Segoe UI. What about an option to specify the font and size? I don't know much about the Windows font subsystem; would the use of a monospace font result in a precise and accurate "average"?

rmenessec avatar Aug 18 '18 17:08 rmenessec

The problem with average character width is that you have very wide characters, like 'W', whereas hash hex values usually have lots of numbers and letters with smaller sizes. With more characters this obviously adds up. I can maybe experiment a bit and add a factor like 0.8 or so, and see that a hash with all 'A's still fits.

OV2 avatar Aug 18 '18 17:08 OV2

Since the standard Windows double-click between columns in the header works as expected, can't you trigger that somehow whenever something changes in the interface?

aaaxx avatar Aug 18 '18 21:08 aaaxx