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:
Paul Cornett
2021-01-19 22:50:41 -08:00
parent c530b89ffa
commit 892795ac9c
2 changed files with 5 additions and 13 deletions

View File

@@ -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()