aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/welcome
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-10-31 14:48:52 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2023-10-31 14:32:59 +0000
commit76a8f81ea7b3fe163ad2072342e77db993e31be9 (patch)
tree80b84bb7f4663b0667e4c81bd805833c6c04bb1b /src/plugins/welcome
parent141cf78b2d51ed80b828649d14a302c7303d835b (diff)
Welcome: Fix initial welcome screen layout for small window
The visibility of some Welcome screen elements depends on the size of the Welcome screen. When starting Qt Creator with a small initial window size, the hiding of the side bar did not work. This change removes the check for visibility as the main fix for QTCREATORBUG-29800. The QTimer::singleShot is replaced with immediate layout calculation in order to avoid another initial layout issue which is only visible during startup. Amends: 1c24ef6406d56c4e5e45741caf5ea023ae5f9f31 Fixes: QTCREATORBUG-29800 Change-Id: I4b058791f2ed2e85b9cbca932585b71a985445f9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r--src/plugins/welcome/welcomeplugin.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 342375c4e2f..c0a2f25ac94 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -80,8 +80,7 @@ signals:
void ResizeSignallingWidget::resizeEvent(QResizeEvent *event)
{
- if (isVisible())
- emit resized(event->size(), event->oldSize());
+ emit resized(event->size(), event->oldSize());
}
class WelcomeMode : public IMode
@@ -357,11 +356,9 @@ WelcomeMode::WelcomeMode()
const bool hideSideArea = size.width() <= 750;
const bool hideBottomArea = size.width() <= 850;
const bool compactVertically = size.height() <= 530;
- QTimer::singleShot(0, this, [this, hideSideArea, hideBottomArea, compactVertically] {
- m_sideArea->setVisible(!hideSideArea);
- m_bottomArea->setVisible(!(hideBottomArea || compactVertically));
- m_topArea->setCompact(compactVertically);
- });
+ m_sideArea->setVisible(!hideSideArea);
+ m_bottomArea->setVisible(!(hideBottomArea || compactVertically));
+ m_topArea->setCompact(compactVertically);
});
m_sideArea = new SideArea(m_modeWidget);