Regarding lib/OSCAR/Tk.pm we could force in this way (see the attached
patch). BTW, it's the same font used in si_monitortk...

Cheers,
-Andrea

Bernard Li wrote:
> Hi guys:
>  
> I was talking to Stu on IRC regarding how I found that Fedora Core 5's
> default Tk font is slightly different than that of what it was on Fedora
> Core 4 and other distroes.
>  
> I decided to take screenshots of what the dialog box looks like after
> the completion of "Install OSCAR Server Packages".
>  
> Here are the files for Fedora Core 4 and Fedora Core 5 respectively:
> 
> http://www.bcgsc.ca/downloads/oscar/fc4.png
> http://www.bcgsc.ca/downloads/oscar/fc5.png
> 
> Notice that the font size for Fedora Core 5 is slightly bigger.
>  
> Stu mentioned that he didn't notice anything strange - well it could be
> because I'm using Gnome and he's using KDE.
>  
> One way I have found to get around this issue is to hardcode the font we
> use for all our Tk widgets in one common place so that we can change it
> easily and make sure that all calls that require fonts use this
> variable.  However this needs to be updated in two places - namely in
> SystemInstaller's lib/SystemInstaller/Tk/Common.pm and lib/OSCAR/Tk.pm. 
> At some point we should look into merging the two...
> 
> Cheers,
> 
> Bernard
Index: lib/OSCAR/Tk.pm
===================================================================
--- lib/OSCAR/Tk.pm	(revision 5268)
+++ lib/OSCAR/Tk.pm	(working copy)
@@ -22,7 +22,7 @@
 #                       Sean Dague <[EMAIL PROTECTED]>
 
 use strict;
-use vars qw($VERSION @EXPORT);
+use vars qw($VERSION @EXPORT $FONT);
 use Tk;
 require Tk::Dialog;
 use base qw(Exporter);
@@ -30,6 +30,8 @@
 
 $VERSION = sprintf("r%d", q$Revision$ =~ /(\d+)/);
 
+$FONT    = '-*-helvetica-bold-r-normal-*-12-120-*-*-*-*-*-*';
+
 sub yesno_window {
     my $w = shift;
     my $title = shift || "Are you sure?";
@@ -42,6 +44,7 @@
         -title => $title,
         -bitmap => 'question',
         -text => $label,
+        -font => $FONT,
         -buttons => [ 'Yes', 'No' ],
         );
     my $ans = $dialog->Show();
@@ -80,6 +83,7 @@
         -title => 'Done!',
         -bitmap => 'info',
         -text => $message,
+        -font => $FONT,
         -default_button => 'OK',
         -buttons => [ 'OK' ],
         );
@@ -97,6 +101,7 @@
         -title => 'ERROR!',
         -bitmap => 'error',
         -text => $message,
+        -font => $FONT,
         -default_button => 'OK',
         -buttons => [ 'OK' ],
         );
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to