Commit fcedf899 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

fortuneserver/fortuneclient: Fix layout for WinRT.


Use the new API QStyleHints::showIsMaximized().

Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4
Reviewed-by: default avatarOliver Wolff <oliver.wolff@theqtcompany.com>
Showing with 2 additions and 2 deletions
...@@ -117,7 +117,7 @@ Client::Client(QWidget *parent) ...@@ -117,7 +117,7 @@ Client::Client(QWidget *parent)
//! [4] //! [4]
QGridLayout *mainLayout = Q_NULLPTR; QGridLayout *mainLayout = Q_NULLPTR;
if (QGuiApplication::styleHints()->showIsFullScreen()) { if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this); QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding)); outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout; QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;
......
...@@ -100,7 +100,7 @@ Server::Server(QWidget *parent) ...@@ -100,7 +100,7 @@ Server::Server(QWidget *parent)
buttonLayout->addStretch(1); buttonLayout->addStretch(1);
QVBoxLayout *mainLayout = Q_NULLPTR; QVBoxLayout *mainLayout = Q_NULLPTR;
if (QGuiApplication::styleHints()->showIsFullScreen()) { if (QGuiApplication::styleHints()->showIsFullScreen() || QGuiApplication::styleHints()->showIsMaximized()) {
QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this); QVBoxLayout *outerVerticalLayout = new QVBoxLayout(this);
outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding)); outerVerticalLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
QHBoxLayout *outerHorizontalLayout = new QHBoxLayout; QHBoxLayout *outerHorizontalLayout = new QHBoxLayout;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment