comparison 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
comparison
equal deleted inserted replaced
234:b4809e942e7d 235:efadb9d2b2c6
116 if (!m_currentPane) { 116 if (!m_currentPane) {
117 setCurrentPane(pane); 117 setCurrentPane(pane);
118 } 118 }
119 119
120 return pane; 120 return pane;
121 }
122
123 void
124 PaneStack::setPropertyStackMinWidth(int mw)
125 {
126 for (std::vector<PaneRec>::iterator i = m_panes.begin();
127 i != m_panes.end(); ++i) {
128 i->propertyStack->setMinimumWidth(mw);
129 }
130 m_propertyStackMinWidth = mw;
121 } 131 }
122 132
123 void 133 void
124 PaneStack::setLayoutStyle(LayoutStyle style) 134 PaneStack::setLayoutStyle(LayoutStyle style)
125 { 135 {
408 void 418 void
409 PaneStack::sizePropertyStacks() 419 PaneStack::sizePropertyStacks()
410 { 420 {
411 int maxMinWidth = 0; 421 int maxMinWidth = 0;
412 422
423 if (m_propertyStackMinWidth > 0) maxMinWidth = m_propertyStackMinWidth;
424
413 for (size_t i = 0; i < m_panes.size(); ++i) { 425 for (size_t i = 0; i < m_panes.size(); ++i) {
414 if (!m_panes[i].propertyStack) continue; 426 if (!m_panes[i].propertyStack) continue;
415 // std::cerr << "PaneStack::sizePropertyStacks: " << i << ": min " 427 // std::cerr << "PaneStack::sizePropertyStacks: " << i << ": min "
416 // << m_panes[i].propertyStack->minimumSizeHint().width() << ", current " 428 // << m_panes[i].propertyStack->minimumSizeHint().width() << ", current "
417 // << m_panes[i].propertyStack->width() << std::endl; 429 // << m_panes[i].propertyStack->width() << std::endl;
424 // std::cerr << "PaneStack::sizePropertyStacks: max min width " << maxMinWidth << std::endl; 436 // std::cerr << "PaneStack::sizePropertyStacks: max min width " << maxMinWidth << std::endl;
425 437
426 #ifdef Q_WS_MAC 438 #ifdef Q_WS_MAC
427 // This is necessary to compensate for cb->setMinimumSize(10, 10) 439 // This is necessary to compensate for cb->setMinimumSize(10, 10)
428 // in PropertyBox in the Mac version (to avoid a mysterious crash) 440 // in PropertyBox in the Mac version (to avoid a mysterious crash)
441
442 //!!! is this still necessary with qt4.2?
429 int setWidth = maxMinWidth * 3 / 2; 443 int setWidth = maxMinWidth * 3 / 2;
430 #else 444 #else
431 int setWidth = maxMinWidth; 445 int setWidth = maxMinWidth;
432 #endif 446 #endif
433 447