Use bottom flat notebook on PocketPC by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -382,7 +382,7 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
|||||||
// we have 2 panes: book with pages demonstrating the controls in the
|
// we have 2 panes: book with pages demonstrating the controls in the
|
||||||
// upper one and the log window with some buttons in the lower
|
// upper one and the log window with some buttons in the lower
|
||||||
|
|
||||||
int style = wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN|WidgetBookStyle;
|
int style = wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN|wxBK_DEFAULT;
|
||||||
// Uncomment to suppress page theme (draw in solid colour)
|
// Uncomment to suppress page theme (draw in solid colour)
|
||||||
//style |= wxNB_NOPAGETHEME;
|
//style |= wxNB_NOPAGETHEME;
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ void WidgetsFrame::InitBook()
|
|||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
WidgetBookStyle);
|
wxBK_DEFAULT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for ( WidgetsPageInfo *info = WidgetsPage::ms_widgetPages;
|
for ( WidgetsPageInfo *info = WidgetsPage::ms_widgetPages;
|
||||||
|
@@ -18,18 +18,12 @@
|
|||||||
#define WidgetsBookCtrl wxTreebook
|
#define WidgetsBookCtrl wxTreebook
|
||||||
#define WidgetsBookCtrlEvent wxTreebookEvent
|
#define WidgetsBookCtrlEvent wxTreebookEvent
|
||||||
#define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_TREEBOOK_PAGE_CHANGED(id,func)
|
#define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_TREEBOOK_PAGE_CHANGED(id,func)
|
||||||
#define WidgetBookStyle (wxBK_DEFAULT)
|
|
||||||
#else
|
#else
|
||||||
#include "wx/bookctrl.h"
|
#include "wx/bookctrl.h"
|
||||||
#define USE_TREEBOOK 0
|
#define USE_TREEBOOK 0
|
||||||
#define WidgetsBookCtrl wxBookCtrl
|
#define WidgetsBookCtrl wxBookCtrl
|
||||||
#define WidgetsBookCtrlEvent wxBookCtrlEvent
|
#define WidgetsBookCtrlEvent wxBookCtrlEvent
|
||||||
#define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_BOOKCTRL_PAGE_CHANGED(id,func)
|
#define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_BOOKCTRL_PAGE_CHANGED(id,func)
|
||||||
#ifdef __POCKETPC__
|
|
||||||
#define WidgetBookStyle (wxBK_BOTTOM|wxNB_FLAT)
|
|
||||||
#else
|
|
||||||
#define WidgetBookStyle (wxBK_DEFAULT)
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_LOG && !defined(__WXHANDHELD__)
|
#if wxUSE_LOG && !defined(__WXHANDHELD__)
|
||||||
|
@@ -135,12 +135,7 @@ void wxPropertySheetDialog::CreateButtons(int flags)
|
|||||||
// Creates the book control
|
// Creates the book control
|
||||||
wxBookCtrlBase* wxPropertySheetDialog::CreateBookCtrl()
|
wxBookCtrlBase* wxPropertySheetDialog::CreateBookCtrl()
|
||||||
{
|
{
|
||||||
int style = wxCLIP_CHILDREN;
|
int style = wxCLIP_CHILDREN | wxBK_DEFAULT;
|
||||||
#if defined(__POCKETPC__) && wxUSE_NOTEBOOK
|
|
||||||
style |= wxBK_BOTTOM|wxNB_FLAT;
|
|
||||||
#else
|
|
||||||
style |= wxBK_DEFAULT;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxBookCtrlBase* bookCtrl = NULL;
|
wxBookCtrlBase* bookCtrl = NULL;
|
||||||
|
|
||||||
|
@@ -268,14 +268,21 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
|
if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
|
||||||
|
{
|
||||||
|
#if defined(__POCKETPC__)
|
||||||
|
style |= wxBK_BOTTOM | wxNB_FLAT;
|
||||||
|
#else
|
||||||
|
style |= wxBK_TOP;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
#ifdef __WXWINCE__
|
||||||
// Not sure why, but without this style, there is no border
|
// Not sure why, but without this style, there is no border
|
||||||
// around the notebook tabs.
|
// around the notebook tabs.
|
||||||
if (style & wxNB_FLAT)
|
if (style & wxNB_FLAT)
|
||||||
style |= wxBORDER_SUNKEN;
|
style |= wxBORDER_SUNKEN;
|
||||||
#endif
|
#endif
|
||||||
if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
|
|
||||||
style |= wxBK_TOP;
|
|
||||||
|
|
||||||
#if !wxUSE_UXTHEME
|
#if !wxUSE_UXTHEME
|
||||||
// ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can
|
// ComCtl32 notebook tabs simply don't work unless they're on top if we have uxtheme, we can
|
||||||
|
Reference in New Issue
Block a user