From fcedf8998ebab0c67b2e606b2e89e738e0137a3d Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Date: Tue, 8 Dec 2015 10:39:57 +0100
Subject: [PATCH] fortuneserver/fortuneclient: Fix layout for WinRT.

Use the new API QStyleHints::showIsMaximized().

Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
---
 examples/network/fortuneclient/client.cpp | 2 +-
 examples/network/fortuneserver/server.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/network/fortuneclient/client.cpp b/examples/network/fortuneclient/client.cpp
index b4c3d9328d6..42fed304453 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 28f02308944..089f594cabb 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;
-- 
GitLab