Fix flickering when resizing a frame with status bar in wxMSW.
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().
Closes #16705.
(this is a backport of 8d12e07453
from master)
This commit is contained in:
@@ -616,6 +616,7 @@ wxMSW:
|
|||||||
- Fix best height of wxSlider with labels but without ticks (Artur Wieczorek).
|
- Fix best height of wxSlider with labels but without ticks (Artur Wieczorek).
|
||||||
- Fix initial text value of wxSpinCtrlDouble (Laurent Poujoulat).
|
- Fix initial text value of wxSpinCtrlDouble (Laurent Poujoulat).
|
||||||
- Fix best size calculation for bitmaps with buttons (Artur Wieczorek).
|
- Fix best size calculation for bitmaps with buttons (Artur Wieczorek).
|
||||||
|
- Fix flicker when resizing windows with status bar (Artur Wieczorek).
|
||||||
- Fix size of the icon returned from wxFSVolume::GetIcon() (troelsk).
|
- Fix size of the icon returned from wxFSVolume::GetIcon() (troelsk).
|
||||||
- Fix autosize after expanding/collapsing items in wxDataViewCtrl (ciglesias).
|
- Fix autosize after expanding/collapsing items in wxDataViewCtrl (ciglesias).
|
||||||
- Fix inserting tools removed from wxToolBar back into it (sbrowne).
|
- Fix inserting tools removed from wxToolBar back into it (sbrowne).
|
||||||
|
@@ -286,16 +286,6 @@ void wxFrame::PositionStatusBar()
|
|||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
// Resize the status bar to its default height, as it could have been set
|
|
||||||
// to a wrong value before by WM_SIZE sent during the frame creation and
|
|
||||||
// our status bars preserve their programmatically set size to avoid being
|
|
||||||
// resized by DefWindowProc() to the full window width, so if we didn't do
|
|
||||||
// this here, the status bar would retain the possibly wrong current height.
|
|
||||||
m_frameStatusBar->SetSize(wxDefaultSize, wxSIZE_AUTO_HEIGHT);
|
|
||||||
|
|
||||||
int sw, sh;
|
|
||||||
m_frameStatusBar->GetSize(&sw, &sh);
|
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
wxToolBar * const toolbar = GetToolBar();
|
wxToolBar * const toolbar = GetToolBar();
|
||||||
@@ -319,6 +309,16 @@ void wxFrame::PositionStatusBar()
|
|||||||
//else: no adjustments necessary for the toolbar on top
|
//else: no adjustments necessary for the toolbar on top
|
||||||
#endif // wxUSE_TOOLBAR
|
#endif // wxUSE_TOOLBAR
|
||||||
|
|
||||||
|
// Resize the status bar to its default height, as it could have been set
|
||||||
|
// to a wrong value before by WM_SIZE sent during the frame creation and
|
||||||
|
// our status bars preserve their programmatically set size to avoid being
|
||||||
|
// resized by DefWindowProc() to the full window width, so if we didn't do
|
||||||
|
// this here, the status bar would retain the possibly wrong current height.
|
||||||
|
m_frameStatusBar->SetSize(x, h, w, wxDefaultCoord, wxSIZE_AUTO_HEIGHT);
|
||||||
|
|
||||||
|
int sw, sh;
|
||||||
|
m_frameStatusBar->GetSize(&sw, &sh);
|
||||||
|
|
||||||
// Since we wish the status bar to be directly under the client area,
|
// Since we wish the status bar to be directly under the client area,
|
||||||
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
|
// we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS.
|
||||||
m_frameStatusBar->SetSize(x, h, w, sh);
|
m_frameStatusBar->SetSize(x, h, w, sh);
|
||||||
|
Reference in New Issue
Block a user