mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix full screen button show/hide depending on the theme.
This commit is contained in:
parent
e7922a0e51
commit
61ac25bb7b
@ -102,7 +102,7 @@ YACReaderLibraryToolbar::YACReaderLibraryToolbar(QMainWindow *mainWindow, bool i
|
||||
macosxToolbar->attachToWindow(mainWindow->windowHandle());
|
||||
#endif
|
||||
} else {
|
||||
defaultToolbar = new YACReaderMainToolBar(mainWindow);
|
||||
defaultToolbar = new YACReaderMainToolBar(!useNativeFullScreen, mainWindow);
|
||||
auto actualSearchEdit = new YACReaderSearchLineEdit();
|
||||
searchEdit = new YACReaderLibrarySearchEdit(actualSearchEdit);
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <QPaintEvent>
|
||||
#include <QAction>
|
||||
|
||||
YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
YACReaderMainToolBar::YACReaderMainToolBar(bool enableFullscreen, QWidget *parent)
|
||||
: QWidget(parent), enableFullscreen(enableFullscreen)
|
||||
{
|
||||
mainLayout = new QHBoxLayout;
|
||||
|
||||
@ -69,7 +69,7 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent)
|
||||
|
||||
mainLayout->addWidget(toggleComicsViewButton, 0, Qt::AlignVCenter);
|
||||
|
||||
if (!fullscreenButton->actions().isEmpty()) {
|
||||
if (enableFullscreen) {
|
||||
addWideDivider();
|
||||
mainLayout->addWidget(fullscreenButton, 0, Qt::AlignVCenter);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class YACReaderMainToolBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderMainToolBar(QWidget *parent = nullptr);
|
||||
explicit YACReaderMainToolBar(bool enableFullscreen, QWidget *parent = nullptr);
|
||||
QSize sizeHint() const override;
|
||||
|
||||
QToolButton *backButton;
|
||||
@ -35,6 +35,8 @@ private:
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
|
||||
bool enableFullscreen;
|
||||
|
||||
QHBoxLayout *mainLayout;
|
||||
|
||||
QLabel *currentFolder;
|
||||
|
Loading…
Reference in New Issue
Block a user