Add wxFontPickerCtrl::SetMinPointSize()
Allow setting the minimal, as well as maximal, point size. Closes #17126.
This commit is contained in:
committed by
Vadim Zeitlin
parent
60c93971b3
commit
accf7ab117
@@ -38,6 +38,12 @@
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#define SetMinMaxPointSize(min, max)
|
||||
#else
|
||||
#define SetMinMaxPointSize(min, max) GetPickerWidget()->GetFontData()->SetRange((min), (max))
|
||||
#endif
|
||||
|
||||
const char wxFontPickerCtrlNameStr[] = "fontpicker";
|
||||
const char wxFontPickerWidgetNameStr[] = "fontpickerwidget";
|
||||
|
||||
@@ -150,7 +156,17 @@ void wxFontPickerCtrl::UpdateTextCtrlFromPicker()
|
||||
m_text->ChangeValue(Font2String(GetPickerWidget()->GetSelectedFont()));
|
||||
}
|
||||
|
||||
void wxFontPickerCtrl::SetMinPointSize(unsigned int min)
|
||||
{
|
||||
m_nMinPointSize = min;
|
||||
SetMinMaxPointSize(m_nMinPointSize, m_nMaxPointSize);
|
||||
}
|
||||
|
||||
void wxFontPickerCtrl::SetMaxPointSize(unsigned int max)
|
||||
{
|
||||
m_nMaxPointSize = max;
|
||||
SetMinMaxPointSize(m_nMinPointSize, m_nMaxPointSize);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFontPickerCtrl - event handlers
|
||||
|
||||
Reference in New Issue
Block a user