|
Post by George on Oct 3, 2022 8:31:14 GMT -5
Robrt: Certainly possible, but tricky as the sizes of the boxes would have to be calculated based on the longest string directed to that box in the chosen font. The custom layout etc. of the SB is already a bit convoluted. But this IS an area where something needs to be done.
George
|
|
|
Post by George on Oct 3, 2022 12:53:54 GMT -5
Robert: The main problem is a choice made back when SPFLite migrated from a Command line text syle window, to a proper Windows dialog. PB provides two unit types to dimension dialogs and their controls - Pixels and Dialog units, I chose Pixels as everything I was migrating was previously in Pixels.
As you're finding out Pixels, and hi-res displays don't get along, there is no simple easy rescaling available. SPFLite does some minor attempt, but it's not enough.
George
|
|
|
Post by George on Oct 3, 2022 14:40:54 GMT -5
The box sizes of the SB are specified in pixels by absolute numbers from left to right.
The display routine for SB data uses the same font for everything. The problem is that there is no API to return a font given a string of text and a dialog size. It works the other way, you point the API at a dialog control, which has a font assigned, and it returns how much space it will take. So it's an iterative loop to find the optimum font size.
And if could be done at display time, you'd end up with different font sizes in the same box depending on the actual text data. And every box would have different font sizes. It would be a visual mess.
Picture the difference between "BNDS: MAX" and "BNDS: 350 to 1500" where 1 is twice the width of the other. If the text was small enough, it would even pick a huge font and blow the vertical dimensions of the box. It's simply not easy.
As I said, non-trivial.
George
|
|
|
Post by Stefan on Oct 4, 2022 4:29:14 GMT -5
I'm not sure how "high" the resolution is on your new laptp (I have laptop-envy now!). I shy away from very hi-res, because stuff gets so small I can't read it properly any more and I refuse to change display to 125% or such like as many apps can't seem to handle that properly.
I just wanted to ask if this is perhaps, at least in part, a contrast issue? I found the Status Line almost unreadable until I switched to White text on a Dark-blue background. I appreciate there's higher res than mine available, but I can't test that. I run with 1600 x 900 resolution on the Laptop and 1920 x 1080 on the external monitor. Both show SB very cripsly.
|
|
|
Post by George on Oct 4, 2022 9:15:02 GMT -5
Right now, there's a simple routine that examines the DPI of the system's desktop, and adjusts all the default font sizes of all the non-edit-data fonts(SB, Tab headers etc.) accordingly based on the old 'normal' of 96 DPI. It's not perfect, but is better than nothing.
SUB FontAdjustSizes() '----- Adjust fonts if high DPI used LOCAL hDC, LPIy, factor AS LONG hDC = GetDC(%HWND_DESKTOP) ' Get Desktop handle LPIy = GetDeviceCaps(hDC, %LOGPIXELSY) ' Get pixels / inch vertically ReleaseDC %HWND_DESKTOP, hDC ' Free hDC factor = (LPiY/96) * 100 ' Calc % font size gFontScale = factor / 100 ' Create a factor out of it '--------------------------------------------------------------+ ' Recreate the Fonts | '--------------------------------------------------------------+ FONT NEW "Arial", 10 / gFontScale, 1, 1, 1 TO gBoldFont ' Build font for our Preferences Dialog FONT NEW "Courier New", 10 / gFontScale, 1, 1, 1 TO gFixedFont ' Build font for our Preferences Dialog FONT NEW "Tahoma", 10 / gFontScale, 0, 1, 1 TO gSBFont ' Build font for the Status Bar FONT NEW "Tahoma", 10 / gFontScale, 1, 1, 1 TO gSBFontB ' Build font for the Status Bar FONT NEW "Tahoma", 12 / gFontScale, 0, 1, 1 TO gHlpFont ' Build font for the Help Dialog FONT NEW "Tahoma", 12 / gFontScale, 1, 1, 1 TO gHlpFontB ' Build font for the Help Dialog END SUB
|
|
|
Post by George on Oct 4, 2022 13:58:58 GMT -5
Not sure what you mean by "including it in the list" Those shown are the ones actually used within SPFLite. I've never chosen Calibri for any of them.
Now if the question is "Why not use Calibri instead of xxxx", then that's a valid question. Those choices were made many years ago, probably before Calibri even came along. But then we get into - Calibri is better than Tahoma whish is better than Courier which is ....... Who's to say which is best?
George
|
|
|
Post by George on Oct 17, 2022 13:42:45 GMT -5
OK, there is now an option on the Options -> Screen to provide a Status Bar / Tab Title Scale factor, the default is 1.0, smaller values shrink the font, larger values increase it. The size of SB boxes is now (hopefully) based on the ultimate font size used, so we shouldn't see truncated data displayed.
I need feedback from the next beta as everyone runs with different monitors, different Windows text file sizes etc. so this support may need some additional tweaking.
George
|
|
|
Post by George on Oct 17, 2022 14:34:34 GMT -5
Hopefully, truncation should be gone, the box sizes are calculated based on the final scaled font size.
George
|
|