]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gauge.cpp
menu events handling more closely to the menu instance itself, removing menubar where...
[wxWidgets.git] / src / gtk / gauge.cpp
index 54360ce314f8da049eef15184831e8535c28b38b..7fe754a52e2f6a68a1ac1de0925ea6e787a1f43e 100644 (file)
@@ -72,10 +72,10 @@ void wxGauge::DoSetGauge()
 
 wxSize wxGauge::DoGetBestSize() const
 {
-    if (HasFlag(wxGA_HORIZONTAL))
-        return wxSize(100, 28);
-    else
+    if (HasFlag(wxGA_VERTICAL))
         return wxSize(28, 100);
+    else
+        return wxSize(100, 28);
 }
 
 void wxGauge::SetRange( int range )
@@ -112,5 +112,22 @@ void wxGauge::ApplyWidgetStyle()
     gtk_widget_set_style( m_widget, m_widgetStyle );
 }
 
+wxVisualAttributes wxGauge::GetDefaultAttributes() const
+{
+    // Visible gauge colours use a different colour state
+    return GetDefaultAttributesFromGTKWidget(m_widget,
+                                             UseGTKStyleBase(),
+                                             GTK_STATE_ACTIVE);
+
+}
+
+// static
+wxVisualAttributes
+wxGauge::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    return GetDefaultAttributesFromGTKWidget(gtk_progress_bar_new,
+                                             false, GTK_STATE_ACTIVE);
+}
+
 #endif // wxUSE_GAUGE