diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 0067ed4..bc67b15 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -1898,6 +1898,7 @@ void Filmstrip::setOrientation(bool isVertical) { m_frameArea->horizontalScrollBar()->setObjectName("LevelStripScrollBar"); } m_frames->setOrientation(m_isVertical); + dynamic_cast(parentWidget())->setCanFixWidth(m_isVertical); } // SaveLoadQSettings diff --git a/toonz/sources/toonzqt/docklayout.cpp b/toonz/sources/toonzqt/docklayout.cpp index 65cd369..f42d1b6 100644 --- a/toonz/sources/toonzqt/docklayout.cpp +++ b/toonz/sources/toonzqt/docklayout.cpp @@ -424,7 +424,7 @@ void DockLayout::applyTransform(const QTransform &transform) { // check if the region will be with fixed width bool Region::checkWidgetsToBeFixedWidth(std::vector &widgets) { if (m_item) { - if ( // m_item->objectName() == "FilmStrip" || + if ( (m_item->objectName() == "FilmStrip" && m_item->getCanFixWidth()) || m_item->objectName() == "StyleEditor") { widgets.push_back(m_item); return true; diff --git a/toonz/sources/toonzqt/docklayout.h b/toonz/sources/toonzqt/docklayout.h index 842a46a..6502aad 100644 --- a/toonz/sources/toonzqt/docklayout.h +++ b/toonz/sources/toonzqt/docklayout.h @@ -171,6 +171,9 @@ class DVAPI DockWidget : public QFrame { public: void maximizeDock(); + bool getCanFixWidth() { return m_canFixWidth; } + void setCanFixWidth(bool fixed) { m_canFixWidth = fixed; } + protected: // Private attributes for dragging purposes bool m_floating; // Whether this window is floating or docked @@ -186,6 +189,12 @@ protected: // Maximization bool m_maximized; + // Level Strip and Style Editor use a fixed width on + // window resize to minimize user frustration + // This variable is only used by Level Strip right now. + // This is only true if the level strip is vertical. + bool m_canFixWidth = false; + private: QPoint m_dragInitialPos; QPoint m_dragMouseInitialPos;