Use flat generic status bar by default and add wxSB_SUNKEN.

GTK+ applications don't use sunken status bars since many years, do don't do
it in wxWidgets neither by default any more. Add wxSB_SUNKEN style that can be
explicitly used if the old appearance is desired.

Closes #15009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-03-21 22:36:52 +00:00
parent 3c2f3a60d1
commit 98eb2e84e8
7 changed files with 31 additions and 11 deletions

View File

@@ -218,6 +218,7 @@ enum
StatusBar_SetPaneStyleNormal,
StatusBar_SetPaneStyleFlat,
StatusBar_SetPaneStyleRaised,
StatusBar_SetPaneStyleSunken,
StatusBar_SetStyleSizeGrip,
StatusBar_SetStyleEllipsizeStart,
@@ -256,6 +257,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(StatusBar_SetPaneStyleNormal, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetPaneStyleFlat, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetPaneStyleRaised, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetPaneStyleSunken, MyFrame::OnSetPaneStyle)
EVT_MENU(StatusBar_SetStyleSizeGrip, MyFrame::OnSetStyle)
EVT_MENU(StatusBar_SetStyleEllipsizeStart, MyFrame::OnSetStyle)
@@ -267,7 +269,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
MyFrame::OnUpdateForDefaultStatusbar)
EVT_UPDATE_UI(StatusBar_Toggle, MyFrame::OnUpdateStatusBarToggle)
EVT_UPDATE_UI_RANGE(StatusBar_SetPaneStyleNormal,
StatusBar_SetPaneStyleRaised,
StatusBar_SetPaneStyleSunken,
MyFrame::OnUpdateSetPaneStyle)
EVT_UPDATE_UI_RANGE(StatusBar_SetStyleSizeGrip, StatusBar_SetStyleShowTips,
MyFrame::OnUpdateSetStyle)
@@ -396,6 +398,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
wxT("&Raised"),
wxT("Sets the style of the first field to raised look")
);
statbarPaneStyleMenu->AppendCheckItem
(
StatusBar_SetPaneStyleSunken,
wxT("&Sunken"),
wxT("Sets the style of the first field to sunken look")
);
statbarMenu->Append(StatusBar_SetPaneStyle, wxT("Field style"),
statbarPaneStyleMenu);
@@ -722,6 +730,9 @@ void MyFrame::OnUpdateSetPaneStyle(wxUpdateUIEvent& event)
case StatusBar_SetPaneStyleRaised:
event.Check(m_statbarPaneStyle == wxSB_RAISED);
break;
case StatusBar_SetPaneStyleSunken:
event.Check(m_statbarPaneStyle == wxSB_SUNKEN);
break;
}
}
@@ -738,6 +749,9 @@ void MyFrame::OnSetPaneStyle(wxCommandEvent& event)
case StatusBar_SetPaneStyleRaised:
m_statbarPaneStyle = wxSB_RAISED;
break;
case StatusBar_SetPaneStyleSunken:
m_statbarPaneStyle = wxSB_SUNKEN;
break;
}
ApplyPaneStyle();