Patch #988 2006-04-11 05:42

olorin

"best" size for main toolbar (2)
Download
988-best_size_for_m.patch (563 bytes)
Category
 
Status
Accepted
Close date
2006-04-24 19:09
Assigned to
 
Index: main.cpp
===================================================================
--- main.cpp    (revision 2337)
+++ main.cpp    (working copy)
@@ -697,9 +697,9 @@
     m_pToolbar = new wxToolBar(this, -1, wxDefaultPosition, size, wxTB_FLAT | wxTB_NODIVIDER);
     m_pToolbar->SetToolBitmapSize(size);
     Manager::Get()->AddonToolBar(m_pToolbar,xrcToolbarName);
-    m_pToolbar->SetBestFittingSize();
 
     m_pToolbar->Realize();
+    m_pToolbar->SetBestFittingSize();
 
     // add toolbars in docking system
     m_LayoutManager.AddPane(m_pToolbar, wxPaneInfo().
olorin 2006-04-11 05:51

Hi,

this reinstates the correct (for me: winxp, wxwidget 2.6.3 unicode) sequence of the calls to Realize() and SetBestFittingSize() for the main toolbar.

The original order of these two calls was changed when applying my previous patch about this issue, I don't know if it was for "mistake" or if there are serious reasons (in this case please note that for the plugins' toolbars the call to SetBestFittingSize() is done after Realize(), too).

The problem is that Realise() sets (again) an oversized width for the toolbar.

I posted a note about this in the previous (almost applied) patch, but since I haven't seen any reply I'm posting a new patch.

thomasdenk 2006-04-24 19:09

Applied, thank you. :)