I try to give the user a 'clean and simple' interface by hiding some elements. Only a small arrow denotes that he can expand some part of the main menu bar. When all is closed it looks like this:
When you open all it looks like this:
Each arrow is a SpeedButton thats sits on the left side of a panel. By clicking on the button the Width is toggled between the width of the Speedbutton (closed) and the width of the panel at design time (open). The width of the panel at designtime is stored as a constant. The procedure show_hide_controls handles this:
procedure TCompose_Main.show_hide_controls (key: string; Button: TSpeedButton; Panel: TPanel; width: Int32);
begin
if GPA.iKey [key] = 1
then Panel.Width := width // show panel, set panel to design width
else Panel.Width := Button.Width; // hide panel, set with to button width
Button.Glyph.Assign (nil);
Images_Left_Right.GetBitmap (GPA.iKey [key], Button.Glyph);
end; // show_hide_controls //
This routine is called as follows:
show_hide_controls ('Show Play Controls', // index to panel to show/hide
Enlarge_Play, // Speedbutton requesting the enlargement/hide
Panel_Play, // Panel to show/hide
cPlayWidth); // Width of panel when shown
Now several users report that part of the panel is hidden, like:
It seems that the operating system (Windows 7) plays some tricks with scaling. I'm not able to duplicate this error. Does anyone understand what is happening here? And is there a neat way to program against this in a settings independent way?
Update As GDF rightly pointed out in his answer it has to do with the scaling of the fonts (control panel > Display). This behaves somewhat weird on my machine. Changing it to 150% has a minor impact while changing it to 125% has a major impact. As you might have guessed I tested the first and not the second scaling. Only when a user reported that scaling back from 125% to 100% I could replicate his error on my machine.
I could not find a relation between fonts and the troubles I have as was suggested by several respendents. My system is still suffering from all the tests I did with Courier (not new), Segoe UI, Tahoma and MS Sans Serif :-D. Maybe indirectly because the controls are probably resized to accomodate the text.
How to handle this? I don't know, I'll start experimenting and will let you know if I find something.
Thanks to you all for your help!
If your problem is what I believe, you just stated the answer. Windows 7 plays with scaling certain fonts. When you install Win7 on a PC it checks the size of your monitor and makes the "default" scale setting either 100% or 125% depending on your monitor size. The problem is that at this same time it installs font files onto the computer. It uses a different font file for the different "default" for some of the fonts.
My guess is your app is using MS Sans Serif... this is one of the fonts that gets different font file installs depending on what scale Win7 is using as the (default).
To verify this have your users tell you want scale is set as the default, you can view this by right clicking the desktop and selecting "personalize" then "Display" at the bottom left.
The following link shows you how to change the in-use-font file back to the original http://www.rlvision.com/misc/windows_7_font_bug.asp
However, I would make an attempt to get off of this font and update the layout elements to work as desired on Win7 as well as past OSes
This is what I think you are dealing with given the limited amount of information you have provided...
Update Since you reminded me when you mentioned the different looks between 125% v 150%. I just wanted to make sure you were aware that the two different MS Sans Serif files looks better at different scales. One of the font files looks great at 100% and 150% but horrible at 125%. The other font file looks great at 125%, but horrible at 100 and 150%.
I don't quite remember which font file is which, but I know the 2 culprits are 1) SSERIFF.FON 2) SSERIFE.FON
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With