From: Vadim Zeitlin Date: Mon, 4 Feb 2002 16:34:22 +0000 (+0000) Subject: added GAUGE standard colour and use it in DrawProgressBar() if the colour X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a407ff6ae8668b8f37b139a9420bcc041fa8adc1?ds=inline added GAUGE standard colour and use it in DrawProgressBar() if the colour hadn't bee nset explicitly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/univ/colschem.h b/include/wx/univ/colschem.h index 69ca4d89f0..c7afade539 100644 --- a/include/wx/univ/colschem.h +++ b/include/wx/univ/colschem.h @@ -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, diff --git a/src/univ/renderer.cpp b/src/univ/renderer.cpp index 19c027723c..16c2c2de04 100644 --- a/src/univ/renderer.cpp +++ b/src/univ/renderer.cpp @@ -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() ) { diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 39a0ba958e..75931f5b59 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -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")); diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index ead2d25ddd..47d159b6ac 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -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"));