3 Commits
0.2.0 ... 0.2.1

Author SHA1 Message Date
fe0b36dc34 feat: add a fullscreen shortcut 2020-05-19 14:08:29 +08:00
1864ff5b7f test: Create macos.yml (#3)
Use GitHub Action to test building under macOS
2020-04-25 23:42:21 +08:00
fb1ad2ba06 misc: cpack info for debian package 2020-04-20 10:57:27 +08:00
4 changed files with 35 additions and 2 deletions

17
.github/workflows/macos.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: MyCi_MacOS
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install Qt
uses: jurplel/install-qt-action@v2.2.1
- name: Run a qt project
run: |
cmake ./
make

View File

@ -133,7 +133,7 @@ install (
# CPACK: General Settings
set (CPACK_GENERATOR "TBZ2")
set (CPACK_PACKAGE_NAME "PineapplePictures")
set (CPACK_PACKAGE_NAME "pineapple-pictures")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Yet another image viewer")
set (CPACK_PACKAGE_VENDOR "Gary Wang")
set (CPACK_PACKAGE_CONTACT "https://github.com/BLumia/PineapplePictures/issues/")
@ -142,7 +142,9 @@ if (WIN32)
elseif (APPLE)
# ...
elseif (UNIX)
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set (CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set (CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5svg5")
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat-plugins")
endif()
include(CPack)

View File

@ -125,6 +125,10 @@ MainWindow::MainWindow(QWidget *parent) :
connect(nextPictureShorucut, &QShortcut::activated,
this, &MainWindow::galleryNext);
QShortcut * fullscreenShorucut = new QShortcut(QKeySequence(QKeySequence::FullScreen), this);
connect(fullscreenShorucut, &QShortcut::activated,
this, &MainWindow::toggleFullscreen);
centerWindow();
}
@ -561,3 +565,12 @@ void MainWindow::quitAppAction(bool force)
closeWindow();
}
}
void MainWindow::toggleFullscreen()
{
if (isFullScreen()) {
showNormal();
} else {
showFullScreen();
}
}

View File

@ -53,6 +53,7 @@ protected slots:
void toggleStayOnTop();
bool stayOnTop();
void quitAppAction(bool force = false);
void toggleFullscreen();
private:
QPoint m_oldMousePos;