Use border style consistently in the widgets sample
Use GetAttrs().m_defaultFlags everywhere when creating the widgets, it was done for some but not all of them before, without any apparent reason. This should make setting various border styles work (for the widgets supporting them).
This commit is contained in:
@@ -81,9 +81,6 @@ protected:
|
||||
// restore the checkboxes state to the initial values
|
||||
void Reset();
|
||||
|
||||
// get the initial style for the picker of the given kind
|
||||
long GetPickerStyle();
|
||||
|
||||
|
||||
void OnFontChange(wxFontPickerEvent &ev);
|
||||
void OnCheckBox(wxCommandEvent &ev);
|
||||
@@ -175,15 +172,7 @@ void FontPickerWidgetsPage::CreatePicker()
|
||||
{
|
||||
delete m_fontPicker;
|
||||
|
||||
m_fontPicker = new wxFontPickerCtrl(this, PickerPage_Font,
|
||||
*wxSWISS_FONT,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
GetPickerStyle());
|
||||
}
|
||||
|
||||
long FontPickerWidgetsPage::GetPickerStyle()
|
||||
{
|
||||
long style = 0;
|
||||
long style = GetAttrs().m_defaultFlags;
|
||||
|
||||
if ( m_chkFontTextCtrl->GetValue() )
|
||||
style |= wxFNTP_USE_TEXTCTRL;
|
||||
@@ -192,9 +181,12 @@ long FontPickerWidgetsPage::GetPickerStyle()
|
||||
style |= wxFNTP_USEFONT_FOR_LABEL;
|
||||
|
||||
if ( m_chkFontDescAsLabel->GetValue() )
|
||||
style |= wxFNTP_FONTDESC_AS_LABEL;
|
||||
style |= wxFNTP_FONTDESC_AS_LABEL;
|
||||
|
||||
return style;
|
||||
m_fontPicker = new wxFontPickerCtrl(this, PickerPage_Font,
|
||||
*wxSWISS_FONT,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
style);
|
||||
}
|
||||
|
||||
void FontPickerWidgetsPage::RecreatePicker()
|
||||
|
Reference in New Issue
Block a user