Fix ribbon page layout wrong when scroll button is shown or hidden due to a scroll operation
See #17454
This commit is contained in:
@@ -75,7 +75,7 @@ protected:
|
|||||||
|
|
||||||
bool ExpandPanels(wxOrientation direction, int maximum_amount);
|
bool ExpandPanels(wxOrientation direction, int maximum_amount);
|
||||||
bool CollapsePanels(wxOrientation direction, int minimum_amount);
|
bool CollapsePanels(wxOrientation direction, int minimum_amount);
|
||||||
void ShowScrollButtons();
|
bool ShowScrollButtons();
|
||||||
void HideScrollButtons();
|
void HideScrollButtons();
|
||||||
|
|
||||||
void CommonInit(const wxString& label, const wxBitmap& icon);
|
void CommonInit(const wxString& label, const wxBitmap& icon);
|
||||||
|
@@ -338,7 +338,8 @@ bool wxRibbonPage::ScrollPixels(int pixels)
|
|||||||
child->SetPosition(wxPoint(x, y));
|
child->SetPosition(wxPoint(x, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowScrollButtons();
|
if (ShowScrollButtons())
|
||||||
|
DoActualLayout();
|
||||||
Refresh();
|
Refresh();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -788,7 +789,7 @@ void wxRibbonPage::HideScrollButtons()
|
|||||||
ShowScrollButtons();
|
ShowScrollButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRibbonPage::ShowScrollButtons()
|
bool wxRibbonPage::ShowScrollButtons()
|
||||||
{
|
{
|
||||||
bool show_left = true;
|
bool show_left = true;
|
||||||
bool show_right = true;
|
bool show_right = true;
|
||||||
@@ -891,6 +892,8 @@ void wxRibbonPage::ShowScrollButtons()
|
|||||||
{
|
{
|
||||||
wxDynamicCast(GetParent(), wxRibbonBar)->RepositionPage(this);
|
wxDynamicCast(GetParent(), wxRibbonBar)->RepositionPage(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return reposition;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetSizeInOrientation(wxSize size, wxOrientation orientation)
|
static int GetSizeInOrientation(wxSize size, wxOrientation orientation)
|
||||||
|
Reference in New Issue
Block a user