mirror of https://github.com/BOINC/boinc.git
MGR: Adjust red New Notices ring for new button shapes if on Mac OS 10.7
svn path=/trunk/boinc/; revision=24630
This commit is contained in:
parent
696352774b
commit
ee7bdf7d4c
|
@ -8581,8 +8581,10 @@ Charlie 20 Nov 2011
|
||||||
|
|
||||||
Charlie 21 Nov 2011
|
Charlie 21 Nov 2011
|
||||||
- MGR: In Simple View, draw Mac progress bar on white background for
|
- MGR: In Simple View, draw Mac progress bar on white background for
|
||||||
better visibility.
|
better visibility; adjust red New Notices ring for new button
|
||||||
|
shapes if on Mac OS 10.7.
|
||||||
|
|
||||||
clientgui/
|
clientgui/
|
||||||
|
sg_BoincSimpleFrame.cpp,.h
|
||||||
sg_PanelBase.cpp
|
sg_PanelBase.cpp
|
||||||
sg_TaskPanel.cpp
|
sg_TaskPanel.cpp
|
||||||
|
|
|
@ -768,6 +768,14 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) :
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Tell accessibility aids to ignore this panel (but not its contents)
|
// Tell accessibility aids to ignore this panel (but not its contents)
|
||||||
HIObjectSetAccessibilityIgnored((HIObjectRef)GetHandle(), true);
|
HIObjectSetAccessibilityIgnored((HIObjectRef)GetHandle(), true);
|
||||||
|
|
||||||
|
SInt32 response;
|
||||||
|
OSStatus err = Gestalt(gestaltSystemVersion, &response);
|
||||||
|
if ((err == noErr) && (response >= 0x1070)) {
|
||||||
|
m_iRedRingRadius = 4;
|
||||||
|
} else {
|
||||||
|
m_iRedRingRadius = 12;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_SuspendResumeButton->Disable();
|
m_SuspendResumeButton->Disable();
|
||||||
|
@ -1011,7 +1019,6 @@ void CSimpleGUIPanel::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||||
|
|
||||||
if (m_bNewNoticeAlert) {
|
if (m_bNewNoticeAlert) {
|
||||||
wxRect r = m_NoticesButton->GetRect();
|
wxRect r = m_NoticesButton->GetRect();
|
||||||
r.Inflate(3, 3);
|
|
||||||
if (m_bNoticesButtonIsRed) {
|
if (m_bNoticesButtonIsRed) {
|
||||||
wxPen oldPen = myDC.GetPen();
|
wxPen oldPen = myDC.GetPen();
|
||||||
wxBrush oldBrush = myDC.GetBrush();
|
wxBrush oldBrush = myDC.GetBrush();
|
||||||
|
@ -1021,10 +1028,13 @@ void CSimpleGUIPanel::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||||
myDC.SetPen(bgPen);
|
myDC.SetPen(bgPen);
|
||||||
myDC.SetBrush(*wxTRANSPARENT_BRUSH);
|
myDC.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height, 12);
|
r.Inflate(2, 2);
|
||||||
|
myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height+1, m_iRedRingRadius);
|
||||||
#elif defined(__WXMSW__)
|
#elif defined(__WXMSW__)
|
||||||
|
r.Inflate(3, 3);
|
||||||
myDC.DrawRectangle(r.x, r.y, r.width, r.height);
|
myDC.DrawRectangle(r.x, r.y, r.width, r.height);
|
||||||
#else
|
#else
|
||||||
|
r.Inflate(3, 3);
|
||||||
myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height, 6);
|
myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height, 6);
|
||||||
#endif
|
#endif
|
||||||
// Restore Mode, Pen and Brush
|
// Restore Mode, Pen and Brush
|
||||||
|
|
|
@ -76,6 +76,7 @@ protected:
|
||||||
|
|
||||||
// EventHandlerRef m_pSGAccessibilityEventHandlerRef;
|
// EventHandlerRef m_pSGAccessibilityEventHandlerRef;
|
||||||
|
|
||||||
|
int m_iRedRingRadius;
|
||||||
#endif
|
#endif
|
||||||
wxBitmap m_bmpBg;
|
wxBitmap m_bmpBg;
|
||||||
wxButton *m_NoticesButton;
|
wxButton *m_NoticesButton;
|
||||||
|
|
Loading…
Reference in New Issue