Mercurial > hg > svgui
diff view/PaneStack.cpp @ 235:efadb9d2b2c6
* Experiment with sizing the property stacks and using a frame on the overview
widget with an eye to making the default empty window look a bit nicer
author | Chris Cannam |
---|---|
date | Mon, 16 Apr 2007 12:20:27 +0000 |
parents | 6969f21da18a |
children | 966639cc7c11 |
line wrap: on
line diff
--- a/view/PaneStack.cpp Mon Apr 02 12:12:36 2007 +0000 +++ b/view/PaneStack.cpp Mon Apr 16 12:20:27 2007 +0000 @@ -121,6 +121,16 @@ } void +PaneStack::setPropertyStackMinWidth(int mw) +{ + for (std::vector<PaneRec>::iterator i = m_panes.begin(); + i != m_panes.end(); ++i) { + i->propertyStack->setMinimumWidth(mw); + } + m_propertyStackMinWidth = mw; +} + +void PaneStack::setLayoutStyle(LayoutStyle style) { if (style == m_layoutStyle) return; @@ -410,6 +420,8 @@ { int maxMinWidth = 0; + if (m_propertyStackMinWidth > 0) maxMinWidth = m_propertyStackMinWidth; + for (size_t i = 0; i < m_panes.size(); ++i) { if (!m_panes[i].propertyStack) continue; // std::cerr << "PaneStack::sizePropertyStacks: " << i << ": min " @@ -426,6 +438,8 @@ #ifdef Q_WS_MAC // This is necessary to compensate for cb->setMinimumSize(10, 10) // in PropertyBox in the Mac version (to avoid a mysterious crash) + + //!!! is this still necessary with qt4.2? int setWidth = maxMinWidth * 3 / 2; #else int setWidth = maxMinWidth;