]> git.sesse.net Git - vlc/commit
Qt: make ground for proper main interface size management
authorJakob Leben <jleben@videolan.org>
Sat, 27 Mar 2010 21:24:50 +0000 (22:24 +0100)
committerJakob Leben <jleben@videolan.org>
Sat, 27 Mar 2010 22:51:16 +0000 (23:51 +0100)
commit9d9ffe9fba7946afcf6f20f1de9f6b6a3b644f37
tree3b3b898ef2497407930c613e7529c054b87161b2
parent02ee6240a9a2c0998054c5aaa6fcd945e63bf157
Qt: make ground for proper main interface size management

- Simplify switching between widgets in central stack: showTab() allows
switching only between two states - video state and playlist state - and
does everything needed according to circumstances

- Do not setMinimumWidth/Height/Size() on main interface, because it
inhibits children sizeHint() evaluation, thus preventing interface
self-adjustment when controls are added/removed or shown/hidden.

- Subclass QStackedWidget so it's minimumSizeHint() matches exactly
the one of the currentWidget(), and not the sum of all children.

- Suggest compact mode implementation (commented out for now):
setSizeConstraint( QLayout::SetFixedSize ) on main interface layout.
This automatically keeps and adjusts fixed size in respect to
sizeHint() of children.
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp