[PC-BSD Commits] r752 - pcbsd/trunk/PCInstall

svn at pcbsd.org svn at pcbsd.org
Tue Sep 18 10:30:49 PDT 2007


Author: kris
Date: 2007-09-18 10:30:48 -0700 (Tue, 18 Sep 2007)
New Revision: 752

Modified:
   pcbsd/trunk/PCInstall/main.cpp
   pcbsd/trunk/PCInstall/pcinstall.ui.h
Log:

Got the font issues finially worked out in PCInstall, Japanese & Chinese can
co-exist and live together now :)



Modified: pcbsd/trunk/PCInstall/main.cpp
===================================================================
--- pcbsd/trunk/PCInstall/main.cpp	2007-09-18 16:00:32 UTC (rev 751)
+++ pcbsd/trunk/PCInstall/main.cpp	2007-09-18 17:30:48 UTC (rev 752)
@@ -1,6 +1,7 @@
 #include <qapplication.h>
 #include <qstylefactory.h>
 #include <qfile.h>
+#include <qfont.h>
 #include <qtranslator.h>
 #include <qmessagebox.h>
 #include "pcinstall.h"
@@ -28,6 +29,20 @@
 	     
     }
 
+    // Check if we are running in chinese, and set the font to Serif
+    if ( nlang == "zh_CN" || nlang == "zh_TW" )
+    {
+      QFont f( "mingunittf", 11);
+      a.setFont( f);
+    } else if (nlang == "ja" ) {
+      QFont f( "vlgothic", 11);
+      a.setFont( f);
+    } else {
+      QFont f( "Sans Serif", 11);
+      a.setFont( f);
+    }
+
+
     QTranslator translator(0);
     translator.load( QString("PCInstall_" + nlang), "/usr/local/pcbsd/LANGS/" );
     a.installTranslator( &translator );

Modified: pcbsd/trunk/PCInstall/pcinstall.ui.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui.h	2007-09-18 16:00:32 UTC (rev 751)
+++ pcbsd/trunk/PCInstall/pcinstall.ui.h	2007-09-18 17:30:48 UTC (rev 752)
@@ -16,8 +16,8 @@
 
 void PCInstall::ProgramInit()
 {
-    QFont f( "Sans Serif", 10);
-    setFont( f);    
+    //QFont f( "Sans Serif", 10);
+    //setFont( f);    
 
     // Set the variable to regenerate the custom slices
     regenCustomSlices = 1;
@@ -367,16 +367,6 @@
 		 file.close();
 	     }
 
-       // Check if we are running in chinese, and set the font to Serif
-       if ( nlang == "zh_CN" || nlang == "zh_TW" )
-       {
-         QFont f( "Serif", 10);
-         setFont( f);    
-       } else {
-         QFont f( "Sans Serif", 10);
-         setFont( f);    
-       }
-
     }
 
 
@@ -2596,7 +2586,7 @@
    if(CheckVMware->normalExit() && CheckVMware->exitStatus() == 1 )
     {
 	QFont f( "Sans Serif", 11);
-        setFont( f );    
+        //setFont( f );    
     }
    
 }



More information about the Commits mailing list