diff --git a/app/actionmanager.cpp b/app/actionmanager.cpp index f8b44ff..507a7c7 100644 --- a/app/actionmanager.cpp +++ b/app/actionmanager.cpp @@ -48,25 +48,25 @@ void ActionManager::setupAction(MainWindow *mainWindow) }; #define CREATE_NEW_ICON_ACTION(w, a, i) create_action(w, &a, ICON_NAME(i), ACTION_NAME(a)) CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, zoom-original); - CREATE_NEW_ICON_ACTION(mainWindow, actionToggleMaximize, view-fullscreen); + CREATE_NEW_ICON_ACTION(mainWindow, actionFitInView, fit-in-view); + CREATE_NEW_ICON_ACTION(mainWindow, actionHorizontalFlip, horizontal-flip); CREATE_NEW_ICON_ACTION(mainWindow, actionZoomIn, zoom-in); CREATE_NEW_ICON_ACTION(mainWindow, actionZoomOut, zoom-out); CREATE_NEW_ICON_ACTION(mainWindow, actionToggleCheckerboard, view-background-checkerboard); CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, object-rotate-right); + CREATE_NEW_ICON_ACTION(mainWindow, actionRotateCounterClockwise, object-rotate-left); + CREATE_NEW_ICON_ACTION(mainWindow, actionPrevPicture, go-previous); + CREATE_NEW_ICON_ACTION(mainWindow, actionNextPicture, go-next); #undef CREATE_NEW_ICON_ACTION #define CREATE_NEW_ACTION(w, a) create_action(w, &a, QString(), ACTION_NAME(a)) #define CREATE_NEW_THEMEICON_ACTION(w, a, i) create_action(w, &a, QLatin1String(STRIFY(i)), ACTION_NAME(a), true) - CREATE_NEW_ACTION(mainWindow, actionRotateCounterClockwise); - CREATE_NEW_ACTION(mainWindow, actionPrevPicture); - CREATE_NEW_ACTION(mainWindow, actionNextPicture); + CREATE_NEW_ACTION(mainWindow, actionToggleMaximize); CREATE_NEW_ACTION(mainWindow, actionTogglePauseAnimation); CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame); CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open); - CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip); - CREATE_NEW_ACTION(mainWindow, actionFitInView); CREATE_NEW_ACTION(mainWindow, actionFitByWidth); CREATE_NEW_THEMEICON_ACTION(mainWindow, actionCopyPixmap, edit-copy); CREATE_NEW_ACTION(mainWindow, actionCopyFilePath); @@ -161,3 +161,8 @@ void ActionManager::setupShortcuts() }); } +void ActionManager::setPrevNextPictureActionEnabled(bool enabled) +{ + actionPrevPicture->setEnabled(enabled); + actionNextPicture->setEnabled(enabled); +} diff --git a/app/actionmanager.h b/app/actionmanager.h index 314b107..0a50171 100644 --- a/app/actionmanager.h +++ b/app/actionmanager.h @@ -18,6 +18,7 @@ public: void setupAction(MainWindow * mainWindow); void retranslateUi(MainWindow *MainWindow); void setupShortcuts(); + void setPrevNextPictureActionEnabled(bool enabled); static QIcon loadHidpiIcon(const QString &resp, QSize sz = QSize(32, 32)); diff --git a/app/bottombuttongroup.cpp b/app/bottombuttongroup.cpp index 8d0234d..56549f6 100644 --- a/app/bottombuttongroup.cpp +++ b/app/bottombuttongroup.cpp @@ -21,11 +21,7 @@ BottomButtonGroup::BottomButtonGroup(const std::vector &actionList, Q this->setLayout(mainLayout); this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); this->setStyleSheet("BottomButtonGroup {" - "border: 1px solid gray;" - "border-top-left-radius: 10px;" - "border-top-right-radius: 10px;" "border-style: none;" - "background-color:rgba(0,0,0,120)" "}" "QToolButton {" "background:transparent;" @@ -45,6 +41,7 @@ BottomButtonGroup::BottomButtonGroup(const std::vector &actionList, Q for (QAction * action : actionList) { addButton(newActionBtn(action)); } + } void BottomButtonGroup::setOpacity(qreal opacity, bool animated) diff --git a/app/framelesswindow.cpp b/app/framelesswindow.cpp index d5c0a39..c9befa4 100644 --- a/app/framelesswindow.cpp +++ b/app/framelesswindow.cpp @@ -14,22 +14,9 @@ FramelessWindow::FramelessWindow(QWidget *parent) : QWidget(parent) , m_centralLayout(new QVBoxLayout(this)) - , m_oldCursorShape(Qt::ArrowCursor) - , m_oldEdges() { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint); -#else - // There is a bug in Qt 5 that will make pressing Meta+Up cause the app - // fullscreen under Windows, see QTBUG-91226 to learn more. - // The bug seems no longer exists in Qt 6 (I only tested it under Qt 6.3.0). - this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint); -#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - this->setMouseTracking(true); - this->setAttribute(Qt::WA_Hover, true); - this->installEventFilter(this); - - m_centralLayout->setContentsMargins(QMargins()); + this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); + m_centralLayout->setContentsMargins(QMargins(0, 0, 0, 60)); } void FramelessWindow::setCentralWidget(QWidget *widget) @@ -42,106 +29,3 @@ void FramelessWindow::setCentralWidget(QWidget *widget) m_centralLayout->addWidget(widget); m_centralWidget = widget; } - -void FramelessWindow::installResizeCapture(QObject* widget) -{ - widget->installEventFilter(this); -} - -bool FramelessWindow::eventFilter(QObject* o, QEvent* e) -{ - switch (e->type()) { - case QEvent::HoverMove: - { - QWidget* wg = qobject_cast(o); - if (wg != nullptr) - return mouseHover(static_cast(e), wg); - - break; - } - case QEvent::MouseButtonPress: - return mousePress(static_cast(e)); - } - - return QWidget::eventFilter(o, e); -} - -bool FramelessWindow::mouseHover(QHoverEvent* event, QWidget* wg) -{ - if (!isMaximized() && !isFullScreen()) { - QWindow* win = window()->windowHandle(); - Qt::Edges edges = this->getEdgesByPos(wg->mapToGlobal(event->oldPos()), win->frameGeometry()); - - // backup & restore cursor shape - if (edges && !m_oldEdges) - // entering the edge. backup cursor shape - m_oldCursorShape = win->cursor().shape(); - if (!edges && m_oldEdges) - // leaving the edge. restore cursor shape - win->setCursor(m_oldCursorShape); - - // save the latest edges status - m_oldEdges = edges; - - // show resize cursor shape if cursor is within border - if (edges) { - win->setCursor(this->getCursorByEdge(edges, Qt::ArrowCursor)); - return true; - } - } - - return false; -} - -bool FramelessWindow::mousePress(QMouseEvent* event) -{ - if (event->buttons() & Qt::LeftButton && !isMaximized() && !isFullScreen()) { - QWindow* win = window()->windowHandle(); -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - Qt::Edges edges = this->getEdgesByPos(event->globalPosition().toPoint(), win->frameGeometry()); -#else - Qt::Edges edges = this->getEdgesByPos(event->globalPos(), win->frameGeometry()); -#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - if (edges) { - win->startSystemResize(edges); - return true; - } - } - - return false; -} - -Qt::CursorShape FramelessWindow::getCursorByEdge(const Qt::Edges& edges, Qt::CursorShape default_cursor) -{ - if ((edges == (Qt::TopEdge | Qt::LeftEdge)) || (edges == (Qt::RightEdge | Qt::BottomEdge))) - return Qt::SizeFDiagCursor; - else if ((edges == (Qt::TopEdge | Qt::RightEdge)) || (edges == (Qt::LeftEdge | Qt::BottomEdge))) - return Qt::SizeBDiagCursor; - else if (edges & (Qt::TopEdge | Qt::BottomEdge)) - return Qt::SizeVerCursor; - else if (edges & (Qt::LeftEdge | Qt::RightEdge)) - return Qt::SizeHorCursor; - else - return default_cursor; -} - -Qt::Edges FramelessWindow::getEdgesByPos(const QPoint gpos, const QRect& winrect) -{ - const int borderWidth = 8; - Qt::Edges edges; - - int x = gpos.x() - winrect.x(); - int y = gpos.y() - winrect.y(); - - if (x < borderWidth) - edges |= Qt::LeftEdge; - if (x > (winrect.width() - borderWidth)) - edges |= Qt::RightEdge; - if (y < borderWidth) - edges |= Qt::TopEdge; - if (y > (winrect.height() - borderWidth)) - edges |= Qt::BottomEdge; - - return edges; -} - diff --git a/app/framelesswindow.h b/app/framelesswindow.h index 95d9c2e..75eb43b 100644 --- a/app/framelesswindow.h +++ b/app/framelesswindow.h @@ -16,22 +16,9 @@ class FramelessWindow : public QWidget Q_OBJECT public: explicit FramelessWindow(QWidget *parent = nullptr); - void setCentralWidget(QWidget * widget); - void installResizeCapture(QObject* widget); - -protected: - bool eventFilter(QObject *o, QEvent *e) override; - bool mouseHover(QHoverEvent* event, QWidget* wg); - bool mousePress(QMouseEvent* event); private: - Qt::Edges m_oldEdges; - Qt::CursorShape m_oldCursorShape; - - Qt::CursorShape getCursorByEdge(const Qt::Edges& edges, Qt::CursorShape default_cursor); - Qt::Edges getEdgesByPos(const QPoint pos, const QRect& winrect); - QVBoxLayout * m_centralLayout = nullptr; QWidget * m_centralWidget = nullptr; // just a pointer, doesn't take the ownership. }; diff --git a/app/graphicsscene.cpp b/app/graphicsscene.cpp index 101e2a7..1966bd6 100644 --- a/app/graphicsscene.cpp +++ b/app/graphicsscene.cpp @@ -119,7 +119,7 @@ void GraphicsScene::showText(const QString &text) { this->clear(); QGraphicsTextItem * textItem = this->addText(text); - textItem->setDefaultTextColor(QColor("White")); + textItem->setDefaultTextColor(QColor("Black")); m_theThing = textItem; this->setSceneRect(m_theThing->boundingRect()); } diff --git a/app/graphicsview.cpp b/app/graphicsview.cpp index f5b7555..f04cfe6 100644 --- a/app/graphicsview.cpp +++ b/app/graphicsview.cpp @@ -22,8 +22,7 @@ GraphicsView::GraphicsView(QWidget *parent) setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setResizeAnchor(QGraphicsView::AnchorUnderMouse); setTransformationAnchor(QGraphicsView::AnchorUnderMouse); - setStyleSheet("background-color: rgba(0, 0, 0, 220);" - "border-radius: 3px;"); + setStyleSheet("border-style: none;"); setAcceptDrops(false); setCheckerboardEnabled(false); diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 5dbf2b9..53d2b9c 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -5,7 +5,6 @@ #include "mainwindow.h" #include "settings.h" -#include "toolbutton.h" #include "bottombuttongroup.h" #include "graphicsview.h" #include "navigatorview.h" @@ -54,31 +53,12 @@ MainWindow::MainWindow(QWidget *parent) this->setWindowFlag(Qt::WindowStaysOnTopHint); } - this->setAttribute(Qt::WA_TranslucentBackground, true); - this->setMinimumSize(350, 330); + this->setMinimumSize(600, 400); this->setWindowIcon(QIcon(":/icons/app-icon.svg")); - this->setMouseTracking(true); this->setAcceptDrops(true); m_pm->setAutoLoadFilterSuffixes(supportedImageFormats()); - m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"); - m_fadeOutAnimation->setDuration(300); - m_fadeOutAnimation->setStartValue(1); - m_fadeOutAnimation->setEndValue(0); - m_floatUpAnimation = new QPropertyAnimation(this, "geometry"); - m_floatUpAnimation->setDuration(300); - m_floatUpAnimation->setEasingCurve(QEasingCurve::OutCirc); - m_exitAnimationGroup = new QParallelAnimationGroup(this); - m_exitAnimationGroup->addAnimation(m_fadeOutAnimation); - m_exitAnimationGroup->addAnimation(m_floatUpAnimation); - connect(m_exitAnimationGroup, &QParallelAnimationGroup::finished, -#ifdef Q_OS_MAC - this, &QWidget::hide); -#else - this, &QWidget::close); -#endif - GraphicsScene * scene = new GraphicsScene(this); m_graphicsView = new GraphicsView(this); @@ -86,7 +66,7 @@ MainWindow::MainWindow(QWidget *parent) this->setCentralWidget(m_graphicsView); m_gv = new NavigatorView(this); - m_gv->setFixedSize(220, 160); + m_gv->setFixedSize(82, 60); m_gv->setScene(scene); m_gv->setMainView(m_graphicsView); m_gv->fitInView(m_gv->sceneRect(), Qt::KeepAspectRatio); @@ -102,48 +82,25 @@ MainWindow::MainWindow(QWidget *parent) connect(m_graphicsView, &GraphicsView::viewportRectChanged, m_gv, &NavigatorView::updateMainViewportRegion); - m_closeButton = new ToolButton(true, m_graphicsView); - m_closeButton->setIconSize(QSize(32, 32)); - m_closeButton->setFixedSize(QSize(50, 50)); - m_closeButton->setIconResourcePath(":/icons/window-close.svg"); - - connect(m_closeButton, &QAbstractButton::clicked, - this, &MainWindow::closeWindow); - - m_prevButton = new ToolButton(false, m_graphicsView); - m_prevButton->setIconSize(QSize(75, 75)); - m_prevButton->setIconResourcePath(":/icons/go-previous.svg"); - m_prevButton->setVisible(false); - m_prevButton->setOpacity(0, false); - m_nextButton = new ToolButton(false, m_graphicsView); - m_nextButton->setIconSize(QSize(75, 75)); - m_nextButton->setIconResourcePath(":/icons/go-next.svg"); - m_nextButton->setVisible(false); - m_nextButton->setOpacity(0, false); - - connect(m_prevButton, &QAbstractButton::clicked, - this, &MainWindow::galleryPrev); - connect(m_nextButton, &QAbstractButton::clicked, - this, &MainWindow::galleryNext); - m_am->setupAction(this); + m_am->setPrevNextPictureActionEnabled(false); m_bottomButtonGroup = new BottomButtonGroup({ m_am->actionActualSize, - m_am->actionToggleMaximize, + m_am->actionFitInView, m_am->actionZoomIn, m_am->actionZoomOut, - m_am->actionToggleCheckerboard, - m_am->actionRotateClockwise + m_am->actionPrevPicture, + m_am->actionNextPicture, + m_am->actionRotateCounterClockwise, + m_am->actionRotateClockwise, + m_am->actionHorizontalFlip, + m_am->actionToggleCheckerboard }, this); - - m_bottomButtonGroup->setOpacity(0, false); - m_gv->setOpacity(0, false); - m_closeButton->setOpacity(0, false); + m_bottomButtonGroup->setFixedHeight(60); connect(m_pm, &PlaylistManager::totalCountChanged, this, [this](int galleryFileCount) { - m_prevButton->setVisible(galleryFileCount > 1); - m_nextButton->setVisible(galleryFileCount > 1); + m_am->setPrevNextPictureActionEnabled(galleryFileCount > 1); }); connect(m_pm->model(), &PlaylistModel::modelReset, this, std::bind(&MainWindow::galleryCurrent, this, false, false)); @@ -164,12 +121,6 @@ MainWindow::MainWindow(QWidget *parent) Settings::instance()->applyUserShortcuts(this); }); - // allow some mouse events can go through these widgets for resizing window. - installResizeCapture(m_closeButton); - installResizeCapture(m_graphicsView); - installResizeCapture(m_graphicsView->viewport()); - installResizeCapture(m_gv); - installResizeCapture(m_gv->viewport()); } MainWindow::~MainWindow() @@ -304,75 +255,6 @@ void MainWindow::showEvent(QShowEvent *event) return FramelessWindow::showEvent(event); } -void MainWindow::enterEvent(QT_ENTER_EVENT *event) -{ - m_bottomButtonGroup->setOpacity(1); - m_gv->setOpacity(1); - - m_closeButton->setOpacity(1); - m_prevButton->setOpacity(1); - m_nextButton->setOpacity(1); - - return FramelessWindow::enterEvent(event); -} - -void MainWindow::leaveEvent(QEvent *event) -{ - m_bottomButtonGroup->setOpacity(0); - m_gv->setOpacity(0); - - m_closeButton->setOpacity(0); - m_prevButton->setOpacity(0); - m_nextButton->setOpacity(0); - - return FramelessWindow::leaveEvent(event); -} - -void MainWindow::mousePressEvent(QMouseEvent *event) -{ - if (event->buttons() & Qt::LeftButton && !isMaximized()) { - m_clickedOnWindow = true; - m_oldMousePos = event->pos(); -// qDebug() << m_oldMousePos << m_graphicsView->transform().m11() -// << m_graphicsView->transform().m22() << m_graphicsView->matrix().m12(); - event->accept(); - } - - return FramelessWindow::mousePressEvent(event); -} - -void MainWindow::mouseMoveEvent(QMouseEvent *event) -{ - if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized() && !isFullScreen()) { - if (!window()->windowHandle()->startSystemMove()) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - move(event->globalPosition().toPoint() - m_oldMousePos); -#else - move(event->globalPos() - m_oldMousePos); -#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - } - event->accept(); - } - - return FramelessWindow::mouseMoveEvent(event); -} - -void MainWindow::mouseReleaseEvent(QMouseEvent *event) -{ - m_clickedOnWindow = false; - - // It seems the forward/back mouse button won't generate a key event [1] so we can't use - // QShortcut or QKeySequence to indicate these shortcuts, so we do it here. - // Reference: - // [1]: https://codereview.qt-project.org/c/qt/qtbase/+/177475 - if (event->button() == Qt::ForwardButton || event->button() == Qt::BackButton) { - event->button() == Qt::BackButton ? galleryPrev() : galleryNext(); - event->accept(); - } - - return FramelessWindow::mouseReleaseEvent(event); -} - void MainWindow::mouseDoubleClickEvent(QMouseEvent *event) { // The forward/back mouse button can also used to trigger a mouse double-click event @@ -584,20 +466,12 @@ void MainWindow::centerWindow() void MainWindow::closeWindow() { - QRect windowRect(this->geometry()); - m_floatUpAnimation->setStartValue(windowRect); - m_floatUpAnimation->setEndValue(windowRect.adjusted(0, -80, 0, 0)); - m_floatUpAnimation->setStartValue(QRect(this->geometry().x(), this->geometry().y(), this->geometry().width(), this->geometry().height())); - m_floatUpAnimation->setEndValue(QRect(this->geometry().x(), this->geometry().y()-80, this->geometry().width(), this->geometry().height())); - m_exitAnimationGroup->start(); + // YYC Mark: Exit animation is not supported in Remix fork. + this->close(); } void MainWindow::updateWidgetsPosition() { - m_closeButton->move(width() - m_closeButton->width(), 0); - m_prevButton->move(25, (height() - m_prevButton->sizeHint().height()) / 2); - m_nextButton->move(width() - m_nextButton->sizeHint().width() - 25, - (height() - m_prevButton->sizeHint().height()) / 2); m_bottomButtonGroup->move((width() - m_bottomButtonGroup->width()) / 2, height() - m_bottomButtonGroup->height()); m_gv->move(width() - m_gv->width(), height() - m_gv->height()); @@ -606,9 +480,7 @@ void MainWindow::updateWidgetsPosition() void MainWindow::toggleProtectedMode() { m_protectedMode = !m_protectedMode; - m_closeButton->setVisible(!m_protectedMode); - m_prevButton->setVisible(!m_protectedMode); - m_nextButton->setVisible(!m_protectedMode); + // YYC Mark: Protected mode is not supported in Remix fork. } void MainWindow::toggleStayOnTop() @@ -647,7 +519,9 @@ bool MainWindow::canPaste() const void MainWindow::quitAppAction(bool force) { - if (!m_protectedMode || force) { + // YYC Mark: Protect mode is not supported in Remix fork + // Assume we are always in non-protected mode. + if (/*!m_protectedMode*/ true || force) { closeWindow(); } } diff --git a/app/mainwindow.h b/app/mainwindow.h index c9b5a38..ac8ba33 100644 --- a/app/mainwindow.h +++ b/app/mainwindow.h @@ -51,11 +51,6 @@ public: protected slots: void showEvent(QShowEvent *event) override; - void enterEvent(QT_ENTER_EVENT *event) override; - void leaveEvent(QEvent *event) override; - void mousePressEvent(QMouseEvent *event) override; - void mouseMoveEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; void mouseDoubleClickEvent(QMouseEvent *event) override; void wheelEvent(QWheelEvent *event) override; void resizeEvent(QResizeEvent *event) override; @@ -119,19 +114,11 @@ private: ActionManager *m_am; PlaylistManager *m_pm; - QPoint m_oldMousePos; - QPropertyAnimation *m_fadeOutAnimation; - QPropertyAnimation *m_floatUpAnimation; - QParallelAnimationGroup *m_exitAnimationGroup; QFileSystemWatcher *m_fileSystemWatcher; - ToolButton *m_closeButton; - ToolButton *m_prevButton; - ToolButton *m_nextButton; GraphicsView *m_graphicsView; NavigatorView *m_gv; BottomButtonGroup *m_bottomButtonGroup; bool m_protectedMode = false; - bool m_clickedOnWindow = false; }; #endif // MAINWINDOW_H diff --git a/app/navigatorview.cpp b/app/navigatorview.cpp index 95c6cd1..f9e71d3 100644 --- a/app/navigatorview.cpp +++ b/app/navigatorview.cpp @@ -18,7 +18,7 @@ NavigatorView::NavigatorView(QWidget *parent) setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setStyleSheet("background-color: rgba(0, 0, 0, 120);" - "border-radius: 3px;"); + "border-style: none;"); } // doesn't take or manage its ownership diff --git a/app/settings.cpp b/app/settings.cpp index 7c70244..0af81fa 100644 --- a/app/settings.cpp +++ b/app/settings.cpp @@ -47,7 +47,7 @@ Settings *Settings::instance() bool Settings::stayOnTop() { - return m_qsettings->value("stay_on_top", true).toBool(); + return m_qsettings->value("stay_on_top", false).toBool(); } bool Settings::useLightCheckerboard() @@ -57,9 +57,9 @@ bool Settings::useLightCheckerboard() Settings::DoubleClickBehavior Settings::doubleClickBehavior() const { - QString result = m_qsettings->value("double_click_behavior", "Close").toString(); + QString result = m_qsettings->value("double_click_behavior", "Ignore").toString(); - return QEnumHelper::fromString(result, DoubleClickBehavior::Close); + return QEnumHelper::fromString(result, DoubleClickBehavior::Ignore); } Settings::MouseWheelBehavior Settings::mouseWheelBehavior() const @@ -71,9 +71,9 @@ Settings::MouseWheelBehavior Settings::mouseWheelBehavior() const Settings::WindowSizeBehavior Settings::initWindowSizeBehavior() const { - QString result = m_qsettings->value("init_window_size_behavior", "Auto").toString(); + QString result = m_qsettings->value("init_window_size_behavior", "Maximized").toString(); - return QEnumHelper::fromString(result, WindowSizeBehavior::Auto); + return QEnumHelper::fromString(result, WindowSizeBehavior::Maximized); } Qt::HighDpiScaleFactorRoundingPolicy Settings::hiDpiScaleFactorBehavior() const diff --git a/assets/icons/fit-in-view.svg b/assets/icons/fit-in-view.svg new file mode 100644 index 0000000..7908ba2 --- /dev/null +++ b/assets/icons/fit-in-view.svg @@ -0,0 +1 @@ +fit-to-screen \ No newline at end of file diff --git a/assets/icons/go-next.svg b/assets/icons/go-next.svg index f769cde..99b869e 100644 --- a/assets/icons/go-next.svg +++ b/assets/icons/go-next.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - +page-last \ No newline at end of file diff --git a/assets/icons/go-previous.svg b/assets/icons/go-previous.svg index cdf3dc5..c0d41a2 100644 --- a/assets/icons/go-previous.svg +++ b/assets/icons/go-previous.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - +page-first \ No newline at end of file diff --git a/assets/icons/horizontal-flip.svg b/assets/icons/horizontal-flip.svg new file mode 100644 index 0000000..2c73e75 --- /dev/null +++ b/assets/icons/horizontal-flip.svg @@ -0,0 +1 @@ +flip-horizontal \ No newline at end of file diff --git a/assets/icons/object-rotate-left.svg b/assets/icons/object-rotate-left.svg new file mode 100644 index 0000000..8b704d8 --- /dev/null +++ b/assets/icons/object-rotate-left.svg @@ -0,0 +1 @@ +rotate-left \ No newline at end of file diff --git a/assets/icons/object-rotate-right.svg b/assets/icons/object-rotate-right.svg index 2aa9450..f6eda6d 100644 --- a/assets/icons/object-rotate-right.svg +++ b/assets/icons/object-rotate-right.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - +rotate-right \ No newline at end of file diff --git a/assets/icons/view-background-checkerboard.svg b/assets/icons/view-background-checkerboard.svg index 4e0e4ef..23884e8 100644 --- a/assets/icons/view-background-checkerboard.svg +++ b/assets/icons/view-background-checkerboard.svg @@ -1,24 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - +checkerboard \ No newline at end of file diff --git a/assets/icons/view-fullscreen.svg b/assets/icons/view-fullscreen.svg deleted file mode 100644 index 1d25d09..0000000 --- a/assets/icons/view-fullscreen.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/window-close.svg b/assets/icons/window-close.svg deleted file mode 100644 index daca19c..0000000 --- a/assets/icons/window-close.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/assets/icons/zoom-in.svg b/assets/icons/zoom-in.svg index 0f96eb1..1b89ee0 100644 --- a/assets/icons/zoom-in.svg +++ b/assets/icons/zoom-in.svg @@ -1,17 +1 @@ - - - - - - - - - - - - - - - - - +magnify-plus-outline \ No newline at end of file diff --git a/assets/icons/zoom-original.svg b/assets/icons/zoom-original.svg index 9a5e3c9..c585c14 100644 --- a/assets/icons/zoom-original.svg +++ b/assets/icons/zoom-original.svg @@ -5,19 +5,19 @@ - + - + - + - + - + diff --git a/assets/icons/zoom-out.svg b/assets/icons/zoom-out.svg index d679957..2a5a377 100644 --- a/assets/icons/zoom-out.svg +++ b/assets/icons/zoom-out.svg @@ -1,18 +1 @@ - - - - - - - - - - - - - - - - - - +magnify-minus-outline \ No newline at end of file diff --git a/assets/resources.qrc b/assets/resources.qrc index 82d4976..7997eed 100644 --- a/assets/resources.qrc +++ b/assets/resources.qrc @@ -2,12 +2,13 @@ icons/zoom-in.svg icons/zoom-out.svg - icons/view-fullscreen.svg + icons/fit-in-view.svg + icons/horizontal-flip.svg icons/zoom-original.svg + icons/object-rotate-left.svg icons/object-rotate-right.svg icons/view-background-checkerboard.svg icons/app-icon.svg - icons/window-close.svg icons/go-next.svg icons/go-previous.svg plain/translators.html