# HG changeset patch # User Chris Cannam # Date 1176726027 0 # Node ID efadb9d2b2c6cb9f90e9320860eceea3d968ea9a # Parent b4809e942e7d5c9b96207fb31b6459231999d872 * 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 diff -r b4809e942e7d -r efadb9d2b2c6 view/PaneStack.cpp --- 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::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; diff -r b4809e942e7d -r efadb9d2b2c6 view/PaneStack.h --- a/view/PaneStack.h Mon Apr 02 12:12:36 2007 +0000 +++ b/view/PaneStack.h Mon Apr 16 12:20:27 2007 +0000 @@ -63,6 +63,8 @@ LayoutStyle getLayoutStyle() const { return m_layoutStyle; } void setLayoutStyle(LayoutStyle style); + void setPropertyStackMinWidth(int mw); + signals: void currentPaneChanged(Pane *pane); void currentLayerChanged(Pane *pane, Layer *layer); @@ -97,6 +99,7 @@ QStackedWidget *m_propertyStackStack; ViewManager *m_viewManager; // I don't own this + int m_propertyStackMinWidth; void sizePropertyStacks(); LayoutStyle m_layoutStyle; diff -r b4809e942e7d -r efadb9d2b2c6 view/View.cpp --- a/view/View.cpp Mon Apr 02 12:12:36 2007 +0000 +++ b/view/View.cpp Mon Apr 16 12:20:27 2007 +0000 @@ -55,7 +55,6 @@ m_manager(0), m_propertyContainer(new ViewPropertyContainer(this)) { -// QWidget::setAttribute(Qt::WA_PaintOnScreen); } View::~View() @@ -557,7 +556,11 @@ } m_manager = manager; - if (m_followPan) setCentreFrame(m_manager->getGlobalCentreFrame(), false); + if (m_followPlay != PlaybackIgnore) { + setCentreFrame(m_manager->getPlaybackFrame(), false); + } else if (m_followPan) { + setCentreFrame(m_manager->getGlobalCentreFrame(), false); + } if (m_followZoom) setZoomLevel(m_manager->getGlobalZoom()); connect(m_manager, SIGNAL(globalCentreFrameChanged(unsigned long)),