HUG MSGDIALOG ignores BASEXFTDPI
Mar 10, 2011 2:50:35 GMT 1
Post by barryk on Mar 10, 2011 2:50:35 GMT 1
This seems like a bug. In the Puppy Forum we are test 'proxy-setup', to which I have added internationalizartion and dpi size adjustment:
murga-linux.com/puppy/viewtopic.php?p=502836#502836
At the start of the program:
Puppies deault xft dpi is 78. I tested with Xft.dpi in ~/.Xresources set to 96 and found that the main window drew bigger on the screen so all the text continued to fit very nicely.
However, not so for MSGDIALOG:
...these boxes remain the same size, so the text is truncated.
Note also, I specified fixed sizes for the fonts, so:
...with the reasoning that if a user has a GTK theme with different size default fonts then by using FONT I will ensure that proxy-setup window always remains looking the same.
However, it seems that I cannot apply FONT to MSGDIALOG
...so, I wonder if it might be possible for a global font specification, say "Sans 12", that will override the GTK default and apply to all widgets.
Peter, I am keeping you busy
Regards,
Barry
murga-linux.com/puppy/viewtopic.php?p=502836#502836
At the start of the program:
OPTION INTERNATIONAL TRUE
INCLUDE "hug.bac"
REM fix window font layout regardless of dpi...
REM 78 is the xft dpi when I designed the layout...
HUGOPTIONS("BASEXFTDPI 78")
font_sans$="DejaVu Sans 12"
font_mono$="Monospace 13"
Puppies deault xft dpi is 78. I tested with Xft.dpi in ~/.Xresources set to 96 and found that the main window drew bigger on the screen so all the text continued to fit very nicely.
However, not so for MSGDIALOG:
REM define some info boxes...
err_dlg1=MSGDIALOG(INTL("Sorry, the password entries are not the same"),400,100,3,2)
yes_dlg1=MSGDIALOG(INTL("Great, you have modified the proxy server settings. Note, you can see the result in files /etc/profile.d/http_profile and /etc/profile.d/ftp_profile. However, MOST IMPORTANT, you must reboot for this to take effect"),500,160,0,1)
no_dlg1=MSGDIALOG(INTL("You have chosen NOT to use a proxy server. Note, if you previously did have a proxy server enabled, you MUST REBOOT for the change to take effect"),500,140,0,1)
...these boxes remain the same size, so the text is truncated.
Note also, I specified fixed sizes for the fonts, so:
label_pass=MARK(INTL("Password:"),80,20)
ATTACH(mainwin,label_pass,10,190)
FONT(label_pass,font_sans$)
password1=PASSWORD(150,20)
ATTACH(mainwin,password1,100,190)
TEXT(password1,password$)
FONT(password1,font_mono$)
...with the reasoning that if a user has a GTK theme with different size default fonts then by using FONT I will ensure that proxy-setup window always remains looking the same.
However, it seems that I cannot apply FONT to MSGDIALOG
...so, I wonder if it might be possible for a global font specification, say "Sans 12", that will override the GTK default and apply to all widgets.
Peter, I am keeping you busy
Regards,
Barry