[ 1574264 ] Fix height of wxComboCtrl's wxTextCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,6 +62,7 @@
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
|
||||||
#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
||||||
|
#define TEXTCTRL_TEXT_CENTERED 0 // 1 if text in textctrl is vertically centered
|
||||||
|
|
||||||
//#undef wxUSE_POPUPWIN
|
//#undef wxUSE_POPUPWIN
|
||||||
//#define wxUSE_POPUPWIN 0
|
//#define wxUSE_POPUPWIN 0
|
||||||
@@ -69,14 +70,17 @@
|
|||||||
#elif defined(__WXGTK__)
|
#elif defined(__WXGTK__)
|
||||||
|
|
||||||
#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
||||||
|
#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered
|
||||||
|
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
|
|
||||||
#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
||||||
|
#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform)
|
||||||
|
#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -882,6 +886,7 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
|
|||||||
wxSize sz = GetClientSize();
|
wxSize sz = GetClientSize();
|
||||||
int customBorder = m_widthCustomBorder;
|
int customBorder = m_widthCustomBorder;
|
||||||
|
|
||||||
|
#if !TEXTCTRL_TEXT_CENTERED
|
||||||
if ( (m_text->GetWindowStyleFlag() & wxBORDER_MASK) == wxNO_BORDER )
|
if ( (m_text->GetWindowStyleFlag() & wxBORDER_MASK) == wxNO_BORDER )
|
||||||
{
|
{
|
||||||
// Centre textctrl
|
// Centre textctrl
|
||||||
@@ -908,12 +913,13 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// If it has border, have textctrl will the entire text field.
|
// If it has border, have textctrl will the entire text field.
|
||||||
m_text->SetSize( m_tcArea.x,
|
m_text->SetSize( m_tcArea.x + m_widthCustomPaint,
|
||||||
0,
|
customBorder,
|
||||||
sz.x - m_btnArea.width - m_widthCustomPaint - customBorder,
|
sz.x - m_btnArea.width - m_widthCustomPaint - customBorder,
|
||||||
sz.y );
|
sz.y-(customBorder*2) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user