Apply a better fix for HitTest failures in the tests with GTK3
The actual cause of the problem was the tests making the single-line text control height far too large. So just use the default height for single-line controls.
This commit is contained in:
@@ -166,14 +166,16 @@ long TextCtrlTestCase::ms_style = 0;
|
||||
|
||||
void TextCtrlTestCase::CreateText(long extraStyles)
|
||||
{
|
||||
const long style = ms_style | extraStyles;
|
||||
const int h = (style & wxTE_MULTILINE) ? TEXT_HEIGHT : -1;
|
||||
m_text = new wxTextCtrl(wxTheApp->GetTopWindow(), wxID_ANY, "",
|
||||
wxDefaultPosition, wxSize(400, TEXT_HEIGHT),
|
||||
ms_style | extraStyles);
|
||||
wxDefaultPosition, wxSize(400, h),
|
||||
style);
|
||||
}
|
||||
|
||||
void TextCtrlTestCase::setUp()
|
||||
{
|
||||
CreateText(ms_style);
|
||||
CreateText(0);
|
||||
}
|
||||
|
||||
void TextCtrlTestCase::tearDown()
|
||||
|
Reference in New Issue
Block a user