]> git.saurik.com Git - wxWidgets.git/commitdiff
added GAUGE standard colour and use it in DrawProgressBar() if the colour
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Feb 2002 16:34:22 +0000 (16:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 Feb 2002 16:34:22 +0000 (16:34 +0000)
hadn't bee nset explicitly

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

include/wx/univ/colschem.h
src/univ/renderer.cpp
src/univ/themes/gtk.cpp
src/univ/themes/win32.cpp

index 69ca4d89f0305b59b3626c5fbedb04404a1fdcc4..c7afade5393fa824c31ac24086f9f1036886e51c 100644 (file)
@@ -66,6 +66,9 @@ public:
         TITLEBAR_TEXT,
         TITLEBAR_ACTIVE_TEXT,
         
+        // the default gauge fill colour
+        GAUGE,
+
         // desktop background colour (only used by framebuffer ports)
         DESKTOP,
 
index 19c027723c7fac2fbebdd9311196eec71eb59732..16c2c2de0449d19116dad854dcb54d484f690156 100644 (file)
@@ -771,7 +771,9 @@ void wxControlRenderer::DrawProgressBar(const wxGauge *gauge)
     wxRect rect = m_rect;
     rect.Deflate(1); // FIXME this depends on the border width
 
-    m_dc.SetBrush(wxBrush(m_window->GetForegroundColour(), wxSOLID));
+    wxColour col = m_window->UseFgCol() ? m_window->GetForegroundColour()
+                                        : wxTHEME_COLOUR(GAUGE);
+    m_dc.SetBrush(wxBrush(col, wxSOLID));
 
     if ( gauge->IsSmooth() )
     {
index 39a0ba958efa6133c0e7f556a6a65ab1f905c812..75931f5b5960f8090c487242d25cd74406fbd6b9 100644 (file)
@@ -763,6 +763,8 @@ wxColour wxGTKColourScheme::Get(wxGTKColourScheme::StdColour col) const
         case HIGHLIGHT:         return wxColour(0x9c0000);
         case HIGHLIGHT_TEXT:    return wxColour(0xffffff);
 
+        case GAUGE:             return Get(CONTROL_CURRENT);
+
         case MAX:
         default:
             wxFAIL_MSG(_T("invalid standard colour"));
index ead2d25dddda1c27e54b56202a182171bd6a538a..47d159b6ac0a2ce791071231041a29c1ea004113 100644 (file)
@@ -1297,7 +1297,7 @@ wxColour wxWin32ColourScheme::Get(wxWin32ColourScheme::StdColour col) const
 #if defined(COLOR_3DDKSHADOW)
         case SHADOW_DARK:       return wxColour(GetSysColor(COLOR_3DDKSHADOW));
 #else
-        case SHADOW_DARK:       return *wxBLACK;
+        case SHADOW_DARK:       return wxColour(GetSysColor(COLOR_3DHADOW));
 #endif
 
         case CONTROL_TEXT_DISABLED:
@@ -1348,6 +1348,8 @@ wxColour wxWin32ColourScheme::Get(wxWin32ColourScheme::StdColour col) const
         case DESKTOP:           return wxColour(0x808000);
 #endif // __WXMSW__
 
+        case GAUGE:             return Get(HIGHLIGHT);
+
         case MAX:
         default:
             wxFAIL_MSG(_T("invalid standard colour"));