Fix field widths in wxStatusBar showing a size grip in wxGTK

Account for the size grip in DoUpdateFieldWidths(), otherwise the last
field overlapped it.
This commit is contained in:
Vadim Zeitlin 2018-09-22 16:36:05 +02:00
parent 9327a1f75c
commit 6c1b2b23cf
2 changed files with 6 additions and 1 deletions

View File

@ -134,6 +134,7 @@ wxGTK:
- Implement wxDataViewColumn::UnsetAsSortKey().
- Fix not showing wxInfoBar with GTK+ 3 < 3.22.29.
- Fix the build with glib < 2.32 (e.g. CentOS 6).
- Fix field widths in wxStatusBar showing a size grip.
wxMSW:

View File

@ -184,8 +184,12 @@ void wxStatusBarGeneric::DoUpdateFieldWidths()
{
m_lastClientSize = GetClientSize();
int width = m_lastClientSize.x;
if ( ShowsSizeGrip() )
width -= GetSizeGripRect().width;
// recompute the cache of the field widths if the status bar width has changed
m_widthsAbs = CalculateAbsWidths(m_lastClientSize.x);
m_widthsAbs = CalculateAbsWidths(width);
}
bool wxStatusBarGeneric::ShowsSizeGrip() const