]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch #840643 from Ian Brown with some modifications:
authorMattia Barbon <mbarbon@cpan.org>
Sat, 15 Nov 2003 21:12:24 +0000 (21:12 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 15 Nov 2003 21:12:24 +0000 (21:12 +0000)
use DisplayWidth/DIsplayHeight instead of hardcoded values.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/settings.cpp

index b332b632c7acc3840a2c98cc106588a45d688aa4..809f5ac1d0ce6c13388160faf69aba2fa44b4510 100644 (file)
@@ -179,6 +179,8 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
 // Get a system metric, e.g. scrollbar size
 int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
 {
+    int return_value = 0;
+
     switch ( index)
     {
         case wxSYS_HSCROLL_Y:
@@ -223,11 +225,13 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
         case wxSYS_WINDOWMIN_X:
             // TODO
         case wxSYS_WINDOWMIN_Y:
-            // TODO
+            break;
         case wxSYS_SCREEN_X:
-            // TODO
+            return_value = DisplayWidth( wxGlobalDisplay(), 0 );
+            break;
         case wxSYS_SCREEN_Y:
-            // TODO
+            return_value = DisplayHeight( wxGlobalDisplay(), 0 );
+            break;
         case wxSYS_FRAMESIZE_X:
             // TODO
         case wxSYS_FRAMESIZE_Y:
@@ -258,7 +262,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
             ;
     }
 
-    return 0;
+    return return_value;
 }
 
 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)