Fix ribbon bar tab width computation if the first tab is hidden.
The logic for the first tab should really deal with the first visible tab as the actual first tab might be hidden and in this case we shouldn't account for it at all. Closes #16432. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,6 +162,7 @@ bool wxRibbonBar::Realize()
|
||||
wxClientDC dcTemp(this);
|
||||
int sep = m_art->GetMetric(wxRIBBON_ART_TAB_SEPARATION_SIZE);
|
||||
size_t numtabs = m_pages.GetCount();
|
||||
bool firstVisible = true;
|
||||
size_t i;
|
||||
for(i = 0; i < numtabs; ++i)
|
||||
{
|
||||
@@ -185,8 +186,10 @@ bool wxRibbonBar::Realize()
|
||||
&info.small_must_have_separator_width,
|
||||
&info.minimum_width);
|
||||
|
||||
if(i == 0)
|
||||
if ( firstVisible )
|
||||
{
|
||||
firstVisible = false;
|
||||
|
||||
m_tabs_total_width_ideal = info.ideal_width;
|
||||
m_tabs_total_width_minimum = info.minimum_width;
|
||||
}
|
||||
|
Reference in New Issue
Block a user