@@ -35,6 +35,8 @@ protected:
|
|||||||
virtual void DrawField(wxDC& dc, int i, int textHeight) wxOVERRIDE;
|
virtual void DrawField(wxDC& dc, int i, int textHeight) wxOVERRIDE;
|
||||||
virtual void DoUpdateStatusText(int number = 0) wxOVERRIDE;
|
virtual void DoUpdateStatusText(int number = 0) wxOVERRIDE;
|
||||||
|
|
||||||
|
virtual void InitColours();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxColour m_textActive, m_textInactive,
|
wxColour m_textActive, m_textInactive,
|
||||||
m_bgActiveFrom, m_bgActiveTo,
|
m_bgActiveFrom, m_bgActiveTo,
|
||||||
|
@@ -67,6 +67,13 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// normal system font is too tall for fitting into the standard height
|
// normal system font is too tall for fitting into the standard height
|
||||||
SetWindowVariant( wxWINDOW_VARIANT_SMALL );
|
SetWindowVariant( wxWINDOW_VARIANT_SMALL );
|
||||||
|
|
||||||
|
InitColours();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStatusBarMac::InitColours()
|
||||||
|
{
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||||
if ( !wxPlatformInfo::Get().CheckOSVersion(10, 10) )
|
if ( !wxPlatformInfo::Get().CheckOSVersion(10, 10) )
|
||||||
{
|
{
|
||||||
@@ -82,17 +89,41 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
|
|||||||
else
|
else
|
||||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
#endif // MAC_OS_X_VERSION_MIN_REQUIRED < 101000
|
||||||
{
|
{
|
||||||
// 10.10 Yosemite and newer:
|
if (!wxPlatformInfo::Get().CheckOSVersion(10, 14))
|
||||||
m_textActive = wxColour(0x40, 0x40, 0x40);
|
{
|
||||||
m_textInactive = wxColour(0x4B, 0x4B, 0x4B);
|
// 10.10 Yosemite to 10.13 :
|
||||||
m_bgActiveFrom = wxColour(0xE9, 0xE7, 0xEA);
|
m_textActive = wxColour(0x40, 0x40, 0x40);
|
||||||
m_bgActiveTo = wxColour(0xCD, 0xCB, 0xCE);
|
m_textInactive = wxColour(0x4B, 0x4B, 0x4B);
|
||||||
m_borderActive = wxColour(0xBA, 0xB8, 0xBB);
|
m_bgActiveFrom = wxColour(0xE9, 0xE7, 0xEA);
|
||||||
m_borderInactive = wxColour(0xC3, 0xC3, 0xC3);
|
m_bgActiveTo = wxColour(0xCD, 0xCB, 0xCE);
|
||||||
SetBackgroundColour(wxColour(0xF4, 0xF4, 0xF4)); // inactive bg
|
m_borderActive = wxColour(0xBA, 0xB8, 0xBB);
|
||||||
}
|
m_borderInactive = wxColour(0xC3, 0xC3, 0xC3);
|
||||||
|
SetBackgroundColour(wxColour(0xF4, 0xF4, 0xF4)); // inactive bg
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxColour bg = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
|
||||||
|
m_textActive = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
|
||||||
|
m_textInactive = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
||||||
|
|
||||||
return true;
|
if ( bg.Red() < 128 )
|
||||||
|
{
|
||||||
|
// dark mode appearance
|
||||||
|
m_bgActiveFrom = wxColour(0x32, 0x32, 0x34);
|
||||||
|
m_bgActiveTo = wxColour(0x29, 0x29, 0x2A);
|
||||||
|
m_borderActive = wxColour(0x00, 0x00, 0x00);
|
||||||
|
m_borderInactive = wxColour(0x00, 0x00, 0x00);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_bgActiveFrom = wxColour(0xE9, 0xE7, 0xEA);
|
||||||
|
m_bgActiveTo = wxColour(0xCD, 0xCB, 0xCE);
|
||||||
|
m_borderActive = wxColour(0xBA, 0xB8, 0xBB);
|
||||||
|
m_borderInactive = wxColour(0xC3, 0xC3, 0xC3);
|
||||||
|
}
|
||||||
|
SetBackgroundColour(bg); // inactive bg
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
|
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
|
||||||
|
Reference in New Issue
Block a user