Make wxToolBar styles consistent and add wxTB_DEFAULT_STYLE.
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in wxToolBar itself instead to use the border style appropriate for the current platform by default. This has the same effect -- the default border style is used unless another one is explicitly specified -- but is more clear and consistent. Also add wxTB_DEFAULT_STYLE for consistency with the other classes. Closes #15037. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -274,7 +274,7 @@ public:
|
||||
|
||||
@see CreateStatusBar(), OnCreateToolBar(), SetToolBar(), GetToolBar()
|
||||
*/
|
||||
virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL,
|
||||
virtual wxToolBar* CreateToolBar(long style = wxTB_DEFAULT_STYLE,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
|
@@ -18,12 +18,12 @@ enum wxToolBarToolStyle
|
||||
enum
|
||||
{
|
||||
/** lay out the toolbar horizontally */
|
||||
wxTB_HORIZONTAL,
|
||||
wxTB_TOP,
|
||||
wxTB_HORIZONTAL = wxHORIZONTAL,
|
||||
wxTB_TOP = wxTB_HORIZONTAL,
|
||||
|
||||
/** lay out the toolbar vertically */
|
||||
wxTB_VERTICAL,
|
||||
wxTB_LEFT,
|
||||
wxTB_VERTICAL = wxVERTICAL,
|
||||
wxTB_LEFT = wxTB_VERTICAL,
|
||||
|
||||
/** show 3D buttons (wxToolBarSimple only) */
|
||||
wxTB_3DBUTTONS,
|
||||
@@ -48,7 +48,7 @@ enum
|
||||
|
||||
/** show the text and the icons alongside, not vertically stacked (Win32/GTK) */
|
||||
wxTB_HORZ_LAYOUT,
|
||||
wxTB_HORZ_TEXT,
|
||||
wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT,
|
||||
|
||||
/** don't show the toolbar short help tooltips */
|
||||
wxTB_NO_TOOLTIPS,
|
||||
@@ -57,7 +57,10 @@ enum
|
||||
wxTB_BOTTOM,
|
||||
|
||||
/** lay out toolbar at the right edge of the window */
|
||||
wxTB_RIGHT
|
||||
wxTB_RIGHT,
|
||||
|
||||
/** flags that are closest to the native look*/
|
||||
wxTB_DEFAULT_STYLE = wxTB_HORIZONTAL | wxTB_FLAT
|
||||
};
|
||||
|
||||
|
||||
@@ -216,6 +219,9 @@ public:
|
||||
Align the toolbar at the bottom of parent window.
|
||||
@style{wxTB_RIGHT}
|
||||
Align the toolbar at the right side of parent window.
|
||||
@style{wxTB_DEFAULT_STYLE}
|
||||
Combination of @c wxTB_HORIZONTAL and @c wxTB_FLAT. This style is new
|
||||
since wxWidgets 2.9.5.
|
||||
@endStyleTable
|
||||
|
||||
See also @ref overview_windowstyles. Note that the wxMSW native toolbar
|
||||
|
Reference in New Issue
Block a user