Use vertical GTK entry margins too in DoGetSizeFromTextSize()
This actually makes the height returned from it smaller, as these margins are negative (at least with GTK 3), but this works well with the size returned by GTKGetPreferredSize() which would be too big otherwise, as it seems to include the margins around the control too.
This commit is contained in:
parent
44e9218e03
commit
3e01634976
1 changed files with 2 additions and 4 deletions
|
|
@ -2150,10 +2150,8 @@ wxSize wxTextCtrl::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||
{
|
||||
// default height
|
||||
tsize.y = GTKGetPreferredSize(m_widget).y;
|
||||
// Add the margins we have previously set, but only the horizontal border
|
||||
// as vertical one has been taken account at GTKGetPreferredSize().
|
||||
// Also get other GTK+ margins.
|
||||
tsize.IncBy( GTKGetEntryMargins(GetEntry()).x, 0);
|
||||
// Add the margins we have previously set.
|
||||
tsize.IncBy( GTKGetEntryMargins(GetEntry()) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue