From 965e8be2fe8e555e6deb8087bea296e697d3f56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 11 Sep 2018 16:51:10 +0200 Subject: [PATCH] Show the full screen button only if it has actions assigned. --- YACReaderLibrary/yacreader_main_toolbar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/yacreader_main_toolbar.cpp b/YACReaderLibrary/yacreader_main_toolbar.cpp index bdce96ee..378e56a7 100644 --- a/YACReaderLibrary/yacreader_main_toolbar.cpp +++ b/YACReaderLibrary/yacreader_main_toolbar.cpp @@ -68,8 +68,11 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent) mainLayout->addStretch(); mainLayout->addWidget(toggleComicsViewButton, 0, Qt::AlignVCenter); - addWideDivider(); - mainLayout->addWidget(fullscreenButton, 0, Qt::AlignVCenter); + + if (!fullscreenButton->actions().isEmpty()) { + addWideDivider(); + mainLayout->addWidget(fullscreenButton, 0, Qt::AlignVCenter); + } setLayout(mainLayout);