diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-04-20 16:17:18 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-05-02 09:19:03 +0000 |
commit | 1b30990f24e6cf2150b268ece841857eed7222a0 (patch) | |
tree | 20fee089a0c7ded9221b45831e65c20314426231 /src/plugins/coreplugin/navigationwidget.h | |
parent | 8eacd5af69043488773f02cf0df436d1abf92bd5 (diff) | |
download | qt-creator-1b30990f24e6cf2150b268ece841857eed7222a0.tar.gz |
Fix left sidebar width after switching modes
After switching to debug mode, hiding left sidebar, switching back to
edit, and showing left sidebar, the sidebar had very small width.
We may not calculate the splitter sizes for each placeholder
individually, because setting them on the splitter might distribute them
in a weird way when widgets are hidden. In the above example switching
back to edit mode while both sidebars are hidden triggered something
similar to the following updates:
Left side bar update:
- calculated: (300, 1000, 0)
- actual resulting: (0, 1000, 0)
Right side bar update:
- calculated: (0, 1000, 300)
- actual resulting: (100, 900, 0)
In the longer run it would probably be better handle the resizing in a
more centralized way, since now it sets the same sizes twice (once for
each side bar update).
Task-number: QTCREATORBUG-18009
Change-Id: Ife5d6f1caded55f444245f4c3c98ae05371363b8
Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/navigationwidget.h')
-rw-r--r-- | src/plugins/coreplugin/navigationwidget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/navigationwidget.h b/src/plugins/coreplugin/navigationwidget.h index 08d2e29f91..4de2d8d95c 100644 --- a/src/plugins/coreplugin/navigationwidget.h +++ b/src/plugins/coreplugin/navigationwidget.h @@ -58,10 +58,11 @@ public: virtual ~NavigationWidgetPlaceHolder(); static NavigationWidgetPlaceHolder *current(Side side); static void setCurrent(Side side, NavigationWidgetPlaceHolder *navWidget); - void applyStoredSize(int width); + void applyStoredSize(); private: void currentModeAboutToChange(Id mode); + int storedWidth() const; Id m_mode; Side m_side; |