Mercurial > hg > svgui
changeset 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 | b4809e942e7d |
children | 90122740323f |
files | view/PaneStack.cpp view/PaneStack.h view/View.cpp |
diffstat | 3 files changed, 22 insertions(+), 2 deletions(-) [+] |
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;
--- 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;
--- 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)),