small fixed-wixth tab sizing bug fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -277,6 +277,12 @@ void wxAuiDefaultTabArt::SetSizingInfo(const wxSize& tab_ctrl_size,
|
|||||||
m_fixed_tab_width = 100;
|
m_fixed_tab_width = 100;
|
||||||
|
|
||||||
int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
|
int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
|
||||||
|
|
||||||
|
if (m_flags & wxAUI_NB_CLOSE_BUTTON)
|
||||||
|
tot_width -= m_active_close_bmp.GetWidth();
|
||||||
|
if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON)
|
||||||
|
tot_width -= m_active_windowlist_bmp.GetWidth();
|
||||||
|
|
||||||
if (tab_count > 0)
|
if (tab_count > 0)
|
||||||
{
|
{
|
||||||
m_fixed_tab_width = tot_width/(int)tab_count;
|
m_fixed_tab_width = tot_width/(int)tab_count;
|
||||||
@@ -831,6 +837,12 @@ void wxAuiSimpleTabArt::SetSizingInfo(const wxSize& tab_ctrl_size,
|
|||||||
m_fixed_tab_width = 100;
|
m_fixed_tab_width = 100;
|
||||||
|
|
||||||
int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
|
int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4;
|
||||||
|
|
||||||
|
if (m_flags & wxAUI_NB_CLOSE_BUTTON)
|
||||||
|
tot_width -= m_active_close_bmp.GetWidth();
|
||||||
|
if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON)
|
||||||
|
tot_width -= m_active_windowlist_bmp.GetWidth();
|
||||||
|
|
||||||
if (tab_count > 0)
|
if (tab_count > 0)
|
||||||
{
|
{
|
||||||
m_fixed_tab_width = tot_width/(int)tab_count;
|
m_fixed_tab_width = tot_width/(int)tab_count;
|
||||||
@@ -2469,8 +2481,10 @@ void wxAuiNotebook::SetWindowStyleFlag(long style)
|
|||||||
wxAuiPaneInfo& pane = all_panes.Item(i);
|
wxAuiPaneInfo& pane = all_panes.Item(i);
|
||||||
if (pane.name == wxT("dummy"))
|
if (pane.name == wxT("dummy"))
|
||||||
continue;
|
continue;
|
||||||
wxAuiTabCtrl* tabctrl = ((wxTabFrame*)pane.window)->m_tabs;
|
wxTabFrame* tabframe = (wxTabFrame*)pane.window;
|
||||||
|
wxAuiTabCtrl* tabctrl = tabframe->m_tabs;
|
||||||
tabctrl->SetFlags(m_flags);
|
tabctrl->SetFlags(m_flags);
|
||||||
|
tabframe->DoSizing();
|
||||||
tabctrl->Refresh();
|
tabctrl->Refresh();
|
||||||
tabctrl->Update();
|
tabctrl->Update();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user