]> git.saurik.com Git - wxWidgets.git/commitdiff
Child positioning fixes and font adjustments
authorDavid Webster <Dave.Webster@bhmi.com>
Fri, 25 Jan 2002 04:48:36 +0000 (04:48 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Fri, 25 Jan 2002 04:48:36 +0000 (04:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/button.cpp
src/os2/font.cpp
src/os2/textctrl.cpp
src/os2/utils.cpp

index ab27b61602e7abeac4957c4d9c5a100cbf6fdae5..33634d0a7a4a5792c626710399c34146a1aa0b78 100644 (file)
@@ -100,7 +100,14 @@ bool wxButton::Create(
     // Subclass again for purposes of dialog editing mode
     //
     SubclassWin(m_hWnd);
-    SetFont(*wxSMALL_FONT);
+    wxFont*                          pButtonFont = new wxFont( 8
+                                                              ,wxSWISS
+                                                              ,wxNORMAL
+                                                              ,wxNORMAL
+                                                             );
+    SetFont(*pButtonFont);
+    SetXComp(0);
+    SetYComp(0);
     SetSize( rPos.x
             ,rPos.y
             ,rSize.x
index 8023ca58c8dc2147b2e7bdfbdb110e94c9b559a5..c1839db1ca66c6da98c592b64c6cf92373e28954 100644 (file)
@@ -108,8 +108,13 @@ public:
     //
     inline int GetPointSize(void) const
     {
-        return m_bNativeFontInfoOk ? m_vNativeFontInfo.GetPointSize()
-                                   : m_nPointSize;
+        //
+        // We don't use the actual native font point size since it is
+        // the chosen physical font, which is usually only and approximation
+        // of the desired outline font.  The actual displayable point size
+        // is the one stored in the refData
+        //
+        return m_nPointSize;
     }
 
     inline int GetFamily(void) const
@@ -402,7 +407,13 @@ bool wxFontRefData::Alloc(
     //
     memcpy(&m_vFattrs, &m_vNativeFontInfo.fa, sizeof(m_vFattrs));
     memcpy(&m_vFname, &m_vNativeFontInfo.fn, sizeof(m_vFname));
-    m_nPointSize  = m_vNativeFontInfo.fm.lEmHeight;
+    //
+    // Going to leave the point size alone.  Mostly we use outline fonts
+    // that can be set to any point size inside of Presentation Parameters,
+    // regardless of whether or not the actual font is registered in the system.
+    // The GpiCreateLogFont will do enough by selecting the right family,
+    // and face name.
+    //
     if (strcmp(m_vNativeFontInfo.fa.szFacename, "Times New Roman") == 0)
         m_nFamily = wxROMAN;
     else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Tms Rmn") == 0)
index 66b4819ebb0846a41fe7b46b54c7907f6063e657..61e2be6e405df0b06f6171c56fcddb6c5c7832ec 100644 (file)
@@ -208,7 +208,12 @@ bool wxTextCtrl::Create(
     //
     // Set font, position, size and initial value
     //
-    SetFont(*wxSMALL_FONT);
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
     if (!rsValue.IsEmpty())
     {
         SetValue(rsValue);
index 6cc381d71839eec8ff800e9e6ed571a4a04ae519..c42628a26dda8b9dbced50d25aa1303578625a57 100644 (file)
@@ -1241,7 +1241,7 @@ void wxOS2SetFont(
             break;
 
         case wxMODERN:
-            strcpy(zFacename, "System Vio");
+            strcpy(zFacename, "System VIO");
             break;
 
         case wxSWISS:
@@ -1250,7 +1250,7 @@ void wxOS2SetFont(
 
         case wxDEFAULT:
         default:
-            strcpy(zFacename, "System Vio");
+            strcpy(zFacename, "System VIO");
             break;
     }