summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-08 10:39:57 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-09 10:19:48 +0000
commitfcedf8998ebab0c67b2e606b2e89e738e0137a3d (patch)
tree3d117c4652d0c12fe0328c50561328a2a18b289c
parent893f2ade8573af56f761a1361dfe1e1f03154bdd (diff)
fortuneserver/fortuneclient: Fix layout for WinRT.
Use the new API QStyleHints::showIsMaximized(). Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r--examples/network/fortuneclient/client.cpp2
-rw-r--r--examples/network/fortuneserver/server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index b4c3d9328d..42fed30445 100644
--- a/examples/network/fortuneclient/client.cpp
+++ b/examples/network/fortuneclient/client.cpp
@@ -117,7 +117,7 @@ Client::Client(QWidget *parent)
//! [4]
QGridLayout *mainLayout = Q_NULLPTR;
- if (QGuiApplication::styleHints()->showIsFullScreen()) {
+ if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;
diff --git a/examples/network/fortuneserver/server.cpp b/examples/network/fortuneserver/server.cpp
index 28f0230894..089f594cab 100644
--- a/examples/network/fortuneserver/server.cpp
+++ b/examples/network/fortuneserver/server.cpp
@@ -100,7 +100,7 @@ Server::Server(QWidget *parent)
buttonLayout->addStretch(1);
QVBoxLayout *mainLayout = Q_NULLPTR;
- if (QGuiApplication::styleHints()->showIsFullScreen()) {
+ if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;