Compare commits

..
535 Commits
Author SHA1 Message Date
yyc12345 558ea284c9 i18n: rename translation catalog base name to SCWPicture 2026-10-21 10:17:24 +08:00
yyc12345 9dcc220fda chore: use full app name in InnoSetup created registry 2026-10-21 10:06:44 +08:00
yyc12345 6db2b24fd8 chore: update application id in MSIX manifest 2026-10-21 10:05:32 +08:00
yyc12345 d9174c9655 doc: update app illustration in README 2026-10-20 15:57:07 +08:00
yyc12345 ceb240d01a build: raise minimum Qt version to 6.8 and drop pre-6.8 fallbacks 2026-10-19 21:30:00 +08:00
yyc12345 124c69bf8b build: add svg file type icon for vector, archaic, and icon formats 2026-10-19 20:45:42 +08:00
yyc12345 4ecddceb58 doc: add DEVNOTE.md developer notes 2026-10-19 20:25:33 +08:00
yyc12345 83096294cc chore: fix REUSE compliance with updated annotations 2026-10-17 08:51:00 +08:00
yyc12345 b681cf2042 fix: fix msix publisher and makeappx hash param for sign 2026-10-16 14:37:21 +08:00
yyc12345 74df91c06b build: strip priconfig packaging node before msix pri generation 2026-10-16 11:52:01 +08:00
yyc12345 8a4b97eb84 build: wire up msix logo assets and exe subdir in appx manifest 2026-10-16 10:40:41 +08:00
yyc12345 9cff649f58 i18n: fix some zh_CN translations for app UI 2026-10-14 09:29:56 +08:00
yyc12345 f295b4d9bb fix: move EnumComboBoxTransformer statics back into SettingsDialog ctor
As namespace-scope statics, their initialization evaluates
QCoreApplication::translate() during static initialization, before the
QTranslator is installed in main(), so the combo box options always kept
the untranslated source text. Function-local statics are initialized
lazily on first dialog construction, after translations are loaded.
2026-10-13 15:29:43 +08:00
yyc12345 2ff67b2f2a i18n: complete unfinished zh_CN translations for app UI 2026-10-13 14:36:44 +08:00
yyc12345 645a1ad71f doc: add app illustration in README 2026-10-13 14:20:02 +08:00
yyc12345 f6c12525ae fix: remove stray fragment after app version value in inno setup script 2026-10-13 13:36:57 +08:00
yyc12345 770cfd5af4 fix: drop unofficial inno setup languages instead of default fallback 2026-10-13 11:38:50 +08:00
yyc12345 57f8081841 build: remove vc redist install from inno setup packaging 2026-10-13 10:49:43 +08:00
yyc12345 a2e89f4a5a build: make inno setup version a cmake cache variable 2026-10-13 10:31:02 +08:00
yyc12345 b65bb359a9 build: specify inno setup 6 for metaglot inno rendering 2026-10-12 20:50:42 +08:00
yyc12345 8eb77d6348 fix: restrict inno setup base language files to official translations 2026-10-12 17:58:21 +08:00
yyc12345 8ff33f1bbb fix: include <objbase.h> before <exdisp.h> for MSVC
<exdisp.h> is not self-contained: its forward declarations use the
\interface\ macro, which is only defined in <combaseapi.h> via the
<objbase.h> include chain. Qt headers do not provide <windows.h>, so
including <exdisp.h> first caused C2146/C2371 parse errors on MSVC and
broke all IShellWindows usages. Include <objbase.h> as a prelude.
2026-10-12 16:49:56 +08:00
yyc12345 e7b6bdd7dd fix: add braces around switch-case blocks with initialized declarations
MSVC rejects declarations with initializers directly under a case label
(C2360/C2361: initialization skipped by case/default labels), while
GCC/Clang accept them. Wrap the declaring case bodies in braces.
2026-10-12 16:49:26 +08:00
yyc12345 f330a9f853 chore(ci): upload artifacts unzipped via upload-artifact v7 2026-10-12 16:16:50 +08:00
yyc12345 a7611ff419 fix: fix macos-only ambiguous overload issue 2026-10-12 16:06:14 +08:00
yyc12345 063eaf187e chore(CI): remove ubuntu-24-04-build in ci 2026-10-12 16:01:07 +08:00
yyc12345 da98bb1e74 chore(CI): fix fatal hash error of aqtinstall in windows workflow 2026-10-12 16:00:29 +08:00
yyc12345 ef77d01b01 build: parameterize inno setup script and rework windows packaging step 2026-10-12 13:06:34 +08:00
blumia 793f22ddfe chore(CI): bump action versions 2026-10-11 11:11:44 +08:00
yyc12345 8f8f9b0147 refactor: move macOS app icon into dist/macos-icons 2026-10-11 11:08:49 +08:00
yyc12345 a7d40df40a i18n: add missing metadata translations for app UI languages 2026-10-11 11:08:49 +08:00
yyc12345 5383fbf9b8 i18n: reword zh_CN application description 2026-10-11 11:08:47 +08:00
yyc12345 3ef9d4eb42 build: invoke metaglot directly instead of via uv tool run 2026-10-09 20:09:04 +08:00
yyc12345 a123b680ff fix: adapt inno setup rendering to metaglot language name conversion 2026-10-09 19:50:58 +08:00
yyc12345 2a49dea718 refactor: rename project name in assets 2026-09-29 15:29:38 +08:00
yyc12345 31f54e5444 doc: rename project name in doc and license 2026-09-29 15:23:52 +08:00
yyc12345 91c67eb4b6 refactor: rename project name in CI 2026-09-29 13:29:09 +08:00
yyc12345 4c87c8d9fc refactor: rename project name in app i18n 2026-09-29 13:17:31 +08:00
yyc12345 c6ab0eb0eb refactor: rename project name in distribution i18n 2026-09-29 11:52:14 +08:00
yyc12345 5600fc594f refactor: rename project name in distribution 2026-09-29 11:17:29 +08:00
yyc12345 8cc34ab998 refactor: use metaglot to take msix file i18n over
current msix workflow are still not working. all work of it are postponed to future.
2026-09-29 11:03:10 +08:00
yyc12345 6c7395ddca refactor: rename project name in source code 2026-09-28 14:50:07 +08:00
yyc12345 079224f591 refactor: rename project name in CMakeLists.txt 2026-09-28 14:38:57 +08:00
yyc12345 17de95be75 fix: fix slot connect fail log when running app
- fix slot connect fail log when running app
- fix potential memory leak
2026-09-28 10:40:14 +08:00
yyc12345 c92e473f39 feat: add full shortcut support 2026-09-28 10:17:16 +08:00
yyc12345 79304f734d doc: update README 2026-09-27 20:30:17 +08:00
yyc12345 3709572eb3 revert: remove funding infomations 2026-09-26 17:02:21 +08:00
9a71d30904 i18n: Translations update from Hosted Weblate
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Tech-Tac <ahmad.tech.tac@gmail.com>
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ar/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/tr/
Translation: pineapple-pictures/AppStream Metadata
Translation: pineapple-pictures/Application
2026-09-26 16:11:12 +08:00
blumia 7eb553a527 fix(i18n): add missing ar l10n config and resource 2026-09-26 16:07:03 +08:00
blumia 49da6b0c82 i18n: update ts files and translators.html 2026-09-26 16:03:49 +08:00
Hosted WeblateandTech-Tac a2c71144f7 i18n: Translations update from Hosted Weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tech-Tac <ahmad.tech.tac@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ar/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/ar/
Translation: pineapple-pictures/AppStream Metadata
Translation: pineapple-pictures/Application
2026-09-26 16:02:56 +08:00
Hosted WeblateandHeimen Stoffels c2631e3af6 i18n: Translations update from Hosted Weblate
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/
Translation: pineapple-pictures/Application
2026-09-26 15:58:53 +08:00
blumia b8ee6ca1ac i18n: update ts files
Related: https://github.com/BLumia/pineapple-pictures/issues/147
2026-09-26 15:58:16 +08:00
blumia 33361f16cb fix: REUSE lint for files under msix folder 2026-09-26 09:48:46 +08:00
blumia 1966bd93be chore(CI): add ubuntu 26.04 build 2026-09-26 09:47:01 +08:00
blumia ce601c33e3 feat: msix deployment support and add store link 2026-09-26 09:43:30 +08:00
yyc12345 0710f2c111 fix: fix windows CI no label error
- fix windows CI no label error
- add lost goto in windows CI
- uniform goto style
2026-09-25 17:27:05 +08:00
yyc12345 ac5318786d feat: introduce InnoSetup for windows package 2026-09-25 17:13:27 +08:00
yyc12345 11628678a3 refactor: use metaglot to take macos bundle i18n over
- use metaglot for macos bundle i18n
- set macos icon from PUBLIC to PRIVATE
- remove CFBundleLongVersionString from Info.plist
2026-09-24 16:05:20 +08:00
yyc12345 00b4eb58e2 chore: reduce the length of the error message in cmake 2026-09-22 17:15:49 +08:00
yyc12345 0d62a8fa06 chore: move windows icos resources location 2026-09-22 17:13:59 +08:00
yyc12345 e256472b70 fix: fix invalid install for UNIX app icon 2026-09-22 16:43:04 +08:00
yyc12345 1404a4ba54 refactor: use metaglot to take appstream file i18n over 2026-09-22 16:06:23 +08:00
yyc12345 2297609481 refactor: use metaglot to take desktop file i18n over 2026-09-22 15:29:09 +08:00
yyc12345 84821d4a94 refactor: use metaglot to enable i18n for Windows artifact 2026-09-22 13:53:16 +08:00
yyc12345 ccff9d32c9 refactor: move translation to independent directory 2026-09-10 09:58:53 +08:00
yyc12345 d36d048e07 feat: update icon and change the directory of htmls 2026-09-10 09:48:07 +08:00
blumia 40d82e757e chore: update release info to 1.6.0 2026-08-24 10:13:27 +08:00
blumia da190a22c1 fix(CI): should use 6.11.2 for both Windows and macOS build 2026-08-24 10:13:03 +08:00
blumia 2995f06d49 chore: update Windows action used Qt version
Also use git version of aqtinstall for Qt 6.11.0+ for Windows
miurahr/aqtinstall#1007
2026-08-24 10:11:33 +08:00
Tech-Tac ff6a9ebfae feat: add an option to show/hide navigator view 2026-08-24 10:05:02 +08:00
yyc12345 e01718928c feat: remove checkerboard icon and change bottom toolbar 2026-07-25 12:23:00 +08:00
yyc12345 f5dbf44ec7 refactor: add possible optimization in graphics view 2026-07-25 12:15:17 +08:00
yyc12345 f55f8c731d refactor: use extensible design for fetching playlist from single file 2026-07-25 12:06:11 +08:00
yyc12345 4ed491c78a refactor: remove closeWindow because no one need it 2026-07-24 15:17:05 +08:00
yyc12345 b54cde2cbf refactor: remove "auto" in window-size behavior
- "auto" is not essential for our hard fork, so i simply remove it.
- remove all useless code after removing it.
- enlarge the min size of window because previous may trigger bad layout when showing navigation view.
2026-07-24 15:14:24 +08:00
yyc12345 b1d12cc406 refactor: remove double-click-window behavior
- remove double-click-window behavior entirely
- remove the icon of copy image action
2026-07-24 15:07:30 +08:00
yyc12345 aa13355966 refactor: use UI file for main window
- main window now use UI file for layout.
- remove all manual computed widget position code. use full Qt layout implementation instead.
- remove useless functions in main window
- change style changed slot as private
2026-07-24 14:57:41 +08:00
yyc12345 bd35a8c3e0 feat: use submenu in right click menu to reduce the height of menu panel 2026-07-15 21:59:30 +08:00
yyc12345 81413b51da feat: support explorer sort and hidden on Window
now playlist can use Windows Explorer's sort and hidden file display options to build it own for better browse experience on Windows
2026-07-14 13:22:23 +08:00
yyc12345 a01d640c27 refactor: remove frameless window
remove frameless window and merge it into mainwindow. because we do not need frameless and transparent window, so most of its functions are removed in previous commits.
2026-07-13 15:59:39 +08:00
yyc12345 16800df138 refactor: remove useless function in main window 2026-07-13 15:50:30 +08:00
yyc12345 7e8fd4ea21 refactor: use class member menu instead of runtime created menu 2026-07-13 15:47:17 +08:00
yyc12345 04fa491cd8 refactor: fully refactor playlist manager
- refactor playlist manager. remove useless qt model design.
- update action updator function.
2026-07-13 15:40:59 +08:00
yyc12345 dbf8c09368 feat: update action manager
- add and delete some actions in action manager.
- rename "fit to view" to "fit to screen".
- update main window right click menu and toolbar.
- use special state update slot in action manager instead of function located in main window.
2026-07-12 21:00:11 +08:00
yyc12345 369a17ed7d fix: fix typo about checkerboard 2026-07-12 19:54:37 +08:00
yyc12345 b19a4f8723 doc: add help for checkboard shift modifier 2026-07-09 13:06:14 +08:00
yyc12345 a8e5464e9f fix: remove useless mouse tracking setting 2026-07-08 20:18:52 +08:00
yyc12345 46f46480cb feat: change application style
- change default dark theme to light
- disable dark mode on windows 10 because Qt's windows 11 theme has bad support on windows 10 (icon display error)
- level required minimum qt version up to 6.5 for color schema.
2026-07-08 20:15:22 +08:00
yyc12345 c06f900ac5 refactor: use ui file to replace manual layout in metadata dialog 2026-07-07 12:16:36 +08:00
yyc12345 31303a20c7 refactor: set openExternalLinks in ui file instead of cpp file 2026-07-06 20:42:23 +08:00
yyc12345 319fd64fc6 refactor: use html resource to replace manual html in code 2026-07-06 20:34:41 +08:00
yyc12345 cdd0b764a7 refactor: use .ui to replace manual layout for aboutdialog 2026-07-06 09:44:38 +08:00
yyc12345 2a69482adb fix: change default settings
- change default settings to make the default behavior more close to legacy Windows Photo Viewer.
- remove redundant fallback for fetching enum settings.
2026-07-05 09:05:58 +08:00
yyc12345 fc3ef1cd7f fix: fix not thread-safe settings singleton.
fix not thread-safe way for fetching settings singleton.
remove qApp from Settings' parent, use nullptr replace it and leak it anyway.
because we may initialize it before initializing QApplication.
in that time, qApp is nullptr.
2026-07-05 08:57:49 +08:00
yyc12345 1de1517a81 refactor: use .ui file instead of manual layout in settings dialog.
- enable Qt UIC in cmake file.
- use .ui file to replace manually written layout in settings dialog.
2026-07-04 22:17:40 +08:00
yyc12345 04a4ab9bff feat: make the default window size bigger 2026-07-04 16:54:48 +08:00
yyc12345 011c1e858f feat: update the layout of main window.
update the layout of main window to make it looks more like
legacy Windows Photo Viewer.
2026-07-04 15:20:14 +08:00
yyc12345 4fe09757b3 revert: remove user custom shortcut 2026-07-04 14:59:02 +08:00
yyc12345 82f1f10cca refactor: rename m_gv to m_nav and m_graphicsView to m_gv for better abbr. 2026-07-04 14:35:28 +08:00
yyc12345 60eebea741 revert: remove the ability that drag window body to move 2026-07-04 14:32:20 +08:00
blumia 9b151e2fea chore: update release info to 1.5.0 2026-07-03 19:37:54 +08:00
blumia 9db9c3e9f7 chore(AppStream): add vcs-browser link 2026-07-03 19:37:03 +08:00
yyc12345 9a18a41b8f revert: remove OpacityHelper
- remove OpacityHelper
- remove all related animation
- now bottom toolbar and navigation view are always visible
2026-07-03 16:40:04 +08:00
yyc12345 c93ed94210 refactor: fully remove ToolButton because no one require it.
- fully remove ToolButton.
- make loadHidpiIcon as a static function in ActionManager because no outside function may call it.
2026-07-03 15:37:20 +08:00
yyc12345 f4d272e014 refactor: merge retranslateUi into setupAction in ActionManager 2026-07-03 15:12:15 +08:00
yyc12345 d536e8c611 refactor: move prev/next picture button to bottom toolbar. 2026-07-03 14:56:54 +08:00
yyc12345 c8dfccb460 revert: remove protected mode
protected mode is designed for borderless and transparent window.
it is not suit for the goal of this fork.
2026-07-03 14:32:36 +08:00
yyc12345 6fde9474ae revert: remove stay-on-top feature 2026-07-03 14:26:27 +08:00
yyc12345 c19fcaa560 revert: remove close window animation 2026-07-03 14:26:22 +08:00
yyc12345 602e2cccf8 revert: remove redundant close button 2026-07-03 14:26:16 +08:00
yyc12345 3c1a3c54a7 revert: restore system default window instead of custom one.
custom window is not the goal of this project.
we remove it and use system default window instead.
2026-07-03 14:26:09 +08:00
yyc12345 032752faf9 revert: remove the ability that disable built-in close window animation
no need to preserve this option because frameless window and
close window animation will be fully removed in future.
2026-07-02 20:32:30 +08:00
yyc12345 457647c59f revert: remove auto long image mode
- remove auto long image mode.
- there is no "auto" requirement for this.
- user can utilize fit by height/width to achieve the same goal by manually click them.
- some optimization code about graphic view are preserved.
2026-07-02 20:14:44 +08:00
yyc12345 821e0f9fd6 revert: remove passoc support on Windows.
- remove passoc executable support on Windows.
- but preserve the icons created by upstream for future expanding.
2026-07-02 15:48:56 +08:00
yyc12345 26f51e418d ci: remove deepin 25 support
This partially reverts commit afcd126c00.

This fork do not need to preserve the support to deepin.
So I simply remove its CI.
2026-07-02 15:48:55 +08:00
yyc12345 cd2eac44f1 revert: revert feature about saving image as new file with different format.
This reverts commit 5b2255e903.

The feature about saving image as new file with different format is not the goal of an image viewer.
There is no need to keep feature diversity in this fork.
So I simply remove it.
2026-07-02 15:48:50 +08:00
yyc12345 f0bb945c7d doc: update README
- update README to notice the development of SarasaCW Picture.
- temporarily remove the most of old README by HTML comment syntax. these contents will be restored and fixed once I finish refactoring.
2026-07-02 14:44:01 +08:00
yyc12345 870e472f53 ci: remove appveyor config file
- all build work are passing by github. there is no need to keep appvoyer config file.
2026-07-02 14:43:42 +08:00
yyc12345 76677381de build: remove QMake project file
- remove QMake project file. it is already deprecated in original repository. all build should be run as CMake project.
2026-07-02 14:43:20 +08:00
blumia d2bd521ad0 fix: show empty url list doesn't reset window title 2026-07-02 14:41:56 +08:00
blumia 265e894b3f fix(CI): Windows build FTBFS 2026-07-02 14:41:42 +08:00
blumia 6339a93c6c feat(Windows): open window will be able to use system animation 2026-07-02 14:39:33 +08:00
Hosted WeblateandVenusGirl 6da53ced81 i18n: Translations update from Hosted Weblate
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/
Translation: pineapple-pictures/Application
2026-06-29 19:18:11 +08:00
blumia 8f0d4da7ad chore: update release info to 1.4.1 2026-04-05 17:09:13 +08:00
blumia 9c8ffb6c1b chore(CI): bump Qt and action version 2026-04-04 16:52:18 +08:00
blumia 4c5c5e6fc6 fix(CI): zlib dll renamed 2026-03-27 17:55:23 +08:00
blumia b8cb10bb33 fix(CI): fixed kf6 version for appveyor build 2026-03-27 15:52:00 +08:00
blumia 6e2f40633e fix: correct version in CMakeLists, update CI for zlib 2026-03-27 15:06:11 +08:00
Hosted WeblateandHeimen Stoffels a0ba7c1d17 i18n: Translations update from Hosted Weblate
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/
Translation: pineapple-pictures/Application
2026-03-27 15:02:18 +08:00
Hosted WeblateandLoc Huynh b6d759d7c6 i18n: Translations update from Hosted Weblate
Co-authored-by: Loc Huynh <huynhloc.contact@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/vi/
Translation: pineapple-pictures/Application
2026-03-11 20:32:50 +08:00
blumia 437c2f5618 chore: update release info to 1.4.0 2026-02-09 21:00:34 +08:00
7fd4924e64 i18n: Translations update from Hosted Weblate
Co-authored-by: Andrej Poženel - SDT <anderlli0053@live.com>
Co-authored-by: Andrey <andrey@mailbox.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/sl/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/sl/
Translation: pineapple-pictures/AppStream Metadata
Translation: pineapple-pictures/Application
2026-01-31 00:11:45 +08:00
blumia c77808f3d8 chore(CI): update Qt version to 6.10.2 2026-01-31 00:00:49 +08:00
blumia 86075a1ad0 chore: update copyright year in rc file 2026-01-20 23:22:37 +08:00
blumia a8e40a725c i18n: update ts files 2026-01-18 14:02:31 +08:00
8edb6b015e i18n: Translations update from Hosted Weblate
Co-authored-by: Gary Wang <wzc782970009@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Loc Huynh <huynhloc.contact@gmail.com>
Co-authored-by: Sabri Ünal <yakushabb@gmail.com>
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/vi/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/ko/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/tr/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/vi/
Translation: pineapple-pictures/AppStream Metadata
Translation: pineapple-pictures/Application
2026-01-18 13:51:16 +08:00
blumia 5b2255e903 feat: action for save image as new file with different format 2026-01-18 13:08:39 +08:00
blumia 4948ea7445 chore: hello 2026 2026-01-06 00:17:12 +08:00
blumia e09348e064 chore: bump release info to 1.3.0 2025-12-18 00:44:57 +08:00
Hosted WeblateandAndrey fce6a835b7 i18n: Translations update from Hosted Weblate
Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/
Translation: pineapple-pictures/Application
2025-12-16 17:32:28 +01:00
blumia afcd126c00 feat(CI): add deepin 25 build 2025-12-17 00:31:42 +08:00
blumia aa025b0f3b Revert "chore: avoid use screenAt(QCursor::pos())"
I actually forgot why I did this, I might thought this API
is deprecated?

Reverting this resolved the issue that window is not appeared
at the screen that currently the cursor is at.

This reverts commit 4375fe1c2d.
2025-12-14 11:26:21 +08:00
blumia e6e738412d chore(CI): add passoc binary for msvc build and minor tweaks
Resolve https://github.com/BLumia/pineapple-pictures/issues/13
2025-12-14 00:23:55 +08:00
blumia 2e748e19e1 fix: correct license for files under dist/passoc 2025-12-11 00:47:19 +08:00
blumia 4b5c9e9ebd chore: add icons for Windows file assoc 2025-12-11 00:07:31 +08:00
blumia cdfa8b78a4 feat(Windows): install passoc default config file 2025-12-03 00:10:42 +08:00
blumia 1ba5ae60dc feat: option to limit svg support to svg tiny 1.2 only 2025-12-02 00:04:12 +08:00
08d1c09033 i18n: Translations update from Hosted Weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/ko/
Translation: pineapple-pictures/AppStream Metadata
Translation: pineapple-pictures/Application
2025-12-01 23:54:11 +08:00
blumia 612b542e2a fix(CI): fix broken avif support
The following commit from libavif is related:
https://github.com/AOMediaCodec/libavif/commit/f7ce882698307cad524603b9d528ce70c0d0d299

Resolve: https://github.com/BLumia/pineapple-pictures/issues/164
2025-11-24 19:10:07 +08:00
blumia d74db66ab5 chore(CI): tweak msvc CI and make use of cmake install command
We also no longer include msvcrt in msvc cmake CI build
2025-11-22 17:40:43 +08:00
blumia 9dd34b3fce chore: bump release info to 1.2.1 2025-11-21 20:42:44 +08:00
blumia adfe6c51da chore(CI): bump Qt version to 6.10.1 2025-11-20 23:29:43 +08:00
Weblate (bot)andalbanobattistella 96565b2ccf i18n: Translated using Weblate (Italian) (#162)
Currently translated at 100.0% (168 of 168 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

Co-authored-by: albanobattistella <albanobattistella@gmail.com>
2025-11-08 23:19:06 +08:00
blumia 107440145a chore(CI): bump dependencies version for msvc build 2025-11-06 00:28:32 +08:00
blumia 1c55e3194e fix: missing QColorSpace include and Qt version check 2025-11-05 20:34:06 +08:00
blumia 9021ff2579 fix: inaccurate color when display CMYK images
Resolve https://github.com/BLumia/pineapple-pictures/issues/100
2025-11-05 20:23:40 +08:00
blumia 10e1e91e7b chore: add donation link to AppStream metainfo 2025-10-13 00:04:07 +08:00
blumia ef887d7a06 chore(CI): switch back to Qt 6.9.3 and add cache for install-qt-action 2025-10-08 13:48:12 +08:00
blumia 5446d94966 chore(CI): use Qt 6.10.0 2025-10-08 13:25:42 +08:00
blumia a2f42c2e3d chore: update Contribution section in README.md 2025-09-27 15:50:25 +08:00
blumia 56b18353db chore: update release info to 1.2.0 2025-09-20 00:03:34 +08:00
blumia 9170765344 fix(CI): appveyor FTBFS due to mingw location change 2025-09-17 00:19:30 +08:00
Weblate (bot)andSabri Ünal ee7b3beda4 i18n: Translated using Weblate (Turkish) (#161)
Currently translated at 100.0% (168 of 168 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

Co-authored-by: Sabri Ünal <yakushabb@gmail.com>
2025-09-13 20:47:59 +08:00
blumia 919a672c17 chore(CI): bump Qt version to 6.9.2 2025-08-28 00:28:05 +08:00
blumia e52a6d8eed feat: new action for fit long image 2025-08-25 12:48:35 +08:00
blumia 8b0c8ec194 i18n: update ts files 2025-08-25 12:47:42 +08:00
1da7fff518 i18n: Translations update from Hosted Weblate (#159)
* Translated using Weblate (Italian)

Currently translated at 100.0% (167 of 167 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (167 of 167 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

---------

Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
2025-08-25 12:44:28 +08:00
blumia e216592205 fix(CI): reuse lint 2025-08-24 14:08:00 +08:00
blumia 8fc9d06937 chore: add product version to windows build rc file 2025-08-24 13:53:14 +08:00
blumia 73b15da182 chore: remove gitee release page link from README.zh_CN.md 2025-08-23 15:24:00 +08:00
blumia f4f7d93e38 chore: simplified long image mode code 2025-08-05 00:06:05 +08:00
blumia 591b01a83a i18n: update ts files 2025-08-04 21:56:58 +08:00
blumia f8d3dcc899 feat: auto long image mode 2025-08-04 20:41:49 +08:00
blumia f0ed9d0ca1 chore: update release info to 1.1.1 2025-08-02 13:30:14 +08:00
13227cfac9 i18n: Translations update from Hosted Weblate (#157)
* Translated using Weblate (Korean)

Currently translated at 100.0% (166 of 166 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (166 of 166 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

---------

Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
2025-08-01 23:44:43 +08:00
blumia b73df5ea1a refactor: make fitByOrientation() more sane 2025-07-27 15:53:23 +08:00
blumia 4375fe1c2d chore: avoid use screenAt(QCursor::pos()) 2025-07-26 16:03:13 +08:00
blumia 4654cb21a0 fix: REUSE compliance 2025-07-23 21:29:18 +08:00
blumia ba23208a7a chore: add config file for CRLF to LF change 2025-07-23 21:22:41 +08:00
blumia ed5a602332 chore: let's use LF all the time 2025-07-23 21:20:34 +08:00
blumia 347681e604 feat(macOS): click dock icon to show window when it's hidden 2025-07-22 00:08:06 +08:00
blumia 505ab9e2a6 chore: update README 2025-07-11 19:41:09 +08:00
blumia c787e14a69 chore(CI): bump exiv2 version for msvc build 2025-07-11 00:31:10 +08:00
blumia 29c5783a66 chore: update release info to 1.1.0 2025-07-06 00:05:52 +08:00
Weblate (bot)andதமிழ்நேரம் ddc75f7cd0 i18n: Translated using Weblate (Tamil) (#155)
Currently translated at 100.0% (166 of 166 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ta/

Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-07-05 23:19:32 +08:00
blumia f976fea418 fix: shouldn't loop when navigate gallery via shortcuts
Related: https://github.com/BLumia/pineapple-pictures/issues/153
2025-06-29 16:24:26 +08:00
blumia 2846e4907b feat: support load m3u8 playlist
This change is sponsored by @superuser7777

Related: https://github.com/BLumia/pineapple-pictures/issues/153
2025-06-28 09:27:30 +08:00
blumia c828f86b74 fix: FTBFS, and tidy code 2025-06-25 21:55:08 +08:00
blumia 040e2a7b5f i18n: update ts files 2025-06-25 21:47:31 +08:00
blumia b566096b1f feat: option to disable gallery looping
This change is sponsored by @superuser7777

Related: https://github.com/BLumia/pineapple-pictures/issues/153
2025-06-25 20:55:42 +08:00
blumia 2bee79c064 i18n: update ts files 2025-06-22 15:14:08 +08:00
91696963ae i18n: Translations update from Hosted Weblate (#152)
* Translated using Weblate (Dutch)

Currently translated at 100.0% (164 of 164 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Italian)

Currently translated at 100.0% (164 of 164 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

---------

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
2025-06-22 15:11:56 +08:00
blumia 1623ca315a feat: able to disable built-in close window animation 2025-06-22 15:04:15 +08:00
blumia 3cfb25db9a chore(CI): use Qt 6.9.1 2025-06-04 20:37:08 +08:00
blumia 36854d19f4 i18n: update ts files 2025-06-01 13:26:49 +08:00
blumia 3f7ebd2f6c chore: make use of Qt::Literals::StringLiterals u""_s
Migrate string literal handling to Qt’s built‐in `u""_s` literals for consistency and readability.
2025-05-31 13:10:21 +08:00
blumia 291a98ea97 fix(CI): macOS and Ubuntu CI FTBFS
macOS's CI uses conan to build exiv2, which seems still rely on
the exiv2lib target...
2025-05-24 23:19:26 +08:00
blumia 24a0b581f3 chore: drop Qt 5 support
The required exiv2 version is now 0.28.x as well since it was
keeped for Qt 5 build.

Due to exiv2ConfigVersion.cmake doesn't allow us write something
like find_package(exiv2 "0.28") to require version >= 0.28.0,
we simply don't put the required version number here for now.
2025-05-24 20:34:36 +08:00
blumia 369aa13be3 chore: correct feature list in release note 2025-05-11 13:56:38 +08:00
blumia b964fdc77f chore: update release info to 1.0.0 2025-05-01 22:07:42 +08:00
blumia d6d2703c93 chore: ensure could get correct locale on macOS 2025-04-28 00:51:17 +08:00
blumia c6068ba23d fix: qmake build FTBFS 2025-04-26 17:23:56 +08:00
blumia fbdd858fbd chore: merge Qt translations into app translations as well 2025-04-26 17:02:24 +08:00
blumia 8333f17199 chore(CI): add portable mode to qmake build
Resolve https://github.com/BLumia/pineapple-pictures/issues/148

This change is sponsored by @EdgarHartel.
2025-04-11 12:54:29 +08:00
blumia 30eb06cba7 chore: make use of the showMessageAndExit api in Qt 6.9 2025-04-09 19:24:27 +08:00
blumia 0a45cd7c22 chore: add the ability to know if it's the first loaded user media
This could make it easier to allow set “Keep Transform” mode at
start-up.

This change is sponsored by @EdgarHartel.

Related: https://github.com/BLumia/pineapple-pictures/issues/146#issuecomment-2778192785
2025-04-08 23:19:02 +08:00
blumia fc417b30e5 chore(CI): bump msvc build AOM and libavif version 2025-04-04 17:35:59 +08:00
8568f6d4ef i18n: Translations update from Hosted Weblate (#145)
* Translated using Weblate (Dutch)

Currently translated at 100.0% (163 of 163 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Italian)

Currently translated at 100.0% (163 of 163 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

---------

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
2025-04-04 17:16:16 +08:00
blumia 8832c2daa9 chore(CI): bump Qt version to Qt 6.9.0 2025-04-02 19:39:20 +08:00
blumia da9d7d6989 fix: add a small delay when file watcher triggers a reload
The file might still being write by other program, thus we add a
500ms delay to reload the image.
2025-03-31 01:28:03 +08:00
blumia 317d296507 chore(CI): AppVeyor FTBFS, bump GH Action Qt version 2025-03-30 00:16:40 +08:00
blumia f24743e381 feat: reload image when current image gets updated
This feature is sponsored by @EdgarHartel.

Issue: https://github.com/BLumia/pineapple-pictures/issues/143
2025-03-29 13:41:55 +08:00
blumia fd4af282af i18n: update ts files 2025-03-26 22:53:57 +08:00
blumia 4de03dd02e feat: support enforce windowed mode on start-up
This feature is sponsored by @EdgarHartel.

Issue: https://github.com/BLumia/pineapple-pictures/issues/143
2025-03-26 22:51:27 +08:00
Weblate (bot)andmmahhi bfaf702606 i18n: Translated using Weblate (Japanese) (#144)
Currently translated at 100.0% (162 of 162 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

Co-authored-by: mmahhi <mmahhi@users.noreply.hosted.weblate.org>
2025-03-26 22:50:36 +08:00
blumia 3203d7f598 chore(macOS): use native text for ShortcutEdit's label
This means that it will be shown translated and on Apple platforms
it will resemble a key sequence from the menu bar.
2025-03-08 00:31:49 +08:00
blumia cbd006bae7 chore: update release info to 0.9.2 2025-02-26 20:58:16 +08:00
Pino Toscano fc13a497d3 fix: refer to the right CMake module for Exiv2
The exiv2 library provides its own CMake config module, which is named
"exiv2". On case-sensitive systems (all the Unix systems by default)
trying to look for it as "Exiv2" does not work.

Hence properly look for "exiv2", and adapt the associated CMake
variables accoding to that.
2025-02-20 08:13:16 +01:00
blumia 183a61b2f6 i18n: update AppStream metainfo translation and translators.html 2025-02-16 13:34:41 +08:00
Weblate (bot)andதமிழ்நேரம் ae07c5fe44 i18n: Translations update from Hosted Weblate (#140)
* Added translation using Weblate (Tamil)

* Added translation using Weblate (Tamil)

* Translated using Weblate (Tamil)

Currently translated at 100.0% (162 of 162 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ta/

* Translated using Weblate (Tamil)

Currently translated at 100.0% (7 of 7 strings)

Translation: pineapple-pictures/AppStream Metadata
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/ta/

---------

Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-02-16 13:08:25 +08:00
blumia a33381557b chore: sync playlistmanager changes from other project 2025-02-16 00:50:14 +08:00
blumia 6d8ec6a54a chore(CI): bump msvc windows CI Qt version to 6.8.2 2025-02-06 12:48:21 +08:00
blumia dd3209e3ff chore(REUSE): convert from DEP5 to REUSE.toml 2025-02-02 12:50:44 +08:00
blumia 088066197f chore: update release info to 0.9.1 2025-01-20 20:06:59 +08:00
3a8e907f28 i18n: Translations update from Hosted Weblate (#138)
* Translated using Weblate (Italian)

Currently translated at 100.0% (162 of 162 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

* Translated using Weblate (Turkish)

Currently translated at 99.3% (161 of 162 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

---------

Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: Sabri Ünal <yakushabb@gmail.com>
2025-01-20 19:55:55 +08:00
blumia eb04ac362b fix: should center window according to available geometry 2025-01-04 13:36:01 +08:00
blumia 6d7d0e4e1d chore(macOS): change close-window behavior
On macOS, now closing the window will actually hide the window
instead of quit the application, thus it will match to some other
macOS application's behavior.

Additionally, since our binary is not signed, this could avoid
seeing the request permission dialogs everytime user attempts to
open an image file inside a private place (e.g. places like the
"Downloads" folder and "access data from other apps").
2025-01-03 18:57:25 +08:00
blumia ff4f71c1e6 chore: hello 2025 2025-01-01 12:06:16 +08:00
blumia 101f111209 refactor: move file open event handling to standalone file 2024-12-31 10:57:21 +08:00
blumia c227c74e23 chore(CI): bump appveyor CI to use Qt 6.8 2024-12-30 16:46:40 +08:00
blumia 32ff813609 chore(CI): macOS build with exiv2 support enabled 2024-12-29 18:44:27 +08:00
blumia 2de9ff810d feat: new TRANSLATION_RESOURCE_EMBEDDING build-time option 2024-12-24 22:37:16 +08:00
blumia 57354fc135 fix(macOS): should adjust window size when set as default viewer 2024-12-23 00:42:55 +08:00
blumia 07d0b0270e i18n: update ts files 2024-12-20 23:17:55 +08:00
Weblate (bot)andalbanobattistella 78e3e45a2e i18n: Translated using Weblate (Italian) (#137)
Currently translated at 100.0% (161 of 161 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
2024-12-20 23:08:23 +08:00
blumia 5a34441c72 feat: option to double-click to fullscreen
Resolve: BLumia/pineapple-pictures#129
2024-12-15 19:12:38 +08:00
blumia b01601085b chore: update README and related docs 2024-12-04 20:07:15 +08:00
blumia 64c4d2e064 feat(macOS): support file open event for association 2024-12-03 23:37:53 +08:00
blumia e64b871a2f feat: macOS bundle support 2024-12-03 01:15:20 +08:00
blumia 06af632914 chore(CI): msvc use Qt 6.8.1 2024-12-01 12:52:48 +08:00
blumia 99abf3b69d chore: bump minimum CMake version
- 3.16 is the actual lowest required version for Qt 6
- CMake versions <= 3.10 are deprecated since CMake 3.31
2024-12-01 00:02:29 +08:00
Weblate (bot)andgallegonovato 42b6510877 i18n: Translated using Weblate (Spanish) (#134)
Currently translated at 100.0% (161 of 161 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-11-30 23:11:59 +08:00
blumia aa746721f0 i18n: update ts files 2024-11-07 00:15:59 +08:00
blumia 42e3d4c691 feat: animation pause and manually step to next frame
Resolve: https://github.com/BLumia/pineapple-pictures/issues/85
2024-11-06 20:28:39 +08:00
a993437983 i18n: Translations update from Hosted Weblate (#133)
* Translated using Weblate (Korean)

Currently translated at 100.0% (152 of 152 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (157 of 157 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (157 of 157 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (Italian)

Currently translated at 100.0% (157 of 157 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

---------

Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Co-authored-by: Sabri Ünal <yakushabb@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
2024-11-06 20:27:31 +08:00
blumia 8cce48e6b0 feat: check conflict shortcuts before saving 2024-11-03 00:46:21 +08:00
blumia d0bdc71cf5 chore: shortcut-related code tweaks 2024-11-02 09:32:51 +08:00
blumia 2071e82e1d i18n: update ts files 2024-10-31 00:01:08 +08:00
blumia b2f10b9193 chore: fix ubuntu 22.04 build ...again 2024-10-30 00:15:47 +08:00
blumia 9eb91dedf9 chore: fix ubuntu 22.04 build 2024-10-30 00:05:49 +08:00
blumia 6f3c30fc5b chore: fix qmake build 2024-10-29 23:44:48 +08:00
blumia 3eade9c3cf feat: support custom shortcut for existing actions
Resolve https://github.com/BLumia/pineapple-pictures/issues/128

Actually also https://github.com/BLumia/pineapple-pictures/issues/72
but not sure why that one is now a 404 page.
2024-10-29 23:28:27 +08:00
blumia fad7a668e3 fix: not able to load translations 2024-10-27 13:49:24 +08:00
blumia c68e82c7c8 chore: update release info to 0.8.2 2024-10-27 00:06:40 +08:00
blumia 7e04ba84eb chore(CI): msvc build with libavif 2024-10-26 15:18:54 +08:00
blumia 29355c7fc1 fix: actual proper fix for 471a3b1 2024-10-22 21:35:50 +08:00
95f85374cf i18n: Translations update from Hosted Weblate (#125)
* Translated using Weblate (Japanese)

Currently translated at 98.6% (149 of 151 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

* Translated using Weblate (Italian)

Currently translated at 100.0% (152 of 152 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (152 of 152 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

---------

Co-authored-by: mmahhi <mmahhi@users.noreply.hosted.weblate.org>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-10-22 00:38:29 +08:00
blumia 471a3b15ef fix: incorrect config location
This caused by the setting singleton instance (actually,
QStandardPath::writableLocation) was used before QApplication
was constructed, resulting it doesn't know the application
name. So we manually append the name to the path...
2024-10-21 22:27:57 +08:00
blumia 5d2ddc199a chore(CI): bump msvc build to use Qt 6.8.0 2024-10-12 19:57:27 +08:00
yyc12345 fa0b86a995 chore: fix incorrect syntax of COPY command in msvc-cmake-build.
- Fix incorrect syntax of COPY which cause we fail to copy LICENSE in final distribution package.
- Add workflow_dispatch condition in workflow files to allow manual trigger.
2024-10-12 14:25:28 +08:00
blumia b880406474 i18n: update ts files 2024-10-11 00:30:13 +08:00
blumia 470a29c38c feat: option to use light checkerboard by default 2024-10-10 22:58:11 +08:00
blumia 3a5ead8cc2 fix(CI): qmake build 2024-09-17 19:48:03 +08:00
blumia 4dd3f22d88 chore: make use of CMake project version 2024-09-17 19:28:05 +08:00
blumia 3a4ea573f6 fix(dist): add last release info to AppStream 2024-09-16 10:56:10 +08:00
blumia d574018a8e CI: bump dependencies version 2024-08-24 15:33:27 +08:00
ae0f11c153 i18n: Translations update from Hosted Weblate (#124)
* Translated using Weblate (Spanish)

Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (Turkish)

Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

* Translated using Weblate (Italian)

Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

* Translated using Weblate (Japanese)

Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

---------

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: mmahhi <mmahhi@users.noreply.hosted.weblate.org>
2024-08-24 15:29:57 +08:00
blumia 2bca7bd691 fix: move to trash not reload current item 2024-07-31 20:21:10 +08:00
blumia c2226ef5c7 chore: update translation strings 2024-07-31 19:41:51 +08:00
blumia 3596f9eac4 fix: window title not updated in some cases 2024-07-30 23:25:34 +08:00
blumia a6e31a2c4d feat: cli argument to list supported image formats 2024-07-28 16:16:20 +08:00
blumia cd01a05f23 chore: sync playlistmanager changes 2024-07-28 16:14:14 +08:00
blumia f32cb998ae fix: crash caused by urlByIndex() with invalid model index
Also save a QVariant convert for QUrl
2024-07-21 00:52:32 +08:00
blumia eb2e2e93f9 refactor(playlist): playlist itself as model
This could make state management easier, and also make it reusable
just in case we need to attach the playlist to a view.
2024-07-20 23:18:42 +08:00
blumia 4a095a0cfd chore: add jfif to supported formats 2024-07-20 13:53:29 +08:00
zhongyic00 d01297043e fix: playlist filter should consider plugins
setAutoLoadFilterSuffix with formats dynammically got from QImageReader, fix https://github.com/BLumia/pineapple-pictures/issues/120
2024-07-20 13:36:03 +08:00
ae257ea567 i18n: Translations update from Hosted Weblate (#119)
* Translated using Weblate (Japanese)
* Translated using Weblate (Norwegian Bokmål)

Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

---------

Co-authored-by: mmahhi <masa10suda@gmail.com>
Co-authored-by: ovl-1 <ovl-002@mailinator.com>
2024-07-20 13:04:55 +08:00
blumia edb1a84601 chore(CI): msvc build also build with exiv2 2024-07-13 15:59:13 +08:00
blumia 0436dfab39 chore: add FUNDING.yml 2024-07-07 13:43:28 +08:00
Weblate (bot) 87ed730891 chore: Make transifex CI happy
Since the actual translation content didn't change at all.
2024-07-07 13:39:54 +08:00
blumia 85d6762828 chore: remove vendored FindLibExiv2.cmake 2024-07-06 18:46:08 +08:00
blumia a6360d5e66 CI(msvc): clean before deploy and use newer qt 2024-07-06 16:38:45 +08:00
blumia a217ce9ee8 CI(msvc): switch to Qt 6 and CMake 2024-07-06 15:23:33 +08:00
blumia 9fe3aca774 chore: release 0.8.0 2024-06-29 14:33:26 +08:00
blumia c636b14af8 chore: temporary limit svg support to Tiny 1.2-only 2024-06-28 18:40:50 +08:00
blumia f8587020d7 chore(CMake): make use of qt_add_translations 2024-06-28 18:39:16 +08:00
blumia 495ff31518 fix(CI): cinst no longer available, also use Qt 6.7 2024-06-28 12:38:49 +08:00
2671b6061d i18n: Translations update from Hosted Weblate (#116)
* Translated using Weblate (Turkish)

Currently translated at 100.0% (147 of 147 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

* Translated using Weblate (Italian)

Currently translated at 100.0% (147 of 147 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (147 of 147 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Added translation using Weblate (Spanish)

* Translated using Weblate (Spanish)

Currently translated at 100.0% (7 of 7 strings)

Translation: pineapple-pictures/AppStream Metadata
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/es/

---------

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2024-06-28 12:33:14 +08:00
blumia d52f22c0de chore(CI): add ubuntu 24.04 build 2024-05-18 00:22:55 +08:00
blumia 471f6b9f32 chore: update README and project file tweaks 2024-04-28 00:12:44 +08:00
blumia 2a30cc0dd3 fix(CI): build with macos-latest M1 runner 2024-04-27 13:24:49 +08:00
blumia 8435fa0a9d chore: update README 2024-04-25 23:19:54 +08:00
blumia 99252ab732 chore(CI): skip tls and networkinformation qt plugin 2024-04-20 16:59:50 +08:00
blumia 7ec4420eaf chore(UI): add icon for properties action
I didn't add this icon because QTBUG-124085, and since I fixed that
issue (and also since we won't use Qt 6.7.0 for Windows build), let's
add the icon back ;)
2024-04-20 13:53:44 +08:00
blumia a83cc61148 fix: incorrect header include position 2024-04-19 00:48:28 +08:00
blumia e0fda8f3b0 feat: support move image file to trash
Resolve: BLumia/pineapple-pictures#42
2024-04-15 01:16:00 +08:00
Weblate (bot)andmmahhi 37cfdad799 i18n: Translated using Weblate (Japanese) (#114)
Currently translated at 100.0% (144 of 144 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

Co-authored-by: mmahhi <masa10suda@gmail.com>
2024-04-15 01:14:31 +08:00
blumia 370e64f192 chore(AppStream): add id for developer tag 2024-04-14 20:07:10 +08:00
blumia d27f94bc4d chore: release 0.7.4 2024-04-12 20:25:07 +08:00
blumia be20c3d389 chore: use Qt 6 by default 2024-04-05 14:07:29 +08:00
blumia 6145925283 feat: add some icons for corresponding menu actions 2024-04-03 19:56:46 +08:00
blumia bba4863853 chore: hello again, 2024! 2024-03-17 00:05:04 +08:00
blumia a459dc2be6 i18n: update AppStream metainfo translation
...and translators.html
2024-03-17 00:02:52 +08:00
f1da25f766 i18n: Translations update from Hosted Weblate (#111)
* Translated using Weblate (Ukrainian)
* Translated using Weblate (Turkish)

---------

Co-authored-by: Сергій <sergiy.goncharuk.1@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
2024-03-15 15:11:18 +08:00
blumia 0e8370c39a chore(CI): bump workflow and dependencies version 2024-02-16 13:33:10 +08:00
blumia a452ea2644 chore: hello 2024 2024-02-16 11:58:32 +08:00
blumia 2fc6c59a30 chore: update translators.html 2023-12-10 16:06:31 +08:00
blumia 67e6eac520 i18n: update AppStream metainfo translations 2023-12-10 16:01:11 +08:00
710d633678 i18n: Translations update from Hosted Weblate (#110)
* Added translation using Weblate (Ukrainian)
* Added translation using Weblate (Japanese)

---------

Co-authored-by: volkov <d2oo1dle2x@gmail.com>
Co-authored-by: mmahhi <masa10suda@gmail.com>
2023-12-10 14:43:42 +08:00
23f160221b i18n: Translations update from Hosted Weblate (#106)
* Translated using Weblate (Ukrainian)
* Translated using Weblate (Japanese)
* Translated using Weblate (Indonesian)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/

---------

Co-authored-by: volkov <d2oo1dle2x@gmail.com>
Co-authored-by: mmahhi <masa10suda@gmail.com>
Co-authored-by: Reza Almanda <rezaalmanda27@gmail.com>
2023-11-28 12:51:53 +08:00
rewine 2d718b013b chore: use std::as_const() instead of qAsConst
Waring: constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]
2023-11-27 09:36:07 +08:00
blumia 19de914046 fix(CI): disable some options when building karchive 2023-11-26 01:41:39 +08:00
blumia 1aa9674179 fix(CI): add NEWS file to REUSE dep5 config file 2023-11-26 00:59:53 +08:00
blumia fd5929bc47 chore: add NEWS file and update AppStream metainfo file 2023-10-24 19:12:25 +08:00
blumia 6158dfa630 chore: prepare release for 0.7.3 2023-10-22 23:47:13 +08:00
9300f7812f Translations update from Hosted Weblate (#102)
* Translated using Weblate (Italian)
* Translated using Weblate (Spanish)
* Translated using Weblate (Dutch)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/it/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

---------

Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
2023-10-22 23:39:15 +08:00
blumia 9677fed3f2 i18n: tweak the copywriting for 'Keep transformation', update ts files 2023-10-15 17:42:46 +08:00
blumia 7634c6db2b chore: update translators.html 2023-10-15 17:32:01 +08:00
438103587a Translations update from Hosted Weblate (#101)
* Translated using Weblate (Japanese)

Currently translated at 100.0% (142 of 142 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

* Translated using Weblate (Korean)

Currently translated at 100.0% (142 of 142 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/

---------

Co-authored-by: mmahhi <masa10suda@gmail.com>
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
2023-10-15 17:27:50 +08:00
blumia 6e5bde68d8 feat: add "Keep transformation" to menu
This could be helpful when viewing a gallery with similar size, which
need to apply same transformation to the view. E.g. When viewing a batch
of pixel image sprite assets, the view might need to be zoomed to clearly
view the detail of the image.

Other use-case can be seen at the linked issue below.

https://github.com/BLumia/pineapple-pictures/issues/87
https://github.com/BLumia/pineapple-pictures/issues/89
2023-10-15 17:12:46 +08:00
blumia 27be83184e chore: update appstream info 2023-09-29 14:09:43 +08:00
blumia e79b5d3448 i18n: update appstream metadata 2023-08-27 00:29:26 +08:00
f420a61077 Translations update from Hosted Weblate (#98)
* Added translation using Weblate (Dutch)

* Added translation using Weblate (Russian)

---------

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
2023-08-27 00:18:31 +08:00
blumia e927708f78 i18n: better approach to load translations 2023-08-26 23:39:34 +08:00
blumia 248f889cb3 i18n: update translators.html and appstream metadata 2023-08-26 23:38:27 +08:00
ecfaf7f02b Translations update from Hosted Weblate (#97)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 86.6% (123 of 142 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Added translation using Weblate (Dutch)

* Added translation using Weblate (Russian)

* Translated using Weblate (Dutch)

Currently translated at 100.0% (7 of 7 strings)

Translation: pineapple-pictures/AppStream Metadata
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/nl/

* Translated using Weblate (Russian)

Currently translated at 100.0% (7 of 7 strings)

Translation: pineapple-pictures/AppStream Metadata
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/appstream-metadata/ru/

---------

Co-authored-by: ovl-1 <ovl-002@mailinator.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
2023-08-26 23:09:33 +08:00
blumia 116d24087a CI(Windows): updated to use zlib 1.3 2023-08-22 20:34:33 +08:00
blumia 32fc6735bd i18n: add translation support for AppStream metadata 2023-08-22 19:48:30 +08:00
blumia c5a5d07f50 chore: update translators.html 2023-08-14 23:09:59 +08:00
eea7b24f6e Translations update from Hosted Weblate (#94)
* Translated using Weblate (Dutch)
* Translated using Weblate (Russian)
* Translated using Weblate (Ukrainian)
* Translated using Weblate (Spanish)
* Added translation using Weblate (Italian)
* Translated using Weblate (Turkish)
* Translated using Weblate (Italian)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/

---------

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
Co-authored-by: Dan <jonweblin2205@protonmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: albanobattistella <albano_battistella@hotmail.com>
Co-authored-by: Sabri Ünal <libreajans@gmail.com>
2023-08-14 23:03:59 +08:00
blumia 67762b357d fix(Qt6): don't set image allocation limit
User might needs to load large image which isn't corrupted, see GH-28
for example. This restores Qt 5's default behavior.
2023-08-13 21:06:33 +08:00
blumia d80c661c66 fix: app icon install location and file name under Linux 2023-07-31 08:27:32 +08:00
blumia 0e1ec979cf fix: make appstream-util validate happy 2023-07-30 23:59:57 +08:00
blumia ee3198f448 chore: add content rating and one release info to AppStream data for flatpak package submission 2023-07-30 23:25:30 +08:00
blumia 0c78d3668b chore: add screenshots to AppStream data for flatpak package submission 2023-07-30 16:40:25 +08:00
blumia 4c2af150a6 fix: use win32api to get application location 2023-07-28 21:18:37 +08:00
blumia 9a9f61ae2f i18n: update ts files 2023-07-15 19:54:41 +08:00
blumia 0e1635e0e7 feat: add hidpi rounding policy option to setting dialog 2023-07-10 01:07:01 +08:00
blumia d4ded92734 feat: add option to avoid reset transform when switching between images
It's not enabled for now so it's not available to end-users.
2023-07-09 15:40:15 +08:00
blumia f96da17e78 build(ci): bump Qt 6 version for Windows build 2023-07-05 23:43:45 +08:00
blumia 1431f2b9d0 chore(AppStream): add launchable and developer info to metainfo.xml 2023-06-28 22:11:30 +08:00
blumia 7db7cfd85a fix: config file location under Linux should contain app name 2023-06-27 00:37:59 +08:00
yyc12345 1e3d68df1c fix: disable resizing and moving in maximized or fullscreen window 2023-06-24 16:43:31 +08:00
yyc12345 6fc9534184 refactor(FramelessWindow): use Qt API for window resizing (#81)
No longer use Win32API for window resizing. This should work under all platforms that support window resizing.
2023-06-24 14:37:54 +08:00
blumia 6f28878837 feat: add tif and tiff to auto load suffix list
Issue: https://github.com/BLumia/pineapple-pictures/issues/88
2023-06-19 00:12:22 +08:00
blumia c51ec4bd5d fix: avoid hard-code the size of the settings dialog 2023-06-18 22:55:55 +08:00
blumia a29a1806a3 chore: avoid using deprecated function in qt6 builds 2023-06-06 00:15:43 +08:00
blumia c69483eff1 chore: bump and support exiv2 version 0.28.0
0.27.x is still supported for now.
2023-06-04 21:58:16 +08:00
blumia edceac754f chore: remove trivial macro from CMakeLists 2023-06-04 13:50:34 +08:00
blumia 6a992f4c1f feat: able to show file name in window title 2023-05-29 23:59:45 +08:00
blumia 5aeb0f821f chore!: drop Qt version lower than 5.15.2 2023-05-21 00:36:24 +08:00
blumia 235e50439f chore: update translators.html 2023-05-11 18:45:07 +08:00
ae931c8c51 Translations update from Hosted Weblate (#83)
* Translated using Weblate (Korean)

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/uk/

---------

Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Co-authored-by: Dan <denqwerta@gmail.com>
2023-05-11 18:39:10 +08:00
blumia 3b279fca6a fix: allow right click on animated image 2023-05-01 19:10:39 +08:00
blumia a55e873c48 fix: window resizing not working under Qt 6
This is a workaround solution for QTBUG-112356. See the following
discussion for details. Thanks @yyc12345 from GitHub for finding
the cause of the issue.

Related: https://github.com/BLumia/pineapple-pictures/pull/81
2023-04-16 20:00:51 +08:00
blumia 20e028a643 chore: update translators.html 2023-04-08 16:32:20 +08:00
777589e2dc Translations update from Hosted Weblate (#78)
* Translated using Weblate (Japanese)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/zh_Hans/

* Translated using Weblate (Russian)

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (137 of 137 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

---------

Co-authored-by: Black Cat <blackcat1838s@outlook.com>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Percy Hong <doraemonworldx@gmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
2023-04-08 16:26:30 +08:00
blumia c7727d233e chore(CI): add Qt 6 build, other minor updates 2023-03-25 19:50:29 +08:00
blumia e8722c687a i18n: update ts files 2023-03-23 00:06:40 +08:00
blumia 2e2cbd40fa feat: add two new exif property support 2023-03-22 23:10:02 +08:00
blumia aa1e1b12ac CI(Windows): bump dependencies version 2023-03-18 14:33:44 +08:00
blumia c6a7032d73 build(CMake): also support build with Qt6 2023-02-19 01:04:58 +08:00
blumia e472000507 fix(CI): AppleClang build failed fix 2023-02-15 19:09:09 +08:00
blumia b11ea43ee5 fix: crash if unusual xmp tag used when open property dlg 2023-02-15 00:04:10 +08:00
blumia bf89476421 chore: bump copyright year 2023-02-14 23:13:23 +08:00
e03a6e6c34 Translations update from Hosted Weblate (#77)
* Translated using Weblate (Spanish)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

---------

Co-authored-by: Black Cat <blackcat1838s@outlook.com>
Co-authored-by: Génesis Toxical <tamaramartinez@outlook.com>
2023-02-12 13:03:13 +08:00
blumia 24f10168dc chore: update translators.html 2023-02-04 17:49:07 +08:00
09dfbb0630 Translations update from Hosted Weblate (#76)
* Translated using Weblate (Spanish)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

---------

Co-authored-by: Génesis Toxical <tamaramartinez@outlook.com>
Co-authored-by: Black Cat <blackcat1838s@outlook.com>
2023-01-30 18:51:26 +08:00
blumia 69f3d9920a fix(ci): use kf5 branch for kdelibs 2023-01-28 19:37:16 +08:00
Gary Wang dfc0571fbe chore: update translators.html 2022-11-12 14:48:31 +08:00
Weblate (bot)andbgo-eiu 62f80b1cbc Translations update from Hosted Weblate (#73)
* Added translation using Weblate (Punjabi (Pakistan))
* Translated using Weblate (Punjabi (Pakistan))

Currently translated at 40.0% (54 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/pa_PK/

Co-authored-by: bgo-eiu <huyaqoob+toolforge@gmail.com>
2022-11-12 14:35:11 +08:00
Gary Wang d1fbf64011 fix: proper check for filemanager1 dbus 2022-11-01 20:58:48 +08:00
Gary Wang 51e49ab8a8 chore: add fallback in case filemanager1 dbus failed 2022-10-30 12:01:58 +08:00
Gary Wang de394389e9 fix: select item no longer work via filemanager1 dbus 2022-10-30 01:55:45 +08:00
Gary Wang 5534753786 fix(ci): bump zlib version 2022-10-29 23:41:07 +08:00
Gary Wang b83de962cb feat: open folder will also select file on linux 2022-10-29 23:35:30 +08:00
Allan Nordhøy a24c246fc7 Translated using Weblate (Norwegian Bokmål)
Currently translated at 88.8% (120 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/
2022-10-29 15:51:19 +08:00
Gary Wang 8347028871 fix: blurry when raster image scaled down 2022-10-06 14:24:11 +08:00
Gary Wang 1cc5480f7d chore: update translators.html 2022-10-02 11:25:00 +08:00
Weblate (bot)andToni Estévez 4fecf2da84 Translations update from Hosted Weblate (#66)
* Added translation using Weblate (Catalan)

* Translated using Weblate (Spanish)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (Catalan)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ca/

Co-authored-by: Toni Estévez <toni.estevez@gmail.com>
2022-10-01 00:20:30 +08:00
Gary Wang d535dedf60 fix: image blurry on Hi-DPI devices 2022-09-30 00:24:04 +08:00
Chris Xiong cc7d58d4ec fix: proper svg icon rendering on hidpi screen. 2022-09-29 19:06:51 +08:00
Gary Wang 756d0be32f chore: update translators.html 2022-08-28 14:45:10 +08:00
Génesis Toxical 24f1c4e6d8 Translated using Weblate (Spanish)
Currently translated at 80.7% (109 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/
2022-08-28 14:40:17 +08:00
Gary Wang 8b007bbc3e CI(windows): bump dependencies version 2022-08-17 00:40:51 +08:00
ec0427a153 Translations update from Hosted Weblate (#62)
* Translated using Weblate (French)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (Japanese)

Currently translated at 20.0% (27 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ja/

Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
Co-authored-by: Gary Wang <wzc782970009@gmail.com>
2022-08-14 13:48:38 +08:00
Gary Wang 0bbf148af6 i18n: initial uncompleted Japanese translation 2022-08-07 18:43:18 +08:00
Gary Wang 93d1ca928e chore: allow Meta+Up to maximize under Windows with Qt 6 2022-06-25 23:52:35 +08:00
Gary Wang 56e5f078c7 feat: add REUSE license check 2022-06-19 16:33:29 +08:00
Gary Wang 814068fa34 chore: add license headers for REUSE license check 2022-06-19 16:17:47 +08:00
Maxime Leroy 9f2e004951 Translated using Weblate (French)
Currently translated at 99.2% (134 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/
2022-06-19 13:16:01 +08:00
Gary Wang 75da5e8ca5 chore: use const reference for a lambda slot 2022-06-04 17:09:12 +08:00
Gary Wang b033370d8e build: link user32.lib when build with QMake and MSVC (#59)
* build(msvc): add test for qmake build with msvc under windows
* fix(msvc): should link user32.lib under windows
* Update README.md
2022-05-29 01:06:00 +08:00
Gary Wang a2d8a0cd12 chore: Update CI link in README.md 2022-05-15 13:48:16 +08:00
Gary Wang ea588211fc chore: update translators.html 2022-05-13 00:04:07 +08:00
f09e5c8349 Translations update from Hosted Weblate (#54)
* Translated using Weblate (Dutch)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

* Translated using Weblate (Russian)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (German)

Currently translated at 100.0% (135 of 135 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/de/

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Andrey <andrey@mailbox.org>
Co-authored-by: sal0max <msal.coding@gmail.com>
2022-05-12 00:20:56 +08:00
Gary Wang 25c27e080d CI: add Ubuntu 22.04 build (#55)
* CI: add Ubuntu 22.04 build

* fix: job name cannot contain dot
2022-05-11 19:56:03 +08:00
Gary Wang 6bea81f6b8 update ts files 2022-04-13 00:05:06 +08:00
Gary Wang b5d723017a i18n: strings for the default window size option 2022-04-13 00:03:37 +08:00
Gary Wang d645c0f3be chore: comment out an option since string not localized 2022-04-04 01:14:02 +08:00
Gary Wang 4babf20427 fix(ci): update zlib url 2022-04-03 19:18:26 +08:00
Gary Wang 6270910e12 fix: caching scaled image to avoid lagging when panning large image 2022-04-03 19:08:14 +08:00
Gary Wang c9dadcbcad refactor: use QMetaEnum 2022-03-12 10:35:23 +08:00
Gary Wang 432266a6f0 feat: option for set window startup size 2022-03-11 16:22:44 +08:00
5674230c4c Translations update from Hosted Weblate (#51)
* Translated using Weblate (Dutch)

Currently translated at 100.0% (132 of 132 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Russian)

Currently translated at 100.0% (132 of 132 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (French)

Currently translated at 100.0% (132 of 132 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
2022-03-05 12:23:31 +08:00
Gary Wang 6accd06864 i18n: update ts files 2022-02-09 00:16:44 +08:00
Gary Wang 0bf8e380de i18n: update copywriting for copyright description 2022-02-09 00:12:37 +08:00
Gary Wang d51eb796b9 i18n: copywriting for show in directory feature 2022-02-09 00:05:22 +08:00
Gary Wang 9e1b10831a feat: open containing folder 2022-02-01 17:19:36 +08:00
Gary Wang 00168a34f0 ci(windows): update dependencies version 2022-01-21 17:12:17 +08:00
Gary Wang d7028b5515 Update translators.html 2022-01-17 23:33:59 +08:00
Gary Wang 052d23be60 fix: display system-native path separators 2022-01-14 13:05:11 +08:00
Weblate (bot)andE-Akcaer 9f4c9c7376 Translations update from Hosted Weblate (#47)
* Added translation using Weblate (Turkish)

* Translated using Weblate (Turkish)

Currently translated at 100.0% (127 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/tr/

Co-authored-by: E-Akcaer <gurbetcii_@hotmail.com>
2022-01-09 11:52:49 +08:00
Gary Wang 82eb53208e Update translators.html 2021-12-19 00:14:02 +08:00
Weblate (bot)andMaxime Leroy a6c08f32e5 Translations update from Hosted Weblate (#39)
* Translated using Weblate (French)

Currently translated at 88.1% (112 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (127 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
2021-12-18 00:50:24 +08:00
Gary Wang c6b78597e8 shortcuts: left/right for prev/next image, hide open action from menu 2021-12-17 13:36:20 +08:00
Gary Wang f202bb58f4 feat: new action for open a dialog to select image files 2021-11-25 22:54:37 +08:00
Gary Wang 560ece0f2f Update README.md 2021-11-24 23:55:22 +08:00
Gary Wang 3f327f94dc fix: mouse back should show previous image 2021-10-08 22:24:55 +08:00
Gary Wang 7a1816cbac fix: do mouse gallery navigation on btn release 2021-10-08 19:31:19 +08:00
Gary Wang 3a442b35f6 feat: support forward/back button on mouse for image navigation 2021-10-08 14:06:18 +08:00
Gary Wang a4416cd77c chore: initial Qt6 build support 2021-10-02 19:58:13 +08:00
Gary Wang 26c4c8871d fix(bottombar): disable border style if no focus on it 2021-09-30 01:41:20 +08:00
Gary Wang c6d0a4e508 fix: should be able to see tab focus white box in bottom bar
But actually trigger action for widget under focus need to press
the spacebar in Qt, but we already use spacebar for quit app, so
it might be actually useful once we got a proper shortcut setting
thing.
2021-09-27 18:59:03 +08:00
Gary Wang b994d3e381 ci: bump dependency version 2021-08-09 00:05:30 +08:00
Gary Wang c0b9d7c21d add new language file to qmake project file 2021-08-06 00:19:24 +08:00
Gary Wang fcd5e2cb84 fix: disable auto fit after clicking actual size button 2021-08-04 19:30:12 +08:00
Gary Wang 64fa580131 Update translators.html 2021-08-03 19:13:20 +08:00
24e259cb8b Translations update from Weblate (#33)
* Added translation using Weblate (Indonesian)

* Translated using Weblate (Russian)

Currently translated at 98.4% (125 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Indonesian)

Currently translated at 5.5% (7 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/id/

* Translated using Weblate (Russian)

Currently translated at 100.0% (127 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Indonesian)

Currently translated at 62.2% (79 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/id/

* Translated using Weblate (Russian)

Currently translated at 100.0% (127 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

Co-authored-by: liimee <alt3753.7@gmail.com>
Co-authored-by: Artem <Localizer_in_Russian@protonmail.com>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
Co-authored-by: Andrey <andrey@mailbox.org>
2021-08-03 19:01:18 +08:00
Gary Wang e8e7940abe fix: no longer display resolution info for image that not supported such info 2021-07-23 17:45:35 +08:00
Gary Wang c5e48d07ed misc: update image url used in README 2021-07-15 14:05:16 +08:00
328800a153 Translations update from Weblate (#32)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 90.5% (115 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (127 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Sinhala)

Currently translated at 46.4% (59 of 127 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/si/

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: HelaBasa <R45XvezA@protonmail.ch>
2021-07-14 12:43:24 +08:00
Gary Wang 950e91a7cf Update README.md 2021-07-13 00:28:41 +08:00
Gary Wang 7d2816e544 chore: hide two actions that not ready to be in release 2021-07-10 17:07:35 +08:00
Gary Wang 6b2db55b84 fix: now always copy original pixmap 2021-07-06 13:25:53 +08:00
Gary Wang a400dcaeb1 i18n: update ts files 2021-07-04 01:27:29 +08:00
Gary Wang 62f485006f feat: display more image metadata 2021-07-04 01:23:13 +08:00
Gary Wang 066b8458f4 chore: use utf8 for decoding metadata value 2021-07-03 00:28:36 +08:00
Gary Wang c9e3274188 chore: use QToolButton instead of QPushButton for bottom bar 2021-07-02 00:06:23 +08:00
Gary Wang e20562cf16 fix: prev and next arrow not vertically centered in some case 2021-07-01 22:43:11 +08:00
Gary Wang 7a0ed5bd56 fix: zoom out and then reset scale will display a mosaic image 2021-06-28 19:10:08 +08:00
Gary Wang 3f9fa65edd ui: rework all action icons 2021-06-26 21:44:38 +08:00
Gary Wang 36c54addce fix: use a workaround to avoid pixelated when zoomed out
GH-31
2021-06-20 14:59:48 +08:00
Gary Wang 4c07a89ca3 chore: tweak fit-in-view menu action behavior 2021-06-07 14:16:42 +08:00
Gary Wang 635199b85b feat: add fit-in-view action 2021-06-04 13:53:47 +08:00
Gary Wang 3e51cd5603 fix(CI): QT_PLUGIN_INSTALL_DIR is deprecated, use KDE_INSTALL_QTPLUGINDIR instead 2021-05-29 10:44:12 +08:00
Gary Wang 71e8df3107 fix: memory leak when switching between animated image files 2021-05-21 00:06:37 +08:00
Gary Wang 8b86fb1434 fix: use metainfo.xml suffix instead of appdata.xml
resolve: GH-30
2021-05-19 01:11:41 +08:00
Gary Wang 038d04b3da feat: fit by width
Signed-off-by: Gary Wang <wzc782970009@gmail.com>
2021-05-14 00:10:08 +08:00
Gary Wang 69802a433e fix: navigator view not get updated in some edge case
Signed-off-by: Gary Wang <wzc782970009@gmail.com>
2021-05-12 13:55:04 +08:00
Gary Wang e4d54e85e2 Update README.md 2021-05-01 09:58:26 +08:00
b12328f41e Translations update from Weblate (#29)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 90.9% (110 of 121 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (121 of 121 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Russian)

Currently translated at 100.0% (121 of 121 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
2021-04-29 00:00:58 +08:00
Gary Wang 6acafc77b4 feat: add exif copyright info and gif frame count to property dialog
also fix some letter case issue in original copywriting.
2021-04-17 00:50:59 +08:00
fa4b49ddf7 Translations update from Weblate (#27)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 91.4% (107 of 117 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (117 of 117 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

* Translated using Weblate (Russian)

Currently translated at 100.0% (117 of 117 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Russian)

Currently translated at 100.0% (117 of 117 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Heimen Stoffels <vistausss@outlook.com>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
2021-04-17 00:12:18 +08:00
Gary Wang 8ae93ac4ae fix: should show any animated image than just gif 2021-04-15 00:00:18 +08:00
Gary Wang 52a7883dbf ci(build): use the install/strip target instead of CMAKE_CXX_FLAGS_RELEASE 2021-04-08 13:18:02 +08:00
Gary Wang 8c05969c18 fix: get rid of wrong tr() usage 2021-04-06 22:11:09 +08:00
Gary Wang 8d80f263b0 feat: add default shortcuts for some actions 2021-04-05 23:21:15 +08:00
Gary Wang 114e7359cd misc: don't call parent method since we don't need 2021-04-04 11:17:44 +08:00
Gary Wang 622938ac23 fix: always rotate according to current viewport state 2021-03-29 22:43:37 +08:00
Gary Wang e1324d901c fix: always flip according to current viewport state 2021-03-27 22:22:04 +08:00
Gary Wang 483bb07b09 chore: keep flipping state while rotation and etc. 2021-03-25 23:05:50 +08:00
Gary Wang cd94f1a84c ci(windows): switch to x64 build 2021-03-21 01:19:13 +08:00
Gary Wang 6a9e5e80d0 feat: basic image flip support 2021-03-19 23:13:22 +08:00
Gary Wang deed477d49 fix(build): build with qmake
...and also fix missing translation strings caused by broken qmake
project file.
2021-03-14 01:12:28 +08:00
Gary Wang a98b69eb6c Update README.md 2021-03-13 14:53:31 +08:00
Gary Wang f7cc22a032 i18n: update ts files, restructure folder hierarchy 2021-03-13 14:50:53 +08:00
05f808a26d Translations update from Weblate (#26)
* Translated using Weblate (Russian)

Currently translated at 100.0% (116 of 116 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 92.2% (107 of 116 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Added translation using Weblate (Sinhala)

* Translated using Weblate (Sinhala)

Currently translated at 1.7% (2 of 116 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/si/

* Translated using Weblate (Sinhala)

Currently translated at 56.0% (65 of 116 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/si/

Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: HelaBasa <R45XvezA@protonmail.ch>
2021-03-13 14:09:30 +08:00
Gary Wang 7e7c36ea72 ci(mac): build with 5.15.2 explicitly 2021-03-09 21:41:51 +08:00
Gary Wang 6d460a27d7 fix: build with lower Qt version 2021-03-01 13:24:03 +08:00
Gary Wang 552d0fe072 fix: compat for older Qt (lower than 5.13) 2021-03-01 13:11:17 +08:00
Gary Wang b146150528 feat: Shift+Click to use color-inverted checkerboard 2021-03-01 00:44:50 +08:00
Gary Wang aecc3cf163 i18n: update ts files 2021-02-26 01:01:24 +08:00
Gary Wang 9c460f2ede chore: add webp to default image queue filter list 2021-02-26 00:57:12 +08:00
Gary Wang 6316431dcc i18n: update translator list and AppStream copywriting 2021-02-26 00:32:41 +08:00
713057412f Translations update from Weblate (#24)
* Translated using Weblate (Russian)

Currently translated at 100.0% (114 of 114 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Added translation using Weblate (Dutch)

* Translated using Weblate (Dutch)

Currently translated at 100.0% (114 of 114 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nl/

Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
Co-authored-by: Heimen Stoffels <vistausss@outlook.com>
2021-02-26 00:13:23 +08:00
Gary Wang 7a69bb2fa2 partially revert 50170eb for the maximize shortcut on Windows
Since the workaround actually doesn't work, so we
remain the old behavior unchanged.
2021-02-19 19:22:50 +08:00
Gary Wang 50170eb4aa feat: shortcuts for zoom in and out
This also fix maximize shortcut on Windows.
2021-02-19 00:04:15 +08:00
Gary Wang 858c9e0ccf chore: add max zoom-in scale limit (1000x) 2021-02-18 20:03:23 +08:00
Gary Wang 2b4bbc91a7 fix: should now be able to show property dialog for all supported files 2021-02-09 14:19:09 +08:00
Gary Wang 2b51194143 i18n: update translator list 2021-02-04 13:13:55 +08:00
356fc6f670 Translations update from Weblate (#23)
* Added translation using Weblate (Japanese)

* Translated using Weblate (Russian)

Currently translated at 100.0% (114 of 114 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 92.1% (105 of 114 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

* Deleted translation using Weblate (Japanese)

Co-authored-by: Gary Wang <wzc782970009@gmail.com>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
2021-02-04 13:00:10 +08:00
Gary Wang a9ce8b0154 fix: add missing return for canPaste check 2021-01-24 00:47:42 +08:00
Gary Wang 1449844fdd fix: avoid create menu actions everytime when trigger context menu.
fix the minor memory leak issue, also bring some possibility to
implement custom keybinding.

And oops I also did another feature in this commit..
Now we are able to set mouse wheel behavior in config dialog.
2021-01-24 00:07:58 +08:00
b3011f47e4 Translations update from Weblate (#22)
* Translated using Weblate (French)

Currently translated at 100.0% (111 of 111 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (German)

Currently translated at 97.2% (108 of 111 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/de/

* Translated using Weblate (Russian)

Currently translated at 100.0% (111 of 111 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
2021-01-20 00:15:51 +08:00
Gary Wang 9b1b125d01 fix: also move the windows include for windows build 2021-01-10 15:23:49 +08:00
Gary Wang 6d8f353602 fix: some clazy checks 2021-01-10 14:57:01 +08:00
Gary Wang 4d8d98b2ff feat: display some GPS information from EXIF metadata 2021-01-04 19:06:12 +08:00
e658fb20a9 Translations update from Weblate (#18)
* Added translation using Weblate (Spanish)

* Translated using Weblate (Spanish)

Currently translated at 17.1% (18 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/es/

* Translated using Weblate (French)

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (German)

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/de/

* Translated using Weblate (Russian)

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/zh_Hans/

Co-authored-by: William(ѕ)ⁿ <600699d5-d2ad-4cfc-a1b3-fca4d102afea@anonaddy.me>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Sergey Shornikov <sergey0000000000@gmail.com>
Co-authored-by: Percy Hong <doraemonworldx@gmail.com>
2021-01-04 18:57:04 +08:00
Gary Wang 3abc16d3ff chore: no longer based on QMainWindow
Since most of the features that QMainWindow offered will never be
used in this program. We don't need a statusbar, a menubar, etc.
2020-12-29 23:28:21 +08:00
Gary Wang dc17e1d0b1 fix: install() path for asset file, add ts files for .pro file 2020-12-25 13:53:57 +08:00
Gary Wang 7782ed0e23 chore: adjust dir structure, add translator name list 2020-12-25 13:36:34 +08:00
Gary Wang b50b69e9b8 property-dialog: hide a section if it's empty 2020-12-23 22:19:30 +08:00
Gary Wang 44d04e98e5 ci(windows): also build AOM av1 decoder for libavif 2020-12-22 16:16:16 +08:00
Gary Wang 1ec8b188d4 ci(Windows): build libavif for kimageformats to add avif format support 2020-12-22 14:21:52 +08:00
Gary Wang 5bf4fe98a4 fix(ci): perform apt update before install package for ubuntu build 2020-12-17 13:56:34 +08:00
Gary Wang 01443d5ad4 chore: remove the wsl workaround since Qt 5.15.2 fixed the issue 2020-12-17 13:04:33 +08:00
50457a7fc4 Translations update from Weblate (#15)
* Added translation using Weblate (Norwegian Bokmål)

* Translated using Weblate (French)

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (German)

Currently translated at 100.0% (105 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/de/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 89.5% (94 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/nb_NO/

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
2020-12-16 20:37:48 +08:00
Gary Wang 8d61235db7 CI: Windows build now build with Qt 5.15.2 and MinGW 8.1.0 (#17)
* ci: bump Qt version to Qt 5.15.2
* don't build expat example for expat
* set CC and CXX variable
* use VS2019 image with MinGW compiler
2020-12-16 20:23:26 +08:00
Gary Wang 41b478ddaf Update README.md 2020-12-14 13:21:30 +08:00
754e26cdf7 i18n: Translations update from Weblate (#14)
* Added translation using Weblate (French)

* Added translation using Weblate (German)

* Added translation using Weblate (Russian)

* Translated using Weblate (French)

Currently translated at 99.0% (104 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/fr/

* Translated using Weblate (German)

Currently translated at 31.4% (33 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/de/

* Translated using Weblate (Russian)

Currently translated at 70.4% (74 of 105 strings)

Translation: pineapple-pictures/Application
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/

Co-authored-by: K. Herbert <herbert.ka@mailo.com>
Co-authored-by: Artem <KovalevArtem.ru@gmail.com>
2020-12-14 13:11:04 +08:00
Gary Wang 7a19d41aeb fix(ci): Update macos.yml to use the most recent install-qt-action (#11) 2020-11-19 12:29:08 +08:00
Percy Hong 338aa646b9 feat(ci): try install deb in ubuntu ci 2020-11-18 11:17:02 +08:00
Percy Hong 5080a499ea feat(ci): enable ci at pull request 2020-11-18 11:17:02 +08:00
Percy Hong 5e81556c56 fix: lost comma in cmake depends 2020-11-18 11:17:02 +08:00
Gary Wang 2366e4426e fix(ci): use Release build for libexiv and libexpat 2020-11-17 00:11:01 +08:00
Gary Wang 13de9bdc4c feat: some other exiv metadata for display 2020-11-17 00:09:21 +08:00
Gary Wang e97dfe3a10 Fix windows ci build (#9)
* Update appveyor.yml
2020-11-16 13:19:15 +08:00
Gary Wang daab55e5a2 i18n: zh_CN translation for newly added strings 2020-11-16 00:52:19 +08:00
Gary Wang 819cd3a8f5 ci: don't install ECM for ubuntu 20.04 build
and also try to build libexiv for appveyor ci
2020-11-16 00:33:50 +08:00
Gary Wang 08f1ab570c build: vendor FindLibExiv2.cmake from ECM 2020-11-15 20:28:05 +08:00
Gary Wang 5705f02636 feat: use libexiv2 to obtain more image metadata 2020-11-15 19:53:47 +08:00
Gary Wang 8c152dc862 chore: adjusted the project directory structure 2020-11-05 14:12:58 +08:00
Gary Wang 1066fa45ea feat: more useful information from property dialog 2020-11-04 00:16:37 +08:00
Gary Wang 71c38c8e96 feat: simple property dialog 2020-11-01 13:03:53 +08:00
Gary Wang 95fd0f881c fix: should tell user if image read failed 2020-11-01 13:02:46 +08:00
Gary Wang 0a9ea1982b fix: MSVC build warning in bottombuttongroup.cpp 2020-10-29 00:17:48 +08:00
Gary Wang 0dfbb45238 misc: minor tweaks with the app icon 2020-10-28 23:56:11 +08:00
Gary Wang 7e7825760a license: wrong license descripted in appdata.xml file
Fixes #8
2020-10-24 09:39:42 +08:00
Gary Wang 203274a522 feat: try using QWindow::startSystemMove() under Qt 5.15+ 2020-10-16 01:00:11 +08:00
Gary Wang 54c54e2adf fix: styling for some text 2020-10-09 22:09:09 +08:00
Gary Wang 6da9c16c4f chore: the way we setup aboutdialog layout 2020-10-08 22:24:54 +08:00
Gary Wang 5ace4e219c chore: about dialog strings, also add a thanks tab 2020-10-05 20:43:30 +08:00
Gary Wang c78eb1a272 fix(cpack): update feedback/contact url 2020-09-30 23:54:24 +08:00
Gary Wang 7c39668eb6 feat: display git describe version string in app if possible 2020-09-29 09:45:07 +08:00
Gary Wang 4c3e370f70 fix: missing translation strings 2020-09-28 21:44:52 +08:00
Gary Wang f7aaa76985 feat: new about dialog 2020-09-28 20:10:33 +08:00
Gary Wang 5ff49f4885 fix: drag on image transparent pixels for panning viewport 2020-09-26 10:47:28 +08:00
Gary Wang 36c7eb1891 chore: some qmake love 2020-09-26 10:39:36 +08:00
Gary Wang 58210691ed chore: rename the desktop file 2020-09-15 12:03:03 +08:00
Gary Wang 0eb9886394 fix: appstream data summary language not using english 2020-09-15 11:31:52 +08:00
Gary Wang 16ccec0d12 feat: add basic support for AppStream 2020-09-14 18:34:30 +08:00
Gary Wang e2fb1813f1 feat: load gallery for wsl$ location 2020-08-31 20:02:49 +08:00
Gary Wang 7245a4e212 docs: add readme for zh_CN language 2020-08-29 10:59:44 +08:00
359 changed files with 37641 additions and 3697 deletions

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
# .git-blame-ignore-revs
# CR LF to LF
ed5a6023326fd2ab420ded76976501be33e0b389
+5
View File
@@ -0,0 +1,5 @@
*.txt text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.ui text eol=lf
*.qml text eol=lf
+35 -6
View File
@@ -1,6 +1,6 @@
name: macOS CI
on: [push]
on: [push, pull_request, workflow_dispatch]
jobs:
build:
@@ -8,10 +8,39 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install MetaGlot
run: uv tool install git+https://github.com/SarasasChipWorkshop/metaglot.git
- name: Install Qt
uses: jurplel/install-qt-action@v2.2.1
- name: Run a qt project
uses: jurplel/install-qt-action@v4
with:
version: '6.12.0'
modules: 'qtimageformats'
cache: true
- name: Install Conan and Dependencies
id: conan
working-directory: ./
shell: bash
run: |
cmake ./
make
pip3 install wheel setuptools
pip3 install conan --upgrade
conan --version
conan profile detect
conan install --requires=exiv2/0.28.3 --generator CMakeDeps --generator CMakeToolchain --build=missing
- name: Build
run: |
cmake . -DTRANSLATION_RESOURCE_EMBEDDING=ON --preset conan-release
cmake --build --preset conan-release
- name: Deploy
run: |
macdeployqt ./scwpic.app -dmg
ls
- uses: actions/upload-artifact@v7
with:
name: "scwpic-macos-latest"
path: "*.dmg"
archive: false
+17
View File
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: CC0-1.0
name: REUSE Compliance Check
on: [push, pull_request]
jobs:
reuse-compliance-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v5
+31 -20
View File
@@ -1,24 +1,35 @@
name: Ubuntu 20.04 CI
name: Ubuntu CI
on: [push]
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
ubuntu-26-04-build:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v1
- name: Get build dept.
run: sudo apt install cmake qtbase5-dev libqt5svg5-dev qttools5-dev
- name: Build it
run: |
mkdir build
cd build
cmake ../
make
cpack -G DEB
- uses: actions/upload-artifact@v2
with:
name: ubuntu-20.04-deb-package
path: build/*.deb
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install MetaGlot
run: uv tool install git+https://github.com/SarasasChipWorkshop/metaglot.git
- name: Get build dept.
run: |
sudo apt update
sudo apt install cmake qt6-base-dev qt6-svg-dev qt6-tools-dev libexiv2-dev
- name: Build it
run: |
mkdir build
cd build
cmake ../
make
cpack -G DEB
- name: Try install it
run: |
cd build
sudo apt install ./*.deb
- uses: actions/upload-artifact@v7
with:
name: scwpic-ubuntu-26.04
path: build/*.deb
archive: false
+140
View File
@@ -0,0 +1,140 @@
name: Windows CI
on: [push, pull_request, workflow_dispatch]
jobs:
msvc-cmake-build:
strategy:
matrix:
include:
- qt_ver: '6.12.0'
vs: '2022'
aqt_arch: 'win64_msvc2022_64'
msvc_arch: 'x64'
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install MetaGlot
run: uv tool install git+https://github.com/SarasasChipWorkshop/metaglot.git
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
arch: ${{ matrix.aqt_arch }}
version: ${{ matrix.qt_ver }}
modules: 'qtimageformats'
cache: true
# we need this until miurahr/aqtinstall#1007 ships 3.3.1 for Qt >= 6.11.0 for Windows.
aqtsource: 'aqtinstall @ git+https://github.com/miurahr/aqtinstall@16db45a70b5905ad596941b223469bc86a56901e'
- name: Build
shell: cmd
run: |
:: ------ env ------
set PWD=%cd%
set VS=${{ matrix.vs }}
set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
call %VCVARS% ${{ matrix.msvc_arch }}
:: ------ dep ------
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
mkdir dependencies_src
echo ::group::===== exiv2 =====
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.7/exiv2-0.28.7-2022msvc-AMD64.zip
7z x exiv2_bin.zip -y
ren .\exiv2-0.28.7-2022msvc-AMD64 dependencies_bin
echo ::endgroup::
echo ::group::===== zlib =====
curl -fsSL -o zlib_src.zip https://github.com/madler/zlib/releases/download/v1.3.2/zlib132.zip
7z x zlib_src.zip -y -o"dependencies_src"
ren .\dependencies_src\zlib-1.3.2 zlib || goto :error
cmake ./dependencies_src/zlib -Bbuild_dependencies/zlib -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
cmake --build build_dependencies/zlib --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== AOM for libavif AVI decoding support =====
git clone -q -b v3.13.1 --depth 1 https://aomedia.googlesource.com/aom dependencies_src/aom
cmake ./dependencies_src/aom -Bbuild_dependencies/aom -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0 || goto :error
cmake --build build_dependencies/aom --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== libavif =====
curl -fsSL -o libavif-v1_3_0.zip https://github.com/AOMediaCodec/libavif/archive/v1.3.0.zip
7z x libavif-v1_3_0.zip -y -o"dependencies_src"
ren .\dependencies_src\libavif-1.3.0 libavif || goto :error
cmake ./dependencies_src/libavif -Bbuild_dependencies/libavif -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DAVIF_CODEC_AOM=SYSTEM -DAVIF_CODEC_AOM_DECODE=ON -DAVIF_CODEC_AOM_ENCODE=ON -DAVIF_LIBYUV=LOCAL || goto :error
cmake --build build_dependencies/libavif --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== expat =====
curl -fsSL -o expat_src.zip https://github.com/libexpat/libexpat/archive/R_2_7_3.zip
7z x expat_src.zip -y -o"dependencies_src"
ren .\dependencies_src\libexpat-R_2_7_3 expat || goto :error
cmake ./dependencies_src/expat/expat -Bbuild_dependencies/expat -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
cmake --build build_dependencies/expat --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== ECM =====
git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git dependencies_src/extra-cmake-modules
cmake .\dependencies_src\extra-cmake-modules -Bbuild_dependencies/extra-cmake-modules -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DBUILD_TESTING=OFF || goto :error
cmake --build build_dependencies/extra-cmake-modules --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== KArchive =====
git clone -q https://invent.kde.org/frameworks/karchive.git dependencies_src/karchive
cmake .\dependencies_src\karchive -Bbuild_dependencies/karchive -DBUILD_TESTING=OFF -DWITH_LIBZSTD=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
cmake --build build_dependencies/karchive --config Release --target=install || goto :error
echo ::endgroup::
echo ::group::===== KImageFormats =====
git clone -q https://invent.kde.org/frameworks/kimageformats.git dependencies_src/kimageformats
cmake .\dependencies_src\kimageformats -Bbuild_dependencies/kimageformats -DBUILD_TESTING=OFF -DKDE_INSTALL_QTPLUGINDIR=%QT_ROOT_DIR%\plugins || goto :error
cmake --build build_dependencies/kimageformats --config Release --target=install || goto :error
echo ::endgroup::
:: ------ app ------
echo ::group::===== App Build =====
:: YYC MARK: The GitHub runner preinstalls Inno Setup 6.7.1; align the metaglot
:: inno rendering with it via the Inno Setup version cache variable.
:: May remove or change it once GitHub updates its preinstalls to Inno Setup 7 series.
cmake -Bbuild . -DINNO_SETUP_VERSION=6 || goto :error
cmake --build build --config Release || goto :error
cmake --install build --config Release --prefix "%PWD%\build" || goto :error
echo ::endgroup::
:: ------ pkg ------
windeployqt --verbose=2 --no-compiler-runtime --no-quick-import --no-translations --no-network --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\scwpic.exe
robocopy ./dependencies_bin/bin build/bin *.dll
if ErrorLevel 8 goto :error
copy LICENSE build\bin
mkdir pack
echo ::group::===== App InnoSetup Pack =====
mkdir pack\inno
iscc "/DPublishDir=%CD%\build\bin" "/DOutputDir=%CD%\pack\inno" build\inno-metadata\scwpic.iss || goto :error
echo ::endgroup::
echo ::group::===== App MSIX Pack =====
mkdir pack\msix\staging
robocopy build\msix-metadata pack\msix\staging AppxManifest.xml
if ErrorLevel 8 goto :error
robocopy build\msix-metadata\Strings pack\msix\staging\Strings /E
if ErrorLevel 8 goto :error
robocopy dist\winmsix-icons pack\msix\staging\Assets /E
if ErrorLevel 8 goto :error
robocopy build\bin pack\msix\staging\MyApp /E
if ErrorLevel 8 goto :error
MakePri.exe createconfig /cf pack\msix\priconfig.xml /dq en-US /o || goto :error
pwsh -NoProfile -ExecutionPolicy Bypass -File dist\strip-priconfig-packaging-node.ps1 -Path pack\msix\priconfig.xml -Verbose || goto :error
MakePri.exe new /pr pack\msix\staging /cf pack\msix\priconfig.xml /mn pack\msix\staging\AppxManifest.xml /of pack\msix\staging\resources.pri /o || goto :error
MakeAppx.exe pack /l /o /v /h SHA512 /d pack\msix\staging /p pack\msix\scwpic.msix || goto :error
echo ::endgroup::
exit /B 0
:error
exit /B 1
- uses: actions/upload-artifact@v7
with:
name: "scwpic-windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-cmake-setup"
path: pack/inno/scwpic-setup.exe
archive: false
- uses: actions/upload-artifact@v7
with:
name: "scwpic-windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-cmake"
path: pack/msix/scwpic.msix
archive: false
+14
View File
@@ -1,8 +1,22 @@
# User files
*.user
*.user.*
# Why, macOS, why?
.DS_Store
# Translation files
*.qm
*.mo
# Generic Build Dir
[Bb]uild/
cmake-build-*/
# IDE/Editor config folders
.vscode/
.idea/
.qtcreator/
# Clangd cache
.cache/
+310 -87
View File
@@ -1,85 +1,195 @@
project (pineapple-pictures)
# SPDX-FileCopyrightText: 2022 - 2025 Gary Wang <git@blumia.net>
#
# SPDX-License-Identifier: MIT
cmake_minimum_required (VERSION 3.9.5)
cmake_minimum_required(VERSION 3.16)
include (GNUInstallDirs)
include (FeatureSummary)
project(sarasacw-picture VERSION 1.6.0) # don't forget to update NEWS file and AppStream metadata.
include(GNUInstallDirs)
include(FeatureSummary)
option (EXIV2_METADATA_SUPPORT "Better image metadata support via libexiv2" ON)
option (TRANSLATION_RESOURCE_EMBEDDING "Embedding .qm translation files inside resource" OFF)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_AUTOMOC ON)
set (CMAKE_AUTORCC ON)
set (QT_MINIMUM_VERSION "5.10")
set (CMAKE_AUTOUIC ON)
find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets Svg LinguistTools)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
set (PPIC_CPP_FILES
main.cpp
mainwindow.cpp
graphicsview.cpp
graphicsscene.cpp
bottombuttongroup.cpp
navigatorview.cpp
opacityhelper.cpp
toolbutton.cpp
settings.cpp
settingsdialog.cpp
set (QT_MINIMUM_VERSION "6.8")
find_package(Qt${QT_VERSION_MAJOR} ${QT_MINIMUM_VERSION} REQUIRED
COMPONENTS Widgets Svg SvgWidgets LinguistTools
OPTIONAL_COMPONENTS DBus
)
set (PPIC_HEADER_FILES
mainwindow.h
graphicsview.h
graphicsscene.h
bottombuttongroup.h
navigatorview.h
opacityhelper.h
toolbutton.h
settings.h
settingsdialog.h
if (EXIV2_METADATA_SUPPORT)
find_package(exiv2)
set_package_properties(exiv2 PROPERTIES
URL "https://www.exiv2.org"
DESCRIPTION "image metadata support"
TYPE RECOMMENDED
PURPOSE "Bring better image metadata support"
)
endif ()
set (SCWPIC_CPP_FILES
app/main.cpp
app/mainwindow.cpp
app/actionmanager.cpp
app/graphicsview.cpp
app/graphicsscene.cpp
app/bottombuttongroup.cpp
app/navigatorview.cpp
app/settings.cpp
app/settingsdialog.cpp
app/aboutdialog.cpp
app/metadatamodel.cpp
app/metadatadialog.cpp
app/exiv2wrapper.cpp
app/playlistmanager.cpp
app/fileopeneventhandler.cpp
app/playlistscout.cpp
app/playlistscouts/qtscout.cpp
app/playlistscouts/explorerscout.cpp
)
set (PPIC_QRC_FILES
resources.qrc
set (SCWPIC_HEADER_FILES
app/mainwindow.h
app/actionmanager.h
app/graphicsview.h
app/graphicsscene.h
app/bottombuttongroup.h
app/navigatorview.h
app/settings.h
app/settingsdialog.h
app/aboutdialog.h
app/metadatamodel.h
app/metadatadialog.h
app/exiv2wrapper.h
app/playlistmanager.h
app/fileopeneventhandler.h
app/playlistscout.h
app/playlistscouts/qtscout.h
app/playlistscouts/explorerscout.h
)
set (PPIC_RC_FILES
set (SCWPIC_UI_FILES
app/settingsdialog.ui
app/aboutdialog.ui
app/metadatadialog.ui
app/mainwindow.ui
)
set (SCWPIC_QRC_FILES
assets/resources.qrc
)
set (SCWPIC_RC_FILES
# yeah, it's empty.
)
set (EXE_NAME ppic)
set (EXE_NAME scwpic)
# Translation
file (GLOB PPIC_TS_FILES languages/*.ts)
set (PPIC_CPP_FILES_FOR_I18N ${PPIC_CPP_FILES})
file (GLOB SCWPIC_TS_FILES locales/app/*.ts)
set (SCWPIC_CPP_FILES_FOR_I18N ${SCWPIC_CPP_FILES})
qt5_create_translation(PPIC_QM_FILES ${PPIC_CPP_FILES_FOR_I18N} ${PPIC_TS_FILES})
find_program (METAGLOT_EXECUTABLE metaglot)
if (NOT METAGLOT_EXECUTABLE)
message (FATAL_ERROR "metaglot is required to render the localized metadata, install it from https://github.com/SarasasChipWorkshop/metaglot")
endif ()
if (WIN32)
list(APPEND PPIC_RC_FILES pineapple-pictures.rc)
# Setup Windows RC files
set (SCWPIC_RC_TEMPLATE_FILE ${CMAKE_CURRENT_BINARY_DIR}/sarasacw-picture.rc.in)
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render rc
--manifest ${CMAKE_SOURCE_DIR}/dist/sarasacw-picture.rc.in.toml
--po ${CMAKE_SOURCE_DIR}/locales/winrc/*.po
--template ${CMAKE_SOURCE_DIR}/dist/sarasacw-picture.rc.in.liquid
--output ${SCWPIC_RC_TEMPLATE_FILE}
RESULT_VARIABLE METAGLOT_RESULT
)
if (NOT METAGLOT_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to generate Windows RC file template via MetaGlot (exit code: ${METAGLOT_RESULT}).")
endif ()
configure_file (${SCWPIC_RC_TEMPLATE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/sarasacw-picture.rc @ONLY)
list (APPEND SCWPIC_RC_FILES ${CMAKE_CURRENT_BINARY_DIR}/sarasacw-picture.rc)
endif ()
add_executable (${EXE_NAME}
${PPIC_HEADER_FILES}
${PPIC_CPP_FILES}
${PPIC_QRC_FILES}
${PPIC_RC_FILES}
${PPIC_QM_FILES}
${SCWPIC_HEADER_FILES}
${SCWPIC_CPP_FILES}
${SCWPIC_UI_FILES}
${SCWPIC_QRC_FILES}
${SCWPIC_RC_FILES}
)
target_link_libraries (${EXE_NAME} Qt5::Widgets Qt5::Svg)
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS)
if (Qt6_VERSION VERSION_GREATER_EQUAL "6.9.0")
set(ADD_TRANSLATIONS_ADDITIONAL_ARGS MERGE_QT_TRANSLATIONS)
endif()
if (TRANSLATION_RESOURCE_EMBEDDING)
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${SCWPIC_TS_FILES})
else()
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${SCWPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE SCWPIC_QM_FILES)
endif()
# YYC MARK:
# We use this to disable that Qt UIC generate code like `QMetaObject::connectSlotsByName(foobar);`
# for the header file of `.ui` file, which cause this application outputs log at runtime like
# `qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionXxx_triggered()`,
# because we only use UIC for building user interface and all signals and actions are managed by ourselves.
set_target_properties(${EXE_NAME} PROPERTIES AUTOUIC_OPTIONS "-a")
# YYC MARK:
# This is essential, otherwise Qt UIC generated UI header file
# can not find our header files if there are custom widgets inside UI file.
target_include_directories(${EXE_NAME} PRIVATE app/)
target_sources(${EXE_NAME} PRIVATE ${SCWPIC_QM_FILES})
target_link_libraries (${EXE_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets)
if (exiv2_FOUND)
if(NOT TARGET Exiv2::exiv2lib AND TARGET exiv2lib)
# for exiv2 0.27.x and (macOS?) conan build
add_library(Exiv2::exiv2lib ALIAS exiv2lib)
endif()
target_link_libraries (${EXE_NAME}
Exiv2::exiv2lib
)
target_compile_definitions(${EXE_NAME} PRIVATE
HAVE_EXIV2_VERSION="${exiv2_VERSION}"
)
endif ()
if (TARGET Qt6::DBus)
target_link_libraries (${EXE_NAME}
Qt${QT_VERSION_MAJOR}::DBus
)
target_compile_definitions(${EXE_NAME} PRIVATE
HAVE_QTDBUS
)
endif()
# Extra build settings
if (WIN32)
set_property (
TARGET ${EXE_NAME}
PROPERTY WIN32_EXECUTABLE true
)
target_compile_definitions(${EXE_NAME} PRIVATE
FLAG_PORTABLE_MODE_SUPPORT=1
)
endif ()
# Helper macros for parsing and setting project version from `git describe --long` result
macro (ppic_set_version_via_describe _describe_long)
macro (scwpic_set_version_via_describe _describe_long)
string (
REGEX REPLACE
"^([0-9a-z.]*)-[0-9]+-g[0-9a-f]*$"
@@ -103,6 +213,7 @@ macro (ppic_set_version_via_describe _describe_long)
endmacro ()
# Version setup
target_compile_definitions(${EXE_NAME} PRIVATE SCWPIC_VERSION_STRING="${CMAKE_PROJECT_VERSION}")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
find_package(Git)
set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "Determine exact build version.")
@@ -113,51 +224,156 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
OUTPUT_VARIABLE _git_describe_long
)
string (REGEX REPLACE "\n" "" _git_describe_long "${_git_describe_long}")
ppic_set_version_via_describe(${_git_describe_long})
scwpic_set_version_via_describe(${_git_describe_long})
target_compile_definitions(${EXE_NAME} PRIVATE
GIT_DESCRIBE_VERSION_STRING="${_git_describe_long}"
)
endif ()
endif ()
# Helper macros for install settings
macro (ppic_convert_to_relative_path _var)
# Make sure _var is a relative path
if (IS_ABSOLUTE "${${_var}}")
file (RELATIVE_PATH ${_var} "${CMAKE_INSTALL_PREFIX}" "${${_var}}")
endif ()
endmacro ()
# Install settings
if (WIN32)
# FIXME: try to avoid install to a "bin" subfolder under windows...
# when fixed, don't forget to update the CI config file...
set (BIN_INSTALL_DIR "") # seems useless, don't know why...
set_target_properties(${EXE_NAME} PROPERTIES
WIN32_EXECUTABLE TRUE
)
# Setup Inno Setup script file
set (INNO_SETUP_VERSION "7" CACHE STRING "Major version of Inno Setup that packages the installer; decides which language files count as official in the metaglot inno rendering.")
set_property (CACHE INNO_SETUP_VERSION PROPERTY STRINGS 6 7)
set (SCWPIC_INNO_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/inno-metadata)
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render inno
--inno-version ${INNO_SETUP_VERSION}
--manifest ${CMAKE_SOURCE_DIR}/dist/scwpic.iss.in.toml
--po ${CMAKE_SOURCE_DIR}/locales/inno/*.po
--iss-template ${CMAKE_SOURCE_DIR}/dist/scwpic.iss.in.liquid
--isl-template ${CMAKE_SOURCE_DIR}/dist/scwpic.isl.liquid
--iss-path scwpic.iss.in
--isl-path "Strings/{{ lang | default: name }}.isl"
--output ${SCWPIC_INNO_OUTPUT_DIR}
RESULT_VARIABLE METAGLOT_INNO_RESULT
)
if (NOT METAGLOT_INNO_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to render Inno Setup script via MetaGlot (exit code: ${METAGLOT_INNO_RESULT}).")
endif ()
configure_file (${SCWPIC_INNO_OUTPUT_DIR}/scwpic.iss.in ${SCWPIC_INNO_OUTPUT_DIR}/scwpic.iss @ONLY)
# Setup MSIX metadata.
set (SCWPIC_MSIX_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/msix-metadata)
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render msix
--manifest ${CMAKE_SOURCE_DIR}/dist/AppxManifest.xml.in.toml
--po ${CMAKE_SOURCE_DIR}/locales/msix/*.po
--manifest-template ${CMAKE_SOURCE_DIR}/dist/AppxManifest.xml.in.liquid
--resources-template ${CMAKE_SOURCE_DIR}/dist/Resources.resjson.liquid
--manifest-path AppxManifest.xml.in
--resources-path "Strings/{{ lang }}/Resources.resjson"
--output ${SCWPIC_MSIX_OUTPUT_DIR}
RESULT_VARIABLE METAGLOT_MSIX_RESULT
)
if (NOT METAGLOT_MSIX_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to render MSIX metadata via MetaGlot (exit code: ${METAGLOT_MSIX_RESULT}).")
endif ()
configure_file (${SCWPIC_MSIX_OUTPUT_DIR}/AppxManifest.xml.in ${SCWPIC_MSIX_OUTPUT_DIR}/AppxManifest.xml @ONLY)
elseif (APPLE)
# Include icon to project
set_source_files_properties(dist/macos-icons/sarasacw-picture.icns PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources"
)
target_sources(${EXE_NAME} PRIVATE dist/macos-icons/sarasacw-picture.icns)
# Setup Info.plist related directory.
set (SCWPIC_PLIST_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/plist-metadata)
# Render Info.plist and its strings.
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render plist
--manifest ${CMAKE_SOURCE_DIR}/dist/Info.plist.in.toml
--po ${CMAKE_SOURCE_DIR}/locales/plist/*.po
--plist-template ${CMAKE_SOURCE_DIR}/dist/Info.plist.in.liquid
--strings-template ${CMAKE_SOURCE_DIR}/dist/InfoPlist.strings.liquid
--plist-path Info.plist.in
--strings-path "Resources/{{ lang }}.lproj/InfoPlist.strings"
--output ${SCWPIC_PLIST_OUTPUT_DIR}
RESULT_VARIABLE METAGLOT_PLIST_RESULT
)
if (NOT METAGLOT_PLIST_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to render Info.plist metadata via MetaGlot (exit code: ${METAGLOT_PLIST_RESULT}).")
endif ()
# Include these to project.
file (GLOB SCWPIC_PLIST_STRINGS_FILES ${SCWPIC_PLIST_OUTPUT_DIR}/Resources/*.lproj/InfoPlist.strings)
foreach (plist_strings_file ${SCWPIC_PLIST_STRINGS_FILES})
get_filename_component (plist_lproj_dir ${plist_strings_file} DIRECTORY)
get_filename_component (plist_lproj_name ${plist_lproj_dir} NAME)
set_source_files_properties (${plist_strings_file} PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources/${plist_lproj_name}"
)
target_sources (${EXE_NAME} PRIVATE ${plist_strings_file})
endforeach ()
# See https://cmake.org/cmake/help/v3.15/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html
set_target_properties(${EXE_NAME} PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST ${SCWPIC_PLIST_OUTPUT_DIR}/Info.plist.in
MACOSX_BUNDLE_INFO_STRING "${PROJECT_VERSION}, Copyright (C) 2026 Sarasa's Chip Workshop"
MACOSX_BUNDLE_GUI_IDENTIFIER org.sarasaschipworkshop.picture
MACOSX_BUNDLE_ICON_FILE sarasacw-picture.icns # contains the .icns file name, *without* the path.
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
)
elseif (UNIX)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
set (BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") # relative, usually "bin"
ppic_convert_to_relative_path(BIN_INSTALL_DIR)
set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") # "lib" or "lib64"
ppic_convert_to_relative_path(LIB_INSTALL_DIR)
# install icon
install (
FILES icons/app-icon.svg
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps"
RENAME pineapple-pictures.svg
DIRECTORY dist/freedesktop-icons/
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor"
)
# install shortcut
# generate and install desktop entry file
set (SCWPIC_DESKTOP_FILE ${CMAKE_CURRENT_BINARY_DIR}/org.sarasaschipworkshop.picture.desktop)
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render desktop
--manifest ${CMAKE_SOURCE_DIR}/dist/org.sarasaschipworkshop.picture.desktop.toml
--po ${CMAKE_SOURCE_DIR}/locales/desktop/*.po
--template ${CMAKE_SOURCE_DIR}/dist/org.sarasaschipworkshop.picture.desktop.liquid
--output ${SCWPIC_DESKTOP_FILE}
RESULT_VARIABLE METAGLOT_DESKTOP_RESULT
)
if (NOT METAGLOT_DESKTOP_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to generate .desktop via MetaGlot (exit code: ${METAGLOT_DESKTOP_RESULT}).")
endif ()
install (
FILES pineapple-pictures.desktop
FILES ${SCWPIC_DESKTOP_FILE}
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
)
# generate and install app metadata file for appstream (and some other stuff using this metadata like snapcraft)
set (SCWPIC_METAINFO_FILE ${CMAKE_CURRENT_BINARY_DIR}/org.sarasaschipworkshop.picture.metainfo.xml)
execute_process (
COMMAND ${METAGLOT_EXECUTABLE} render appstream
--manifest ${CMAKE_SOURCE_DIR}/dist/org.sarasaschipworkshop.picture.metainfo.xml.toml
--po ${CMAKE_SOURCE_DIR}/locales/appstream/*.po
--template ${CMAKE_SOURCE_DIR}/dist/org.sarasaschipworkshop.picture.metainfo.xml.liquid
--output ${SCWPIC_METAINFO_FILE}
RESULT_VARIABLE METAGLOT_METAINFO_RESULT
)
if (NOT METAGLOT_METAINFO_RESULT EQUAL 0)
message (FATAL_ERROR "Failed to generate .metainfo.xml via MetaGlot (exit code: ${METAGLOT_METAINFO_RESULT}).")
endif ()
install (
FILES ${SCWPIC_METAINFO_FILE}
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo"
)
endif()
set (INSTALL_TARGETS_DEFAULT_ARGS
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Devel
)
install (
@@ -165,34 +381,41 @@ install (
${INSTALL_TARGETS_DEFAULT_ARGS}
)
if (WIN32)
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}/translations")
else ()
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/pineapple-pictures/translations")
if (TRANSLATION_RESOURCE_EMBEDDING)
target_compile_definitions(${EXE_NAME}
PRIVATE QM_FILE_INSTALL_DIR=${QM_FILE_INSTALL_DIR}
PRIVATE TRANSLATION_RESOURCE_EMBEDDING
)
endif ()
elseif (WIN32)
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}/translations")
else()
set (QM_FILE_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sarasacw-picture/translations")
target_compile_definitions(${EXE_NAME}
PRIVATE QM_FILE_INSTALL_ABSOLUTE_DIR=${QM_FILE_INSTALL_DIR}
)
endif()
install (
FILES ${PPIC_QM_FILES}
DESTINATION ${QM_FILE_INSTALL_DIR}
)
if (DEFINED QM_FILE_INSTALL_DIR)
install(
FILES ${SCWPIC_QM_FILES}
DESTINATION ${QM_FILE_INSTALL_DIR}
)
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
# CPACK: General Settings
set (CPACK_GENERATOR "TBZ2")
set (CPACK_PACKAGE_NAME "pineapple-pictures")
set (CPACK_PACKAGE_NAME "sarasacw-picture")
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/")
set (CPACK_PACKAGE_VENDOR "Sarasa's Chip Workshop")
set (CPACK_PACKAGE_CONTACT "https://github.com/SarasasChipWorkshop/sarasacw-picture/issues/")
if (WIN32)
# ...
elseif (APPLE)
# ...
elseif (UNIX)
set (CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set (CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5svg5")
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat-plugins")
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat6-plugins")
endif()
include(CPack)
+162
View File
@@ -0,0 +1,162 @@
# Developer Notes
This document describes maintenance workflows and policies of this repository that are easy to get wrong or hard to discover from the source tree alone. It is intended for developers of this repository; see `README.md` for general instructions.
## Bumping the Version
The project version is maintained by hand in only one place, `CMakeLists.txt`. Modify its `project` statement at the top of the file when bumping the version.
Additionally, when releasing a new version of this application, please update all of the following items for a better user experience:
- `NEWS`: add a new section at the very top of the file, following the format of the existing entries.
- `dist/org.sarasaschipworkshop.picture.metainfo.xml.liquid`: add a new `<release>` element at the top of the `<releases>` section.
Finally, mark the release with a git tag named exactly `x.y.z` (no `v` prefix, strictly three numeric components).
## Maintaining Translator Credits
When adding a new translator for an existing language, or a new language, please edit `assets/htmls/special-thanks.html` by hand to show the corresponding credits in the application interface.
If you have added a language for the application, please make sure to also add it for all distribution translations. The available languages of the distribution translations should be kept synchronized with the application translations.
## Qt Version Support Policy
### Policy for CI
- The Qt version installed by the Windows and macOS workflows is pinned to the one used by the hard fork upstream ([Pineapple Pictures](https://github.com/BLumia/pineapple-pictures)).
- The Ubuntu workflow always uses the Qt provided by the package manager of the latest Ubuntu LTS version.
### Policy for the Project
The minimum Qt version that the project itself declares follows the formula `min(A, B)`, where `A` is the lowest Qt version used by any CI workflow and `B` is the Qt version shipped by the latest Debian stable release.
## File Type Associations
The image formats supported by this application are varied. Considering the workload of creating icons, we cannot assign each of them a dedicated icon, so it is inevitable that multiple file extensions share a single icon. We list this relation by packaging channel for developers, and at the same time you can also see the file extensions that each packaging channel wants to associate.
The assignment follows a categorization:
- Photographic and high dynamic range formats use the `jpg` icon.
- Formats that can carry transparency use the `png` icon.
- Bitmap artwork produced by graphics editors uses the `bmp` icon.
- Formats that contain animation use the `gif` icon.
- Vector formats, archaic formats, and icon formats use the `svg` icon.
### MSIX Package
| Cluster Name | Icon | File Extensions |
| --- | --- | --- |
| JPEG | `jpg` | `.jpg`, `.jpeg`, `.jfif` |
| GIF | `gif` | `.gif` |
| PNG | `png` | `.png`, `.apng` |
| SVG | `svg` | `.svg` |
| WebP | `png` | `.webp` |
| AVIF | `png` | `.avif` |
| ICO | `svg` | `.ico` |
| ICNS | `svg` | `.icns` |
| PSD | `bmp` | `.psd`, `.psb`, `.pdd`, `.psdt` |
| KRA | `bmp` | `.kra` |
| XCF | `bmp` | `.xcf` |
| TARGA | `svg` | `.tga` |
| TIFF | `jpg` | `.tif`, `.tiff` |
| BMP | `bmp` | `.bmp` |
| WBMP | `bmp` | `.wbmp` |
| DDS | `bmp` | `.dds` |
| HDR | `jpg` | `.hdr`, `.exr` |
| IFF | `svg` | `.iff` |
| PIC | `svg` | `.pic` |
| PCX | `svg` | `.pcx` |
| QOI | `png` | `.qoi` |
| Sun Raster | `svg` | `.ras`, `.sun` |
| ORA | `bmp` | `.ora` |
| ANI | `gif` | `.ani` |
| PFM | `jpg` | `.pfm`, `.phm` |
| SGI | `svg` | `.bw`, `.rgb`, `.rgba`, `.sgi` |
| PXR | `svg` | `.pxr` |
| SCT | `svg` | `.sct` |
### Inno Setup Installer
| Cluster Name | Icon | File Extensions |
| --- | --- | --- |
| JPEG | `jpg` | `.jpg`, `.jpeg`, `.jfif` |
| GIF | `gif` | `.gif` |
| PNG | `png` | `.png`, `.apng` |
| SVG | `svg` | `.svg` |
| WebP | `png` | `.webp` |
| AVIF | `png` | `.avif` |
| ICO | `svg` | `.ico` |
| ICNS | `svg` | `.icns` |
| PSD | `bmp` | `.psd`, `.psb`, `.pdd`, `.psdt` |
| KRA | `bmp` | `.kra` |
| XCF | `bmp` | `.xcf` |
| TARGA | `svg` | `.tga` |
| TIFF | `jpg` | `.tif`, `.tiff` |
| BMP | `bmp` | `.bmp` |
| WBMP | `bmp` | `.wbmp` |
| DDS | `bmp` | `.dds` |
| HDR | `jpg` | `.hdr`, `.exr` |
| IFF | `svg` | `.iff` |
| PIC | `svg` | `.pic` |
| PCX | `svg` | `.pcx` |
| QOI | `png` | `.qoi` |
| Sun Raster | `svg` | `.ras`, `.sun` |
| ORA | `bmp` | `.ora` |
| ANI | `gif` | `.ani` |
| PFM | `jpg` | `.pfm`, `.phm` |
| SGI | `svg` | `.bw`, `.rgb`, `.rgba`, `.sgi` |
| PXR | `svg` | `.pxr` |
| SCT | `svg` | `.sct` |
### FreeDesktop Desktop Entry
| Cluster Name | Mimetypes |
| --- | --- |
| JPEG | `image/jpeg`, `image/jpg`, `image/jpe`, `image/jpeg24` |
| PNG | `image/png` |
| GIF | `image/gif` |
| SVG | `image/svg`, `image/svg+xml` |
| BMP | `image/bmp`, `image/bmp24` |
| TIFF | `image/tif`, `image/tiff`, `image/tiff24`, `image/ptif` |
| DDS | `image/dds` |
| PCX | `image/pcx` |
| SGI | `image/sgi` |
| JNG | `image/jng` |
| JPEG 2000 | `image/j2k`, `image/jp2` |
| PICT | `image/pct` |
| HD Photo | `image/wdp` |
| camera raw | `image/arw`, `image/dng`, `image/mef` |
| Targa variants | `image/icb`, `image/vda`, `image/vst` |
| XBM | `image/xbm` |
| PhotoCD | `image/pcd` |
### macOS Application Bundle
| Cluster Name | Mimetypes | File Extensions |
| --- | --- | --- |
| JPEG | `image/jpeg` | `.jpg`, `.jpeg`, `.jfif` |
| PNG | `image/png` | `.png` |
| WebP | `image/webp` | `.webp` |
| GIF | `image/gif` | `.gif` |
| SVG | `image/svg+xml` | `.svg` |
## Adding a New File Type
A new file type must be added to every channel listed above in the same change. Specifically, you should:
- Update the tables in this document accordingly.
- Windows RC File
* Define the display name under the next numeric string key in `dist/sarasacw-picture.rc.in.toml`.
* Extend the string table ID range in `dist/sarasacw-picture.rc.in.liquid` to cover the newly added string resource.
- MSIX Package
* Define the display name in `dist/AppxManifest.xml.in.toml`.
* Add a `uap:FileTypeAssociation` element to `dist/AppxManifest.xml.in.liquid` with the extensions, the display name reference, and the logo reference.
- Inno Setup Installer
* Edit the `[Registry]` section of `dist/scwpic.iss.in.liquid`.
- Copy an existing file family block, adjust the ProgId, the referenced string and icon resources, and the extension list.
- Add the new extensions to the `SupportedTypes` registry key.
- FreeDesktop Desktop Entry
* Append the mimetype to the `MimeType=` key of `dist/org.sarasaschipworkshop.picture.desktop.liquid` (the type name and icon are resolved by the desktop environment, so nothing else is needed).
- macOS Application Bundle
* Add a `CFBundleDocumentTypes` entry to `dist/Info.plist.in.liquid` with the extensions, the display name, and the mimetypes.
* Update `dist/Info.plist.in.toml` and `dist/InfoPlist.strings.liquid` for the display name translation.
+22 -21
View File
@@ -1,21 +1,22 @@
MIT License
Copyright (c) 2019 BLumia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2026 BLumia
Copyright (c) 2026 Sarasa's Chip Workshop
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+396
View File
@@ -0,0 +1,396 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
+121
View File
@@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
+9
View File
@@ -0,0 +1,9 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+301
View File
@@ -0,0 +1,301 @@
Version 1.6.0
~~~~~~~~~~~~~
Released: 2026-08-22
Features:
* Allow dragging window from titlebar to move window when maximized
* Add an option to show/hide bird-eye view
Bugfixes:
* Maximize the window when the image size matches the screen size
* Fix window might stuck when drag move on some ill-formed window manager
* Make titlebar respect RTL layout
Miscellaneous:
* Update translations
* Update Qt version to 6.11.2 for Windows and macOS pre-built binaries
Contributors:
Tech-Tac, Heimen Stoffels (vistaus), VenusGirl, Oğuz Ersen
Version 1.5.0
~~~~~~~~~~~~~
Released: 2026-07-04
Features:
* Introduced an optional titlebar that display file name and allows drag and double-click to move and toggle maximize state
* Windows: Now the application will use the system's built-in animation for open window animation
Bugfixes:
* Show empty url list should also reset window title to blank
Miscellaneous:
* Update translations
* Add vcs-browser link to AppStream metadata
Contributors:
Heimen Stoffels (vistaus), VenusGirl (VenusGirl)
Version 1.4.1
~~~~~~~~~~~~~
Released: 2026-04-05
Miscellaneous:
* Update translations
* Update Qt version to 6.10.3 for Windows and macOS pre-built binaries
Contributors:
Heimen Stoffels (vistaus), Loc Huynh (hthienloc)
Version 1.4.0
~~~~~~~~~~~~~
Released: 2026-02-11
Features:
* Action to save image as new file with different format
* Add Vietnamese and Slovenian translation
Miscellaneous:
* Update copyright year to 2026
* Update translations
* Update Qt version to 6.10.2 for Windows and macOS pre-built binaries
Contributors:
Loc Huynh, Sabri Ünal, VenusGirl, Andrej Poženel, Andrey
Version 1.3.0
~~~~~~~~~~~~~
Released: 2025-12-20
Features:
* New option to limit SVG support to SVG Tiny 1.2 standard
* Windows: ship tools and configurations that help user associate image files to this program
Bugfixes:
* Fix window not appear at the screen that the mouse cursor is at
* Fix Windows prebuilt binary having AVIF plugin included but not actually support it
Miscellaneous:
* CPack DEB: will now recommend "kimageformat6-plugins" instead of the KF5 version
* Update translations
* Update exiv2 version for Windows binary build
Contributors:
VenusGirl, Andrey
Version 1.2.1
~~~~~~~~~~~~~
Released: 2025-11-22
Bugfixes:
* Fix incorrect color when display some CMYK images.
Miscellaneous:
* Now use Qt 6.10.1 for pre-built binary
* Update README description and AppStream metainfo
* Update translations
* Update libavif, AOM and expat version for Windows binary build
Contributors:
albanobattistella
Version 1.2.0
~~~~~~~~~~~~~
Released: 2025-09-21
Features:
* Long image mode that detect extra wide image and auto fit by its thin side
* Windows: Add product version to binary metadata / resource file
Miscellaneous:
* Update translations
* Update libavif version for Windows binary build
Contributors:
Heimen Stoffels, albanobattistella, Sabri Ünal
Version 1.1.1
~~~~~~~~~~~~~
Released: 2025-08-02
Features:
* Click dock icon should show window when it's hidden on macOS
Bugfixes:
* Ensure "Fit by Width" position the view to the beginning of the image
Miscellaneous:
* Update translations
* Update Exiv2 version for Windows binary build
Contributors:
Heimen Stoffels, VenusGirl, தமிழ்நேரம்
Version 1.1.0
~~~~~~~~~~~~~
Released: 2025-07-06
Features:
* New option to disable built-in close window animation
* New option to disable gallery looping
* Support load m3u8 as image gallery playlist
Miscellaneous:
* Drop Qt 5 support
Contributors:
Heimen Stoffels, albanobattistella, தமிழ்நேரம்
Version 1.0.0
~~~~~~~~~~~~~
Released: 2025-05-03
Features:
* Support enforces windowed mode on start-up
* Reload image automatically when current image gets updated
Bugfixes:
* Display correct text language on macOS
Miscellaneous:
* Use native text for shortcut editor's label
* Display native commandline message when possible
* Merge Qt translations into app applications as well
Contributors:
Heimen Stoffels, albanobattistella, mmahhi
Version 0.9.2
~~~~~~~~~~~~~
Released: 2025-03-05
Bugfixes:
* Refer to the right exiv2 CMake module so it can be found on Linux
Miscellaneous:
* Convert DEP5 to REUSE.toml for better REUSE compliance
* Update translations
Contributors:
Pino Toscano, TamilNeram
Version 0.9.1
~~~~~~~~~~~~~
Released: 2025-01-25
Features:
* Option to double-click to fullscreen
* Build-time option to embed translation resources
Bugfixes:
* Fix window size not adjusted when open file on macOS
* Should center window according to available screen geometry
Miscellaneous:
* Change close window bahavior on macOS
* Update translations
Contributors:
albanobattistella, Sabri Ünal
Version 0.9.0
~~~~~~~~~~~~~
Released: 2024-12-08
Features:
* Support custom shortcuts for existing actions
* Actions for frame-by-frame animated image playback support
Miscellaneous:
* Initial macOS bundle support
* bump minimum required CMake version to 3.16
* Update translations
Contributors:
albanobattistella, VenusGirl, gallegonovato, Sabri Ünal
Version 0.8.2.1
~~~~~~~~~~~~~
Released: 2024-10-27
Bugfixes:
* Cannot load translations caused by a change in 0.8.2
Version 0.8.2
~~~~~~~~~~~~~
Released: 2024-10-26
Features:
* New option to allow use light-color checkerboard by default
Contributors:
albanobattistella, mmahhi, gallegonovato
Version 0.8.1
~~~~~~~~~~~~~
Released: 2024-08-25
Features:
* New command line option to list all supported formats
Contributors:
albanobattistella, mmahhi, ovl-1, gallegonovato, Oğuz Ersen
Version 0.8.0
~~~~~~~~~~~~~
Released: 2024-06-29
Features:
* Support move image file to trash
Contributors:
albanobattistella, mmahhi, gallegonovato, Oğuz Ersen
Version 0.7.4
~~~~~~~~~~~~~
Released: 2024-04-04
Features:
* Add some icons for corresponding menu actions
Contributors:
Reza Almanda, mmahhi, Oğuz Ersen, volkov, Сергій
Version 0.7.3
~~~~~~~~~~~~~
Released: 2023-10-24
Features:
* Add "Keep transformation" to menu
Contributors:
mmahhi, VenusGirl, albanobattistella, gallegonovato, Heimen Stoffels
Version 0.7.2
~~~~~~~~~~~~~
Released: 2023-08-27
Features:
* Add an option in setting dialog to tweak the High-DPI scaling rounding policy (might only works in Qt 6 build)
Bugfixes:
* Remove image size limit for Qt 6 build
* Fix application icon install location under Linux
Contributors:
Heimen Stoffels, Andrey, Dan, gallegonovato, albanobattistella, Sabri Ünal
Version 0.7.1
~~~~~~~~~~~~~
Released: 2023-07-08
Features:
* TIF and TIFF format files in the same folder will now be automatically added to the gallery
* Built-in window resizing now also supports Linux desktop. (macOS might also works as well)
Bugfixes:
* Settings dialog will automatedly use a suitable size instead of a hard-coded one
* Fix default configuration file location under Linux. (was `~/.config/config.ini`, now it's `~/.config/Pineapple Pictures/config.ini`)
Contributors:
yyc12345
-64
View File
@@ -1,64 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-09-26T23:36:07
#
#-------------------------------------------------
QT += core gui svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = PineapplePictures
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++11 lrelease embed_translations
SOURCES += \
main.cpp \
mainwindow.cpp \
graphicsview.cpp \
bottombuttongroup.cpp \
graphicsscene.cpp \
navigatorview.cpp \
opacityhelper.cpp \
toolbutton.cpp \
settings.cpp \
settingsdialog.cpp
HEADERS += \
mainwindow.h \
graphicsview.h \
bottombuttongroup.h \
graphicsscene.h \
navigatorview.h \
opacityhelper.h \
toolbutton.h \
settings.h \
settingsdialog.h
TRANSLATIONS = \
languages/PineapplePictures.ts \
languages/PineapplePictures_zh_CN.ts
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
resources.qrc
# Generate from svg:
# magick convert -background none app-icon.svg -define icon:auto-resize="16,32,48,64,128,256" app-icon.ico
RC_ICONS = icons/app-icon.ico
+59 -67
View File
@@ -1,67 +1,59 @@
Yet another image viewer.
|CI|Build Status|
|---|---|
|Windows Build|[![Windows build status](https://ci.appveyor.com/api/projects/status/dbd8clww3cit6oa0/branch/master?svg=true)](https://ci.appveyor.com/project/BLumia/pineapplepictures/branch/master)|
|macOS Build|![macOS CI](https://github.com/BLumia/pineapple-pictures/workflows/macOS%20CI/badge.svg)|
|Ubuntu 20.04 Build|![Ubuntu 20.04 CI](https://github.com/BLumia/pineapple-pictures/workflows/Ubuntu%2020.04%20CI/badge.svg)|
![Pineapple Pictures - Main Window](https://repository-images.githubusercontent.com/211888654/21fb6300-269f-11ea-8e85-953e5d57da44)
## Get it!
- [GitHub Release Page](https://github.com/BLumia/pineapple-pictures/releases)
- Archlinux AUR: [pineapple-pictures-git](https://aur.archlinux.org/packages/pineapple-pictures-git/)
## Build it manually:
Current state, we need:
- `cmake`: as the build system.
- `qt5` with `qt5-svg` and `qt5-tools`: since the app is using Qt.
Then we can build it with any proper c++ compiler like g++ or msvc.
Building it just requires normal cmake building steps:
``` bash
$ mkdir build && cd build
$ cmake ..
$ cmake --build . # or simply using `make` if you are using Makefile as the cmake generator.
```
After that, a `ppic` executable file will be available to use. You can also optionally install it by using the target `install` (or simply `make install` in case you are using Makefile). After the build process, you can also use `cpack` to make a package.
Image formats supports rely on Qt's imageformats plugins, just get the plugins you need from your distro's package manager will be fine. For Windows user, you may need build and install the imageformats plugin manually, read the content below.
### Linux
Just normal build process as other program will be fine. Nothing special ;)
For Archlinux there are also a [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pineapple-pictures-git) you can use.
For packaging to debian-based distro, the `CMakeLists.txt` provides some cpack configurations for generating a `.deb` package. After the build process, use `cpack -G DEB` to generate the package. You can also take `.github/workflows/ubuntu.yml` as a reference.
For this project, `DEB` is the only supported cpack generator in current state, feel free to submit a PR if you like improving `cpack` support for this project.
### Windows
The normal build steps for Linux is also applied to Windows, but since Windows doesn't have a decent package manager, so if you need any other image formats support other than the supported formats which Qt provided, you need to get and build these imageformats plugins manually and vendor it. It's optional and can be skipped if you don't need extra image formats support.
For the Windows binary I provided, kimageformats plugin is used (for formats like kra, xcf, psd and etc.). You can take `appveyor.yml` as a reference to learn what I did when building the Windows binary.
[KDE Craft](https://community.kde.org/Craft) environment also can be used to build and package this program. I did also created a blueprint for building this project, but since I don't have a CI to run KDE Craft build, the blueprint repo are not provided here. Maybe sometimes later.
### macOS
I don't have a mac, so no support at all. There is also a GitHub Action (see `.github/workflows/macos.yml`) running macOS build though so at least it can build. Feel free to submit a PR if you would like to give some love to the macOS build ;P
## Help Translation!
[Translate this project on Transifex!](https://www.transifex.com/blumia/pineapple-pictures/)
Feel free to open up an issue to request a new language to translate.
## License
This program released under MIT license
# Sarasa's Chip Workshop Photo Viewer
> [!IMPORTANT]
> SCW Photo Viewer is still in refactoring. Please do not use it until this message removes.
Yet another legacy Windows Photo Viewer with cross-platform support.
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/windows.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/windows.yml)
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/macos.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/macos.yml)
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/ubuntu.yml)
![SCW Photo Viewer - Main Window](https://github.com/user-attachments/assets/a58ac355-24e5-4262-9eea-c55956d89689)
## Summary
Sarasa's Chip Workshop Photo Viewer (abbr. SCW Photo Viewer) is a lightweight image viewer that has cross-platform support and similar user interface about legacy Windows Photo Viewer. It allows you view JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF and some other frequently used image formats files quickly and easily without changing your long-term Windows usage experience.
SCW Photo Viewer is the **hard fork** of [Pineapple Pictures](https://github.com/BLumia/pineapple-pictures) since Pineapple Pictures 1.4.1 version.
## Installation
Download from the places maintained by the author of this repository:
- [GitHub Release Page](https://github.com/SarasasChipWorkshop/sarasacw-picture/releases)
## Contribution
The new feature request of this application are freezed now because this application basically is a replica of legacy Windows Photo Viewer with additional cross-platform support. However, bug report and translation are welcome.
## Build Instruction
Current state, we need:
- `cmake`: as the build system.
- `python3` and [`metaglot`](https://github.com/SarasasChipWorkshop/metaglot): as the metadata localization processor. An isolated install via `uv tool` (as opposed to a global install like pip) is recommended.
- `qt6` with `qt6-svg` and `qt6-tools`: since the app is using Qt.
- `libexiv2`: able to display more image metadata. (optional, but recommended)
Then we can build it with any proper C++ compiler like g++ or MSVC.
Building it just requires normal cmake building steps:
```bash
$ mkdir build && cd build
$ cmake ..
$ cmake --build .
```
After that, a `scwpic` executable file will be available to use. You can also optionally install it by using the target `install`. After the build process, you can also use `cpack` to make a package.
The project will try to build with `exiv2` when it's available at build time, if you would like to build the project without `exiv2`, pass `-DEXIV2_METADATA_SUPPORT=OFF` to `cmake`. The project will also not use `exiv2` if it's not found, the `EXIV2_METADATA_SUPPORT` option can be useful if you have `exiv2` but specifically don't want to use it.
Image formats supports rely on Qt's imageformats plugins, just get the plugins you need from your distro's package manager will be fine. For Windows user, you may need build and install the imageformats plugin manually, read the content below.
It's possible to build it under Windows, Linux, macOS, and maybe other desktop platforms that Qt is ported to.
## License
SCW Photo Viewer as a whole is licensed under MIT license. Individual files may have a different, but compatible license.
+59
View File
@@ -0,0 +1,59 @@
# Sarasa's Chip Workshop 照片查看器
> [!IMPORTANT]
> SCW 照片查看器还在重构中。在这条信息被移除之前请不要使用它。
跨平台的、经典 Windows 照片查看器样式的照片查看器。
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/windows.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/windows.yml)
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/macos.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/macos.yml)
[![](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/SarasasChipWorkshop/sarasacw-picture/actions/workflows/ubuntu.yml)
![SCW 照片查看器 - 主窗口](https://github.com/user-attachments/assets/a58ac355-24e5-4262-9eea-c55956d89689)
## 简介
Sarasa's Chip Workshop 照片查看器(简称 SCW 照片查看器)是一个轻量级的图片查看器。支持跨平台。界面风格类似于经典的 Windows 照片查看器。它可以让你快速轻松地浏览 JPEG、PNG、GIF、SVG、PSD、KRA、XCF、TGA、HDR、AVIF 以及其他一些常用的图片格式,且无需改变你长期的 Windows 使用习惯。
SCW 照片查看器是[菠萝看图](https://github.com/BLumia/pineapple-pictures)的**硬分叉**,该分叉自菠萝看图 1.4.1 版本开始。
## 安装
从本仓库作者维护的地方下载:
- [GitHub Release 页面](https://github.com/SarasasChipWorkshop/sarasacw-picture/releases)
## 参与贡献
现在已冻结该应用的新功能请求,因为这个应用基本上是经典样式的 Windows 照片查看器的复刻,只是增加了跨平台支持。不过仍然欢迎针对该项目的错误报告和翻译。
## 构建指导
当前状态,我们需要先确保如下依赖可用:
- `cmake`:我们所使用的构建系统
- `python3` 和 [`metaglot`](https://github.com/SarasasChipWorkshop/metaglot):我们所使用的元数据本地化处理器,推荐使用 `uv tool` 进行隔离式安装(相较于 pip 那种全局式安装)
- 包含 `qt6-svg` 与 `qt6-tools` 组件的 `qt6`:此应用基于 Qt
- `libexiv2`:用以获取和显示更多的图像元信息(可选,推荐)
然后我们就可以使用任何常规的 C++ 编译器如 g++ 或 MSVC 来进行构建了
构建过程就是常规的 CMake 应用构建过程:
``` bash
$ mkdir build && cd build
$ cmake ..
$ cmake --build . # 如果你使用 Makefile 作为 CMake 生成器,也可以直接简单的使用 `make`
```
完毕后,一个名为 `scwpic` 的可执行程序即会被生成以供使用。您也可以选择通过使用 CMake 生成的 `install` 目标继续将其安装到您的设备上。构建步骤完毕后,您也可以使用 `cpack` 来对应用程序进行打包。
当 `exiv2` 在构建时可用时,此项目将尝试使用其进行构建,若您不希望使用 `exiv2`,请传递 `-DEXIV2_METADATA_SUPPORT=OFF` 参数给 `cmake`。此项目在找不到 `exiv2` 时并不会使用 `exiv2`,`EXIV2_METADATA_SUPPORT` 选项可供尽管存在可用的 `exiv2` 但您明确不希望启用其支持时使用。
此应用的图片格式支持依赖于 Qt 的 imageformats 插件,直接从您所用的发行版获取对应的图像格式插件即可。对于 Windows 用户,您可能需要手动构建和使用图像格式插件。下方给出了进一步的说明。
在 Windows、Linux 以及 macOS 系统均可构建此应用,其它有移植 Qt 支持的平台也可能可以进行构建。
## 许可协议
SCW 照片查看器整体使用 MIT 协议进行发布。项目所随的部分源文件可能具备不同但与之兼容的许可协议。
+57
View File
@@ -0,0 +1,57 @@
version = 1
SPDX-PackageName = "sarasacw-picture"
SPDX-PackageDownloadLocation = "https://github.com/SarasasChipWorkshop/sarasacw-picture.git"
[[annotations]]
path = [".gitattributes", ".git-blame-ignore-revs", ".gitignore", ".github/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ["README**.md", "DEVNOTE.md", "NEWS", "assets/**.qrc"]
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ["LICENSE"]
precedence = "aggregate"
SPDX-FileCopyrightText = ["2026 BLumia", "2026 Sarasa's Chip Workshop"]
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["app/**.ui"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Sarasa's Chip Workshop"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["assets/htmls/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = ["2026 Gary Wang", "2026 Sarasa's Chip Workshop"]
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["assets/icons/**.png"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Sarasa's Chip Workshop"
SPDX-License-Identifier = "CC-BY-4.0"
[[annotations]]
path = ["dist/**.liquid", "dist/**.toml", "dist/**.ps1"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Sarasa's Chip Workshop"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["dist/**.png", "dist/**.ico", "dist/**.icns"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Sarasa's Chip Workshop"
SPDX-License-Identifier = "CC-BY-4.0"
[[annotations]]
path = ["locales/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "Translators from hosted.weblate.org"
SPDX-License-Identifier = "MIT"
+98
View File
@@ -0,0 +1,98 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#include "aboutdialog.h"
#include "ui_aboutdialog.h"
#include <QApplication>
#include <QFile>
using namespace Qt::Literals::StringLiterals;
static QString loadEmbeddedHtml(QString&& path) {
QFile htmlFile(path);
bool canOpenFile = htmlFile.open(QIODevice::ReadOnly);
QByteArray htmlRawContent = canOpenFile ? htmlFile.readAll() : QByteArrayLiteral("");
return QString::fromUtf8(htmlRawContent);
}
AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent), ui(new QT_PREPEND_NAMESPACE(Ui::AboutDialog))
{
ui->setupUi(this);
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
// blumia: Chain two arg() here since it seems lupdate will remove one of them if we use
// the old `arg(QCoreApp::translate(), tr())` way, but it's worth to mention
// `arg(QCoreApp::translate(), this->tr())` works, but lupdate will complain about the usage.
const QString HELP_HTML = loadEmbeddedHtml(u":/htmls/help.html"_s)
.arg(tr("General Help"))
.arg(tr("Launch application with image file path as argument to load the file."))
.arg(tr("Passing in a single image file will load all the images in that directory and start viewing from that image."))
.arg(tr("Passing in multiple image files lets you view them one by one."))
.arg(tr("Drag and drop image file onto the window is also supported."))
.arg(tr("None of the operations in this application will alter the pictures on disk."))
.arg(tr("Context Menu Help"))
.arg(tr("Keep transformation", "The same meaning of MainWindow's Keep transformation."))
.arg(tr("Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images."))
.arg(tr("Checkerboard", "The same meaning of MainWindow's Checkerboard."))
.arg(tr("Checkerboard light and dark theme can be adjusted in the configuration window, or easily switch it by holding Shift and clicking the button."));
const QString APP_NAME_ARG = qApp->applicationDisplayName();
const QString APP_VERSION_ARG =
#ifdef GIT_DESCRIBE_VERSION_STRING
GIT_DESCRIBE_VERSION_STRING;
#else
qApp->applicationVersion();
#endif // GIT_DESCRIBE_VERSION_STRING
const QString QT_VERSION_ARG = QT_VERSION_STR;
const QString QT_ARCH_ARG = QSysInfo::buildCpuArchitecture();
const QString ABOUT_HTML = loadEmbeddedHtml(u":/htmls/about.html"_s)
.arg(APP_NAME_ARG)
.arg(tr("Version: %1").arg(APP_VERSION_ARG))
.arg(tr("Upstream author"))
.arg(tr("Hard fork author"))
.arg(tr("Built with Qt %1 (%2)").arg(QT_VERSION_ARG).arg(QT_ARCH_ARG))
.arg(tr("Source code"));
const QString SPECIAL_THANKS_HTML = loadEmbeddedHtml(u":/htmls/special-thanks.html"_s)
.arg(tr("Contributors"))
.arg(tr("List of contributors on GitHub"))
.arg(tr("Thanks to all people who contributed to this project."))
.arg(tr("Translators"))
.arg(tr("I would like to thank the following people who volunteered to translate this application."));
const QString LICENSE_HTML = loadEmbeddedHtml(u":/htmls/license.html"_s)
.arg(tr("License"))
.arg(tr("This application is released under the MIT License."))
.arg(tr("License Verbatim Copy"));
const QString THIRD_PARTY_LIBS_HTML = loadEmbeddedHtml(u":/htmls/third-party-libs.html"_s)
.arg(tr("Third-party Libraries"))
.arg(tr("This application is built on the following free software libraries.", "Free as in freedom"))
.arg(tr("Some of them are optional and might not be included with this distribution depending on the build environment."));
ui->m_helpTextEdit->setHtml(HELP_HTML);
ui->m_aboutTextEdit->setHtml(ABOUT_HTML);
ui->m_specialThanksTextEdit->setHtml(SPECIAL_THANKS_HTML);
ui->m_licenseTextEdit->setHtml(LICENSE_HTML);
ui->m_3rdPartyLibsTextEdit->setHtml(THIRD_PARTY_LIBS_HTML);
connect(ui->m_buttonBox, QOverload<QAbstractButton *>::of(&QDialogButtonBox::clicked), this, [this](QAbstractButton * btn){
Q_UNUSED(btn)
this->close();
});
setMinimumSize(361, 161); // not sure why it complain "Unable to set geometry"
}
AboutDialog::~AboutDialog()
{
delete ui;
}
QSize AboutDialog::sizeHint() const
{
return QSize(520, 350);
}
+29
View File
@@ -0,0 +1,29 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef ABOUTDIALOG_H
#define ABOUTDIALOG_H
#include <QDialog>
QT_BEGIN_NAMESPACE
namespace Ui {
class AboutDialog;
}
QT_END_NAMESPACE
class AboutDialog : public QDialog
{
Q_OBJECT
public:
explicit AboutDialog(QWidget *parent = nullptr);
~AboutDialog() override;
QSize sizeHint() const override;
private:
QT_PREPEND_NAMESPACE(Ui::AboutDialog) *ui;
};
#endif // ABOUTDIALOG_H
+106
View File
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutDialog</class>
<widget class="QDialog" name="AboutDialog">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="windowTitle">
<string>About</string>
</property>
<property name="minimumSize">
<size>
<width>361</width>
<height>161</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="m_tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="helpTab">
<attribute name="title">
<string>&amp;Help</string>
</attribute>
<layout class="QVBoxLayout" name="helpTabLayout">
<item>
<widget class="QTextBrowser" name="m_helpTextEdit">
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="aboutTab">
<attribute name="title">
<string>&amp;About</string>
</attribute>
<layout class="QVBoxLayout" name="aboutTabLayout">
<item>
<widget class="QTextBrowser" name="m_aboutTextEdit">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="specialThanksTab">
<attribute name="title">
<string>&amp;Special Thanks</string>
</attribute>
<layout class="QVBoxLayout" name="specialThanksTabLayout">
<item>
<widget class="QTextBrowser" name="m_specialThanksTextEdit">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="licenseTab">
<attribute name="title">
<string>&amp;License</string>
</attribute>
<layout class="QVBoxLayout" name="licenseTabLayout">
<item>
<widget class="QTextBrowser" name="m_licenseTextEdit">
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="thirdPartyLibsTab">
<attribute name="title">
<string>&amp;Third-party Libraries</string>
</attribute>
<layout class="QVBoxLayout" name="thirdPartyLibsTabLayout">
<item>
<widget class="QTextBrowser" name="m_3rdPartyLibsTextEdit">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="m_buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
+216
View File
@@ -0,0 +1,216 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "actionmanager.h"
#include "settings.h"
#include "mainwindow.h"
#include "playlistmanager.h"
#include "graphicsview.h"
#include "graphicsscene.h"
#include <QGuiApplication>
#include <QSvgRenderer>
#include <QPainter>
static QIcon loadHidpiIcon(const QString &resp, QSize sz = QSize(32, 32))
{
QPixmap pm = QPixmap(resp);
pm.scaled(sz * qApp->devicePixelRatio(), Qt::KeepAspectRatio);
pm.setDevicePixelRatio(qApp->devicePixelRatio());
return QIcon(pm);
}
void ActionManager::setupAction(MainWindow *mainWindow)
{
// region: Action and Its Icon Creation
// Declare some convenient macros and lambdas.
#define ICON_NAME(name)\
QStringLiteral(":/icons/" #name ".png")
#define ACTION_NAME(s) QStringLiteral(STRIFY(s))
#define STRIFY(s) #s
auto create_action = [] (QWidget *w, QAction **a, QString i, QString an, bool iconFromTheme = false) {
*a = new QAction(w);
if (!i.isNull())
(*a)->setIcon(iconFromTheme ? QIcon::fromTheme(i) : loadHidpiIcon(i));
(*a)->setObjectName(an);
w->addAction(*a);
};
/// This macro for register normal action.
#define CREATE_NEW_ACTION(w, a) create_action(w, &a, QString(), ACTION_NAME(a))
/// This macro for register Qt theme action.
#define CREATE_NEW_THEMEICON_ACTION(w, a, i) create_action(w, &a, QLatin1String(STRIFY(i)), ACTION_NAME(a), true)
/// This macro for register action with our custom icon.
#define CREATE_NEW_ICON_ACTION(w, a, i) create_action(w, &a, ICON_NAME(i), ACTION_NAME(a), false)
CREATE_NEW_ACTION(mainWindow, actionCopyPixmap);
CREATE_NEW_ACTION(mainWindow, actionCopyFilePath);
CREATE_NEW_ICON_ACTION(mainWindow, actionPrevPicture, go-previous);
CREATE_NEW_ICON_ACTION(mainWindow, actionNextPicture, go-next);
CREATE_NEW_ICON_ACTION(mainWindow, actionActualSize, fit-to-size);
CREATE_NEW_ICON_ACTION(mainWindow, actionFitToScreen, fit-to-screen);
CREATE_NEW_ACTION(mainWindow, actionFitByWidth);
CREATE_NEW_ACTION(mainWindow, actionFitByHeight);
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomIn, zoom-in);
CREATE_NEW_ICON_ACTION(mainWindow, actionZoomOut, zoom-out);
CREATE_NEW_ICON_ACTION(mainWindow, actionFlipHorizontal, flip-horizontal);
CREATE_NEW_ICON_ACTION(mainWindow, actionFlipVertical, flip-vertical);
CREATE_NEW_ICON_ACTION(mainWindow, actionRotateClockwise, rotate-right);
CREATE_NEW_ICON_ACTION(mainWindow, actionRotateCounterClockwise, rotate-left);
CREATE_NEW_ACTION(mainWindow, actionToggleAvoidResetTransform);
CREATE_NEW_ACTION(mainWindow, actionToggleCheckerboard);
CREATE_NEW_ACTION(mainWindow, actionTogglePauseAnimation);
CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame);
CREATE_NEW_ACTION(mainWindow, actionTrash/*, edit-delete*/);
CREATE_NEW_ACTION(mainWindow, actionLocateInFileManager/*, system-file-manager*/);
CREATE_NEW_ICON_ACTION(mainWindow, actionProperties, image-info);
CREATE_NEW_ACTION(mainWindow, actionSettings);
CREATE_NEW_ACTION(mainWindow, actionHelp/*, system-help*/);
// Remove convenient macros
#undef CREATE_NEW_ICON_ACTION
#undef CREATE_NEW_THEMEICON_ACTION
#undef CREATE_NEW_ACTION
#undef STRIFY
#undef ACTION_NAME
#undef ICON_NAME
// endregion
// region: Setup Checkable Action
actionToggleAvoidResetTransform->setCheckable(true);
actionToggleCheckerboard->setCheckable(true);
actionTogglePauseAnimation->setCheckable(true);
// endregion
// region: Action Translatable Text Setup
actionCopyPixmap->setText(QCoreApplication::translate("MainWindow", "Copy P&ixmap", nullptr));
actionCopyFilePath->setText(QCoreApplication::translate("MainWindow", "Copy &File Path", nullptr));
actionPrevPicture->setText(QCoreApplication::translate("MainWindow", "Previous image", nullptr));
actionNextPicture->setText(QCoreApplication::translate("MainWindow", "Next image", nullptr));
actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr));
actionFitToScreen->setText(QCoreApplication::translate("MainWindow", "Fit to screen", nullptr));
actionFitByWidth->setText(QCoreApplication::translate("MainWindow", "Fit by width", nullptr));
actionFitByHeight->setText(QCoreApplication::translate("MainWindow", "Fit by height", nullptr));
actionZoomIn->setText(QCoreApplication::translate("MainWindow", "Zoom in", nullptr));
actionZoomOut->setText(QCoreApplication::translate("MainWindow", "Zoom out", nullptr));
actionFlipHorizontal->setText(QCoreApplication::translate("MainWindow", "Flip &Horizontally", nullptr));
actionFlipVertical->setText(QCoreApplication::translate("MainWindow", "Flip &Vertically", nullptr));
actionRotateClockwise->setText(QCoreApplication::translate("MainWindow", "Rotate right", nullptr));
actionRotateCounterClockwise->setText(QCoreApplication::translate("MainWindow", "Rotate left", nullptr));
actionToggleAvoidResetTransform->setText(QCoreApplication::translate("MainWindow", "Keep transformation", "The 'transformation' means the flip/rotation status that currently applied to the image view"));
actionToggleCheckerboard->setText(QCoreApplication::translate("MainWindow", "Toggle Checkerboard", nullptr));
actionTogglePauseAnimation->setText(QCoreApplication::translate("MainWindow", "Pause/Resume Animation", nullptr));
actionAnimationNextFrame->setText(QCoreApplication::translate("MainWindow", "Animation Go to Next Frame", nullptr));
actionTrash->setText(QCoreApplication::translate("MainWindow", "Move to Trash", nullptr));
#ifdef Q_OS_WIN
actionLocateInFileManager->setText(
QCoreApplication::translate(
"MainWindow", "Show in File Explorer",
"File Explorer is the name of explorer.exe under Windows"
)
);
#else
actionLocateInFileManager->setText(QCoreApplication::translate("MainWindow", "Show in directory", nullptr));
#endif // Q_OS_WIN
actionProperties->setText(QCoreApplication::translate("MainWindow", "Properties", nullptr));
actionSettings->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
actionHelp->setText(QCoreApplication::translate("MainWindow", "Help", nullptr));
// endregion
QMetaObject::connectSlotsByName(mainWindow);
}
void ActionManager::setupShortcuts()
{
actionCopyPixmap->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
actionCopyFilePath->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_C));
actionPrevPicture->setShortcuts({
QKeySequence(Qt::Key_Left),
QKeySequence(Qt::Key_PageUp),
});
actionNextPicture->setShortcuts({
QKeySequence(Qt::Key_Right),
QKeySequence(Qt::Key_PageDown),
});
actionFitToScreen->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
actionActualSize->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_0));
actionZoomIn->setShortcut(QKeySequence::ZoomIn);
actionZoomOut->setShortcut(QKeySequence::ZoomOut);
actionFlipHorizontal->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M));
actionFlipVertical->setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_M));
actionRotateClockwise->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Comma));
actionRotateCounterClockwise->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Period));
actionTrash->setShortcut(QKeySequence::Delete);
actionProperties->setShortcut(QKeySequence(Qt::ALT | Qt::Key_Enter));
actionSettings->setShortcut(QKeySequence::Preferences);
actionHelp->setShortcut(QKeySequence::HelpContents);
}
void ActionManager::updateActionState(PlaylistManager* pm, GraphicsView* gv)
{
const auto* gs = gv->scene();
const auto* settings = Settings::instance();
// Update copy actions
bool canCopy = pm->currentIndex().has_value();
actionCopyPixmap->setEnabled(canCopy);
actionCopyFilePath->setEnabled(canCopy);
// Update Prev/Next Picture State
const int galleryFileCount = pm->totalCount();
const bool loopGallery = settings->loopGallery();
actionPrevPicture->setEnabled(galleryFileCount > 1 && (loopGallery || !pm->isFirstIndex()));
actionNextPicture->setEnabled(galleryFileCount > 1 && (loopGallery || !pm->isLastIndex()));
// Update Avoid Reset Transform
actionToggleAvoidResetTransform->setChecked(gv->isAvoidResetTransform());
// Update Checkerboard
actionToggleCheckerboard->setChecked(gv->isCheckerboard());
// Update Animation Graphics Action
bool canPauseAnimation = gs->canPauseAnimation();
actionTogglePauseAnimation->setEnabled(canPauseAnimation);
if (canPauseAnimation) {
actionTogglePauseAnimation->setChecked(gs->isPauseAnimation());
} else {
actionTogglePauseAnimation->setChecked(false);
}
bool canSkipAnimation = gs->canSkipAnimationFrame();
actionAnimationNextFrame->setEnabled(canSkipAnimation);
// Update trash, located in explorer and properties.
bool hasLoadedFile = pm->currentIndex().has_value();
actionTrash->setEnabled(hasLoadedFile);
actionLocateInFileManager->setEnabled(hasLoadedFile);
actionProperties->setEnabled(hasLoadedFile);
}
+59
View File
@@ -0,0 +1,59 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#ifndef ACTIONMANAGER_H
#define ACTIONMANAGER_H
#include <QAction>
class MainWindow;
class PlaylistManager;
class GraphicsView;
/// Action Manager is separated from Main Window
/// to manage all actions specifically.
class ActionManager
{
public:
explicit ActionManager() = default;
~ActionManager() = default;
void setupAction(MainWindow * mainWindow);
void setupShortcuts();
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
public:
QAction *actionCopyPixmap;
QAction *actionCopyFilePath;
QAction *actionPrevPicture;
QAction *actionNextPicture;
QAction *actionActualSize;
QAction *actionFitToScreen;
QAction *actionFitByWidth;
QAction *actionFitByHeight;
QAction *actionZoomIn;
QAction *actionZoomOut;
QAction *actionFlipHorizontal;
QAction *actionFlipVertical;
QAction *actionRotateClockwise;
QAction *actionRotateCounterClockwise;
QAction *actionToggleAvoidResetTransform;
QAction *actionToggleCheckerboard;
QAction *actionTogglePauseAnimation;
QAction *actionAnimationNextFrame;
QAction *actionTrash;
QAction *actionLocateInFileManager;
QAction *actionProperties;
QAction *actionSettings;
QAction *actionHelp;
};
#endif // ACTIONMANAGER_H
+45
View File
@@ -0,0 +1,45 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "bottombuttongroup.h"
#include <QToolButton>
#include <QVBoxLayout>
#include <QDebug>
BottomButtonGroup::BottomButtonGroup(QWidget *parent)
: QGroupBox (parent)
{
QHBoxLayout * mainLayout = new QHBoxLayout(this);
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
this->setLayout(mainLayout);
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
this->setStyleSheet(R"#(
BottomButtonGroup {
border-style: none;
background: transparent;
}
QToolButton {
background: transparent;
border-style: none;
}
)#");
}
void BottomButtonGroup::addActions(const std::vector<QAction *> & actionList) {
for (QAction * action : actionList) {
// Create button
QToolButton * btn = new QToolButton(this);
btn->setDefaultAction(action);
btn->setIconSize(QSize(32, 32));
btn->setFixedSize(40, 40);
// Add button
layout()->addWidget(btn);
}
updateGeometry();
}
void BottomButtonGroup::addAction(QAction* action) {
addActions({action});
}
+23
View File
@@ -0,0 +1,23 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef BOTTOMBUTTONGROUP_H
#define BOTTOMBUTTONGROUP_H
#include <vector>
#include <QAbstractButton>
#include <QGroupBox>
class BottomButtonGroup : public QGroupBox
{
Q_OBJECT
public:
explicit BottomButtonGroup(QWidget *parent = nullptr);
void addActions(const std::vector<QAction *> & actionList);
void addAction(QAction* action);
};
#endif // BOTTOMBUTTONGROUP_H
+138
View File
@@ -0,0 +1,138 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "exiv2wrapper.h"
#ifdef HAVE_EXIV2_VERSION
#include <exiv2/exiv2.hpp>
#else // HAVE_EXIV2_VERSION
namespace Exiv2 {
class Image {};
}
#endif // HAVE_EXIV2_VERSION
#include <sstream>
#include <QFile>
#include <QDebug>
Exiv2Wrapper::Exiv2Wrapper()
{
}
Exiv2Wrapper::~Exiv2Wrapper()
{
}
#ifdef HAVE_EXIV2_VERSION // stupid AppleClang...
template<typename Collection, typename Iterator>
void Exiv2Wrapper::cacheSection(Collection collection)
{
const Collection& exifData = collection;
Iterator it = exifData.begin(), end = exifData.end();
for (; it != end; ++it) {
QString key = QString::fromUtf8(it->key().c_str());
if (it->tagName().substr(0, 2) == "0x") continue;
// We might get exceptions like "No namespace info available for XMP prefix `Item'"
// when trying to get tagLabel() data from a Xmpdatum if the tag is not common-used.
// We don't care for those rare tags so let's just use a try-cache...
try {
QString label = QString::fromLocal8Bit(it->tagLabel().c_str());
std::ostringstream stream;
stream << *it;
QString value = QString::fromUtf8(stream.str().c_str());
m_metadataValue.insert(key, value);
m_metadataLabel.insert(key, label);
qDebug() << key << label << value;
#if EXIV2_TEST_VERSION(0, 28, 0)
} catch (Exiv2::Error & err) {
#else // 0.27.x
} catch (Exiv2::AnyError & err) {
#endif // EXIV2_TEST_VERSION(0, 28, 0)
qWarning() << "Error loading key" << key << ":" << err.what();
}
}
}
#endif // HAVE_EXIV2_VERSION
bool Exiv2Wrapper::load(const QString &filePath)
{
#ifdef HAVE_EXIV2_VERSION
QByteArray filePathByteArray = QFile::encodeName(filePath);
try {
m_exivImage.reset(Exiv2::ImageFactory::open(filePathByteArray.constData()).release());
m_exivImage->readMetadata();
} catch (const Exiv2::Error& error) {
m_errMsg = QString::fromUtf8(error.what());
return false;
}
return true;
#else // HAVE_EXIV2_VERSION
Q_UNUSED(filePath);
return false;
#endif // HAVE_EXIV2_VERSION
}
void Exiv2Wrapper::cacheSections()
{
#ifdef HAVE_EXIV2_VERSION
if (m_exivImage->checkMode(Exiv2::mdExif) & Exiv2::amRead) {
cacheSection<Exiv2::ExifData, Exiv2::ExifData::const_iterator>(m_exivImage->exifData());
}
if (m_exivImage->checkMode(Exiv2::mdIptc) & Exiv2::amRead) {
cacheSection<Exiv2::IptcData, Exiv2::IptcData::const_iterator>(m_exivImage->iptcData());
}
if (m_exivImage->checkMode(Exiv2::mdXmp) & Exiv2::amRead) {
cacheSection<Exiv2::XmpData, Exiv2::XmpData::const_iterator>(m_exivImage->xmpData());
}
// qDebug() << m_metadataValue;
// qDebug() << m_metadataLabel;
#endif // HAVE_EXIV2_VERSION
}
QString Exiv2Wrapper::comment() const
{
#ifdef HAVE_EXIV2_VERSION
return m_exivImage->comment().c_str();
#else // HAVE_EXIV2_VERSION
return QString();
#endif // HAVE_EXIV2_VERSION
}
QString Exiv2Wrapper::label(const QString &key) const
{
return m_metadataLabel.value(key);
}
QString Exiv2Wrapper::value(const QString &key) const
{
return m_metadataValue.value(key);
}
QString Exiv2Wrapper::XmpValue(const QString &rawValue)
{
QString ignored;
return Exiv2Wrapper::XmpValue(rawValue, ignored);
}
QString Exiv2Wrapper::XmpValue(const QString &rawValue, QString &language)
{
if (rawValue.size() > 6 && rawValue.startsWith(QLatin1String("lang=\""))) {
int pos = rawValue.indexOf('"', 6);
if (pos != -1) {
language = rawValue.mid(6, pos - 6);
return (rawValue.mid(pos + 2));
}
}
language.clear();
return rawValue;
}
+43
View File
@@ -0,0 +1,43 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef EXIV2WRAPPER_H
#define EXIV2WRAPPER_H
#include <memory>
#include <QString>
#include <QMap>
namespace Exiv2 {
class Image;
}
class Exiv2Wrapper
{
public:
Exiv2Wrapper();
~Exiv2Wrapper();
bool load(const QString& filePath);
void cacheSections();
QString comment() const;
QString label(const QString & key) const;
QString value(const QString & key) const;
static QString XmpValue(const QString &rawValue);
static QString XmpValue(const QString &rawValue, QString & language);
private:
std::unique_ptr<Exiv2::Image> m_exivImage;
QMap<QString, QString> m_metadataValue;
QMap<QString, QString> m_metadataLabel;
QString m_errMsg;
template<typename Collection, typename Iterator>
void cacheSection(Collection collection);
};
#endif // EXIV2WRAPPER_H
+22
View File
@@ -0,0 +1,22 @@
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#include "fileopeneventhandler.h"
#include <QFileOpenEvent>
FileOpenEventHandler::FileOpenEventHandler(QObject *parent)
: QObject(parent)
{
}
bool FileOpenEventHandler::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::FileOpen) {
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent *>(event);
emit fileOpen(fileOpenEvent->url());
return true;
}
return QObject::eventFilter(obj, event);
}
+21
View File
@@ -0,0 +1,21 @@
// SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QObject>
class FileOpenEventHandler : public QObject
{
Q_OBJECT
public:
explicit FileOpenEventHandler(QObject *parent = nullptr);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
signals:
void fileOpen(const QUrl &url);
};
+275
View File
@@ -0,0 +1,275 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "graphicsscene.h"
#include "settings.h"
#include <QStyleHints>
#include <QOperatingSystemVersion>
#include <QGuiApplication>
#include <QGraphicsSceneMouseEvent>
#include <QMimeData>
#include <QDebug>
#include <QGraphicsItem>
#include <QUrl>
#include <QGraphicsSvgItem>
#include <QSvgRenderer>
#include <QMovie>
#include <QPainter>
static const QColor& ColorSchemaToTextForeground(Qt::ColorScheme colorScheme) {
// YYC MARK:
// If we are using Windows 10 and lower system, we should only support light mode.
// Because Qt's dark-mode-aware "Windows 11" theme is only well-supported on Windows 11.
#if defined(Q_OS_WIN)
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows11) {
colorScheme = Qt::ColorScheme::Light;
}
#endif // defined(Q_OS_WIN)
switch (colorScheme) {
case Qt::ColorScheme::Dark: {
static QColor WHITE = QColor("White");
return WHITE;
}
case Qt::ColorScheme::Light:
case Qt::ColorScheme::Unknown:
default: {
static QColor BLACK = QColor("Black");
return BLACK;
}
}
}
class PGraphicsPixmapItem : public QGraphicsPixmapItem
{
public:
PGraphicsPixmapItem(const QPixmap &pixmap, QGraphicsItem *parent = nullptr)
: QGraphicsPixmapItem(pixmap, parent)
{}
enum { Type = UserType + 1 };
int type() const override { return Type; }
void setScaleHint(float scaleHint) {
m_scaleHint = scaleHint;
}
const QPixmap & scaledPixmap(float scaleHint) {
if (qFuzzyCompare(scaleHint, m_cachedScaleHint)) return m_cachedPixmap;
QSizeF resizedScale(boundingRect().size());
resizedScale *= scaleHint;
QPixmap && sourcePixmap = pixmap();
m_cachedPixmap = sourcePixmap.scaled(
resizedScale.toSize() * sourcePixmap.devicePixelRatioF(),
Qt::KeepAspectRatio,
Qt::SmoothTransformation);
m_cachedScaleHint = scaleHint;
return m_cachedPixmap;
}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) override
{
if (transformationMode() == Qt::FastTransformation) {
return QGraphicsPixmapItem::paint(painter, option, widget);
} else {
// painter->setRenderHints(QPainter::Antialiasing);
painter->drawPixmap(QRectF(offset(), boundingRect().size()).toRect(),
scaledPixmap(m_scaleHint));
}
}
private:
float m_scaleHint = 1;
float m_cachedScaleHint = -1;
QPixmap m_cachedPixmap;
};
class PGraphicsMovieItem : public QGraphicsItem
{
public:
PGraphicsMovieItem(QGraphicsItem *parent = nullptr) : QGraphicsItem(parent) {}
enum { Type = UserType + 2 };
int type() const override { return Type; }
void setMovie(QMovie* movie) {
if (m_movie) m_movie->disconnect();
m_movie.reset(movie);
m_movie->connect(m_movie.data(), &QMovie::updated, [this](){
this->update();
});
}
QRectF boundingRect() const override {
if (m_movie) { return m_movie->frameRect(); }
else { return QRectF(); }
}
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override {
if (m_movie) {
painter->drawPixmap(m_movie->frameRect(), m_movie->currentPixmap(), m_movie->frameRect());
}
}
inline QMovie * movie() const {
return m_movie.data();
}
private:
QScopedPointer<QMovie> m_movie;
};
GraphicsScene::GraphicsScene(QObject *parent)
: QGraphicsScene(parent)
{
showText(tr("Drag image here", "The same meaning of MainWindow's hint."));
connect(qGuiApp->styleHints(), &QStyleHints::colorSchemeChanged, this, &GraphicsScene::updateStyle);
}
GraphicsScene::~GraphicsScene()
{
}
void GraphicsScene::showImage(const QPixmap &pixmap)
{
this->clear();
PGraphicsPixmapItem * pixmapItem = new PGraphicsPixmapItem(pixmap);
this->addItem(pixmapItem);
pixmapItem->setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
m_theThing = pixmapItem;
this->setSceneRect(m_theThing->boundingRect());
}
void GraphicsScene::showText(const QString &text)
{
this->clear();
QGraphicsTextItem * textItem = this->addText(text);
textItem->setDefaultTextColor(ColorSchemaToTextForeground(qGuiApp->styleHints()->colorScheme()));
m_theThing = textItem;
this->setSceneRect(m_theThing->boundingRect());
}
void GraphicsScene::showSvg(const QString &filepath)
{
this->clear();
QGraphicsSvgItem * svgItem = new QGraphicsSvgItem();
QSvgRenderer * render = new QSvgRenderer(svgItem);
if (Settings::instance()->svgTiny12Only()) {
render->setOptions(QtSvg::Tiny12FeaturesOnly);
}
render->load(filepath);
svgItem->setSharedRenderer(render);
this->addItem(svgItem);
m_theThing = svgItem;
this->setSceneRect(m_theThing->boundingRect());
}
void GraphicsScene::showAnimated(const QString &filepath)
{
this->clear();
PGraphicsMovieItem * animatedItem = new PGraphicsMovieItem();
QMovie * movie = new QMovie(filepath);
movie->start();
animatedItem->setMovie(movie);
this->addItem(animatedItem);
m_theThing = animatedItem;
this->setSceneRect(m_theThing->boundingRect());
}
bool GraphicsScene::trySetTransformationMode(Qt::TransformationMode mode, float scaleHint)
{
PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast<PGraphicsPixmapItem *>(m_theThing);
if (pixmapItem) {
pixmapItem->setTransformationMode(mode);
pixmapItem->setScaleHint(scaleHint);
return true;
}
return false;
}
/// Fetch graphics item as our custom animated item.
/// Return nullptr means this item is not animated item.
static PGraphicsMovieItem* fetchAnimatedItem(QGraphicsItem *item) {
return qgraphicsitem_cast<PGraphicsMovieItem *>(item);
}
bool GraphicsScene::canPauseAnimation() const {
return fetchAnimatedItem(m_theThing) != nullptr;
}
bool GraphicsScene::isPauseAnimation() const {
auto* animatedItem = fetchAnimatedItem(m_theThing);
if (animatedItem != nullptr) {
return animatedItem->movie()->state() == QMovie::Paused;
} else {
return false;
}
}
bool GraphicsScene::togglePauseAnimation()
{
auto* animatedItem = fetchAnimatedItem(m_theThing);
if (animatedItem != nullptr) {
animatedItem->movie()->setPaused(animatedItem->movie()->state() != QMovie::Paused);
return true;
} else {
return false;
}
}
bool GraphicsScene::canSkipAnimationFrame() const {
return isPauseAnimation();
}
bool GraphicsScene::skipAnimationFrame(int delta)
{
auto* animatedItem = fetchAnimatedItem(m_theThing);
// Only paused animated item can skip frame
if (animatedItem == nullptr) {
return false;
}
if (animatedItem->movie()->state() != QMovie::Paused) {
return false;
}
// Perform skip
const int frameCount = animatedItem->movie()->frameCount();
const int currentFrame = animatedItem->movie()->currentFrameNumber();
const int targetFrame = (currentFrame + delta) % frameCount;
return animatedItem->movie()->jumpToFrame(targetFrame);
}
QPixmap GraphicsScene::renderToPixmap()
{
PGraphicsPixmapItem * pixmapItem = qgraphicsitem_cast<PGraphicsPixmapItem *>(m_theThing);
if (pixmapItem) {
return pixmapItem->pixmap();
}
QPixmap pixmap(sceneRect().toRect().size());
pixmap.fill(Qt::transparent);
QPainter p(&pixmap);
render(&p, sceneRect());
return pixmap;
}
void GraphicsScene::updateStyle(Qt::ColorScheme colorScheme) {
Q_UNUSED(colorScheme)
QGraphicsItem * item = this->m_theThing;
if (item == nullptr) return;
QGraphicsTextItem * textItem = qgraphicsitem_cast<QGraphicsTextItem*>(item);
if (textItem == nullptr) return;
textItem->setDefaultTextColor(ColorSchemaToTextForeground(colorScheme));
}
+48
View File
@@ -0,0 +1,48 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef GRAPHICSSCENE_H
#define GRAPHICSSCENE_H
#include <QGraphicsScene>
class GraphicsScene : public QGraphicsScene
{
Q_OBJECT
public:
GraphicsScene(QObject *parent = nullptr);
~GraphicsScene();
void showImage(const QPixmap &pixmap);
void showText(const QString &text);
void showSvg(const QString &filepath);
void showAnimated(const QString &filepath);
bool trySetTransformationMode(Qt::TransformationMode mode, float scaleHint);
/// Check whether current thing is animation.
/// Only animation thing can be paused.
bool canPauseAnimation() const;
/// Check whether we are pasuing an animation graphics.
bool isPauseAnimation() const;
/// Toggle animation graphics pause state.
/// Return true for successfully toggle, otherwise false.
bool togglePauseAnimation();
/// Check whether we can skip animation frame.
/// Only paused animation graphics can skip frame.
bool canSkipAnimationFrame() const;
/// Skip paused animation graphics with given frame.
/// Return true for successfully skip, otherwise false.
bool skipAnimationFrame(int delta = 1);
QPixmap renderToPixmap();
private slots:
void updateStyle(Qt::ColorScheme colorScheme);
private:
QGraphicsItem * m_theThing = nullptr;
};
#endif // GRAPHICSSCENE_H
+502
View File
@@ -0,0 +1,502 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#include "graphicsview.h"
#include "graphicsscene.h"
#include "settings.h"
#include <QStyleHints>
#include <QOperatingSystemVersion>
#include <QDebug>
#include <QColorSpace>
#include <QMouseEvent>
#include <QScrollBar>
#include <QMimeData>
#include <QImageReader>
#include <QStyleOptionGraphicsItem>
GraphicsView::GraphicsView(QWidget *parent)
: QGraphicsView (parent)
{
setDragMode(QGraphicsView::ScrollHandDrag);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setResizeAnchor(QGraphicsView::AnchorUnderMouse);
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
setAcceptDrops(false);
setCheckerboardEnabled(false);
updateStyle(qGuiApp->styleHints()->colorScheme());
connect(qGuiApp->styleHints(), &QStyleHints::colorSchemeChanged, this, &GraphicsView::updateStyle);
connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::viewportRectChanged);
}
void GraphicsView::showFileFromPath(const QString &filePath)
{
emit navigatorViewRequired(false, transform());
if (filePath.endsWith(".svg")) {
showSvg(filePath);
} else {
QImageReader imageReader(filePath);
imageReader.setAutoTransform(true);
imageReader.setDecideFormatFromContent(true);
imageReader.setAllocationLimit(0);
// Since if the image format / plugin does not support this feature, imageFormat() will returns an invalid format.
// So we cannot use imageFormat() and check if it returns QImage::Format_Invalid to detect if we support the file.
// QImage::Format imageFormat = imageReader.imageFormat();
if (imageReader.format().isEmpty()) {
showText(tr("File is not a valid image"));
} else if (imageReader.supportsAnimation() && imageReader.imageCount() > 1) {
showAnimated(filePath);
} else if (!imageReader.canRead()) {
showText(tr("Image data is invalid or currently unsupported"));
} else {
QImage && img = imageReader.read();
if (img.isNull()) {
showText(tr("Image data is invalid or currently unsupported"));
} else {
if (img.format() == QImage::Format_CMYK8888) {
img.convertToColorSpace(QColorSpace::SRgb);
}
img.setDevicePixelRatio(devicePixelRatioF());
showImage(img);
}
}
}
}
void GraphicsView::showImage(const QPixmap &pixmap)
{
resetTransform();
scene()->showImage(pixmap);
displayScene();
}
void GraphicsView::showImage(const QImage &image)
{
resetTransform();
scene()->showImage(QPixmap::fromImage(image));
displayScene();
}
void GraphicsView::showText(const QString &text)
{
resetTransform();
scene()->showText(text);
displayScene();
}
void GraphicsView::showSvg(const QString &filepath)
{
resetTransform();
scene()->showSvg(filepath);
displayScene();
}
void GraphicsView::showAnimated(const QString &filepath)
{
resetTransform();
scene()->showAnimated(filepath);
displayScene();
}
GraphicsScene *GraphicsView::scene() const
{
return qobject_cast<GraphicsScene*>(QGraphicsView::scene());
}
void GraphicsView::setScene(GraphicsScene *scene)
{
return QGraphicsView::setScene(scene);
}
qreal GraphicsView::scaleFactor() const
{
return QStyleOptionGraphicsItem::levelOfDetailFromTransform(transform());
}
void GraphicsView::resetTransform()
{
if (!shouldAvoidTransform()) {
QGraphicsView::resetTransform();
}
}
void GraphicsView::zoomView(qreal scaleFactor)
{
m_enableFitToScreen = false;
scale(scaleFactor, scaleFactor);
applyTransformationModeByScaleFactor();
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
}
// This is always according to user's view.
// the direction of the rotation will NOT be clockwise because the y-axis points downwards.
void GraphicsView::rotateView(bool clockwise)
{
resetScale();
QTransform tf(0, clockwise ? 1 : -1, 0,
clockwise ? -1 : 1, 0, 0,
0, 0, 1);
tf = transform() * tf;
setTransform(tf);
// Apply transformation mode but don't emit navigator signal here
// Let displayScene() handle the navigator visibility correctly
applyTransformationModeByScaleFactor();
}
void GraphicsView::flipView(bool horizontal)
{
QTransform tf(horizontal ? -1 : 1, 0, 0,
0, horizontal ? 1 : -1, 0,
0, 0, 1);
tf = transform() * tf;
setTransform(tf);
// Ensure the navigation view is also flipped.
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
}
void GraphicsView::resetScale()
{
setTransform(resetScale(transform()));
applyTransformationModeByScaleFactor();
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
}
void GraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode)
{
QGraphicsView::fitInView(rect, aspectRadioMode);
applyTransformationModeByScaleFactor();
}
void GraphicsView::fitByOrientation(Qt::Orientation ori, bool scaleDownOnly)
{
resetScale();
QRectF viewRect = this->viewport()->rect();
QRectF imageRect = transform().mapRect(sceneRect());
QSize viewSize = viewRect.size().toSize();
qreal ratio;
if (ori == Qt::Horizontal) {
// Horizontal fit means fit by width
if (scaleDownOnly && imageRect.width() <= viewSize.width()) {
// Image width already fits, no scaling needed
ratio = 1;
} else {
ratio = viewRect.width() / imageRect.width();
}
} else {
// Vertical fit means fit by height
if (scaleDownOnly && imageRect.height() <= viewSize.height()) {
// Image height already fits, no scaling needed
ratio = 1;
} else {
ratio = viewRect.height() / imageRect.height();
}
}
if (ratio != 1) {
scale(ratio, ratio);
}
// Position the image correctly based on orientation with rotation consideration
QRectF originalScene = sceneRect();
QTransform currentTransform = transform();
// TODO:
// I guess following code may be optimized by matrix arithmetic operation.
// There is an AI given solution. But I didn't use it.
// Because I want to keep the same behavior of upstream.
// // Horizontal fit: Let the position of top center of viewport, (cx, 0), be inversely mapped to scene.
// // And compensate the behavior of `centerOn` which put given point to the center of viewport.
// QTransform inv = currentTransform.inverted();
// QPointF viewCx = viewport()->rect().center().x();
// QPointF viewCy = viewport()->rect().center().y();
// // The target is viewport top center. Its y=0, so `centerOn` required scene point is (viewCx, -viewCy).
// centerOn(inv.map(QPointF(viewCx, -viewCy)));
if (ori == Qt::Horizontal) {
// For horizontal fit (fit by width), position at top (for tall images)
// Find the scene point that corresponds to the top-center of the transformed image
QPointF sceneTopCenter;
if (qFuzzyIsNull(currentTransform.m12()) && qFuzzyIsNull(currentTransform.m21())) {
// 0° or 180° rotation
if (currentTransform.m11() > 0 && currentTransform.m22() > 0) {
// 0° rotation: use original top-center
sceneTopCenter = QPointF(originalScene.center().x(), originalScene.top());
} else {
// 180° rotation: the visual "top" is now at the scene bottom
sceneTopCenter = QPointF(originalScene.center().x(), originalScene.bottom());
}
} else {
// 90/270 degree rotation: the "top" in view corresponds to left/right in scene
if (currentTransform.m12() > 0) {
// 90 degree: top in view = left in scene
sceneTopCenter = QPointF(originalScene.left(), originalScene.center().y());
} else {
// 270 degree: top in view = right in scene
sceneTopCenter = QPointF(originalScene.right(), originalScene.center().y());
}
}
centerOn(sceneTopCenter);
} else {
// For vertical fit (fit by height), position at left (for wide images)
// Find the scene point that corresponds to the left-center of the transformed image
QPointF sceneLeftCenter;
if (qFuzzyIsNull(currentTransform.m12()) && qFuzzyIsNull(currentTransform.m21())) {
// 0° or 180° rotation
if (currentTransform.m11() > 0 && currentTransform.m22() > 0) {
// 0° rotation: use original left-center
sceneLeftCenter = QPointF(originalScene.left(), originalScene.center().y());
} else {
// 180° rotation: the visual "left" is now at the scene right
sceneLeftCenter = QPointF(originalScene.right(), originalScene.center().y());
}
} else {
// 90/270 degree rotation: the "left" in view corresponds to top/bottom in scene
if (currentTransform.m21() > 0) {
// 90 degree: left in view = top in scene
sceneLeftCenter = QPointF(originalScene.center().x(), originalScene.top());
} else {
// 270 degree: left in view = bottom in scene
sceneLeftCenter = QPointF(originalScene.center().x(), originalScene.bottom());
}
}
centerOn(sceneLeftCenter);
}
m_enableFitToScreen = false;
applyTransformationModeByScaleFactor();
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
}
void GraphicsView::displayScene()
{
if (shouldAvoidTransform()) {
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
return;
}
if (isSceneBiggerThanView()) {
// Do fit-in-view
fitInView(sceneRect(), Qt::KeepAspectRatio);
// After fitInView, the image should fit the window, so hide navigator
emit navigatorViewRequired(false, transform());
} else {
// Image is already smaller than window, no navigator needed
emit navigatorViewRequired(false, transform());
}
m_enableFitToScreen = true;
m_firstUserMediaLoaded = true;
}
bool GraphicsView::isSceneBiggerThanView() const
{
if (!isThingSmallerThanWindowWith(transform())) {
return true;
} else {
return false;
}
}
// Automately do fit in view when viewport(window) smaller than image original size.
void GraphicsView::setEnableAutoFitToScreen(bool enable)
{
m_enableFitToScreen = enable;
}
bool GraphicsView::isAvoidResetTransform() const
{
return m_avoidResetTransform;
}
void GraphicsView::setAvoidResetTransform(bool avoidReset)
{
m_avoidResetTransform = avoidReset;
}
bool GraphicsView::isCheckerboard() const {
return m_checkerboardEnabled;
}
void GraphicsView::toggleCheckerboard(bool invertCheckerboardColor)
{
setCheckerboardEnabled(!m_checkerboardEnabled, invertCheckerboardColor);
}
inline double zeroOrOne(double number)
{
return qFuzzyIsNull(number) ? 0 : (number > 0 ? 1 : -1);
}
// Note: this only works if we only have 90 degree based rotation
// and no shear/translate.
QTransform GraphicsView::resetScale(const QTransform & orig)
{
return QTransform(zeroOrOne(orig.m11()), zeroOrOne(orig.m12()),
zeroOrOne(orig.m21()), zeroOrOne(orig.m22()),
orig.dx(), orig.dy());
}
void GraphicsView::updateStyle(Qt::ColorScheme colorScheme) {
// YYC MARK:
// If we are using Windows 10 and lower system, we should only support light mode.
// Because Qt's dark-mode-aware "Windows 11" theme is only well-supported on Windows 11.
#if defined(Q_OS_WIN)
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows11) {
colorScheme = Qt::ColorScheme::Light;
}
#endif // defined(Q_OS_WIN)
switch (colorScheme) {
case Qt::ColorScheme::Dark:
setStyleSheet(R"#(
border-style: none;
background-color: black;
)#");
break;
case Qt::ColorScheme::Light:
case Qt::ColorScheme::Unknown:
default:
setStyleSheet(R"#(
border-style: none;
background-color: white;
)#");
break;
}
}
void GraphicsView::mousePressEvent(QMouseEvent *event)
{
if (shouldIgnoreMousePressMoveEvent(event)) {
event->ignore();
// blumia: return here, or the QMouseEvent event transparency won't
// work if we set a QGraphicsView::ScrollHandDrag drag mode.
return;
}
return QGraphicsView::mousePressEvent(event);
}
void GraphicsView::mouseMoveEvent(QMouseEvent *event)
{
if (shouldIgnoreMousePressMoveEvent(event)) {
event->ignore();
}
return QGraphicsView::mouseMoveEvent(event);
}
void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::ForwardButton || event->button() == Qt::BackButton) {
event->ignore();
} else {
QGraphicsItem *item = itemAt(event->pos());
if (!item) {
event->ignore();
}
}
return QGraphicsView::mouseReleaseEvent(event);
}
void GraphicsView::wheelEvent(QWheelEvent *event)
{
event->ignore();
// blumia: no need for calling parent method.
}
void GraphicsView::resizeEvent(QResizeEvent *event)
{
if (m_enableFitToScreen) {
bool originalSizeSmallerThanWindow = isThingSmallerThanWindowWith(resetScale(transform()));
if (originalSizeSmallerThanWindow && scaleFactor() >= 1) {
// no longer need to do fitInView()
// but we leave the m_enableToScreen value unchanged in case
// user resize down the window again.
} else if (originalSizeSmallerThanWindow && scaleFactor() < 1) {
resetScale();
} else {
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
} else {
emit navigatorViewRequired(!isThingSmallerThanWindowWith(transform()), transform());
}
return QGraphicsView::resizeEvent(event);
}
bool GraphicsView::isThingSmallerThanWindowWith(const QTransform &transform) const
{
return rect().size().expandedTo(transform.mapRect(sceneRect()).size().toSize())
== rect().size();
}
bool GraphicsView::shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const
{
if (event->buttons() == Qt::NoButton) {
return true;
}
QGraphicsItem *item = itemAt(event->pos());
if (!item) {
return true;
}
if (isThingSmallerThanWindowWith(transform())) {
return true;
}
return false;
}
void GraphicsView::setCheckerboardEnabled(bool enabled, bool invertColor)
{
m_checkerboardEnabled = enabled;
bool isLightCheckerboard = Settings::instance()->useLightCheckerboard() ^ invertColor;
if (m_checkerboardEnabled) {
// Prepare background check-board pattern
QPixmap tilePixmap(0x20, 0x20);
tilePixmap.fill(isLightCheckerboard ? QColor(220, 220, 220, 170) : QColor(35, 35, 35, 170));
QPainter tilePainter(&tilePixmap);
constexpr QColor color(45, 45, 45, 170);
constexpr QColor invertedColor(210, 210, 210, 170);
tilePainter.fillRect(0, 0, 0x10, 0x10, isLightCheckerboard ? invertedColor : color);
tilePainter.fillRect(0x10, 0x10, 0x10, 0x10, isLightCheckerboard ? invertedColor : color);
tilePainter.end();
setBackgroundBrush(tilePixmap);
} else {
setBackgroundBrush(Qt::transparent);
}
}
void GraphicsView::applyTransformationModeByScaleFactor()
{
if (this->scaleFactor() < 1) {
scene()->trySetTransformationMode(Qt::SmoothTransformation, this->scaleFactor());
} else {
scene()->trySetTransformationMode(Qt::FastTransformation, this->scaleFactor());
}
}
bool GraphicsView::shouldAvoidTransform() const
{
return m_firstUserMediaLoaded && m_avoidResetTransform;
}
+82
View File
@@ -0,0 +1,82 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef GRAPHICSVIEW_H
#define GRAPHICSVIEW_H
#include <QGraphicsView>
#include <QUrl>
class GraphicsScene;
class GraphicsView : public QGraphicsView
{
Q_OBJECT
public:
GraphicsView(QWidget *parent = nullptr);
void showFileFromPath(const QString &filePath);
void showImage(const QPixmap &pixmap);
void showImage(const QImage &image);
void showText(const QString &text);
void showSvg(const QString &filepath);
void showAnimated(const QString &filepath);
GraphicsScene * scene() const;
void setScene(GraphicsScene *scene);
qreal scaleFactor() const;
void resetTransform();
void zoomView(qreal scaleFactor);
void rotateView(bool clockwise = true);
void flipView(bool horizontal = true);
void resetScale();
void fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode = Qt::IgnoreAspectRatio);
void fitByOrientation(Qt::Orientation ori = Qt::Horizontal, bool scaleDownOnly = false);
void displayScene();
bool isSceneBiggerThanView() const;
void setEnableAutoFitToScreen(bool enable = true);
bool isAvoidResetTransform() const;
void setAvoidResetTransform(bool avoidReset);
bool isCheckerboard() const;
void toggleCheckerboard(bool invertCheckerboardColor = false);
static QTransform resetScale(const QTransform & orig);
signals:
void navigatorViewRequired(bool required, QTransform transform);
void viewportRectChanged();
private slots:
void updateStyle(Qt::ColorScheme colorScheme);
private:
void mousePressEvent(QMouseEvent * event) override;
void mouseMoveEvent(QMouseEvent * event) override;
void mouseReleaseEvent(QMouseEvent * event) override;
void wheelEvent(QWheelEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
bool isThingSmallerThanWindowWith(const QTransform &transform) const;
bool shouldIgnoreMousePressMoveEvent(const QMouseEvent *event) const;
void setCheckerboardEnabled(bool enabled, bool invertColor = false);
void applyTransformationModeByScaleFactor();
inline bool shouldAvoidTransform() const;
// Consider switch to 3 state for "no fit", "always fit" and "fit when view is smaller"?
// ... or even more? e.g. "fit/snap width" things...
// Currently it's "no fit" when it's false and "fit when view is smaller" when it's true.
bool m_enableFitToScreen = false;
bool m_avoidResetTransform = false;
bool m_checkerboardEnabled = false;
bool m_useLightCheckerboard = false;
bool m_firstUserMediaLoaded = false;
};
#endif // GRAPHICSVIEW_H
+100
View File
@@ -0,0 +1,100 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "mainwindow.h"
#include "settings.h"
#ifdef Q_OS_MACOS
#include "fileopeneventhandler.h"
#endif // Q_OS_MACOS
#include <QApplication>
#include <QCommandLineParser>
#include <QDir>
#include <QTranslator>
#include <QUrl>
using namespace Qt::Literals::StringLiterals;
int main(int argc, char *argv[])
{
QCoreApplication::setApplicationName(u"SCW Photo Viewer"_s);
QCoreApplication::setApplicationVersion(SCWPIC_VERSION_STRING);
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Settings::instance()->hiDpiScaleFactorBehavior());
QApplication a(argc, argv);
QTranslator translator;
#if defined(TRANSLATION_RESOURCE_EMBEDDING)
const QString qmDir = u":/i18n/"_s;
#elif defined(QM_FILE_INSTALL_ABSOLUTE_DIR)
const QString qmDir = QT_STRINGIFY(QM_FILE_INSTALL_ABSOLUTE_DIR);
#else
const QString qmDir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("translations");
#endif
if (translator.load(QLocale(), u"SCWPicture"_s, u"_"_s, qmDir)) {
QCoreApplication::installTranslator(&translator);
}
QGuiApplication::setApplicationDisplayName(QCoreApplication::translate("main", "SCW Photo Viewer"));
// commandline options
QCommandLineOption supportedImageFormats(u"supported-image-formats"_s, QCoreApplication::translate("main", "List supported image format suffixes, and quit program."));
// parse commandline arguments
QCommandLineParser parser;
parser.addOption(supportedImageFormats);
parser.addPositionalArgument("File list", QCoreApplication::translate("main", "File list."));
parser.addHelpOption();
parser.process(a);
if (parser.isSet(supportedImageFormats)) {
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
fputs(qPrintable(MainWindow::supportedImageFormats().join(QChar('\n'))), stdout);
::exit(EXIT_SUCCESS);
#else
QCommandLineParser::showMessageAndExit(QCommandLineParser::MessageType::Information,
MainWindow::supportedImageFormats().join(QChar('\n')));
#endif
}
MainWindow w;
w.show();
#ifdef Q_OS_MACOS
FileOpenEventHandler * fileOpenEventHandler = new FileOpenEventHandler(&a);
a.installEventFilter(fileOpenEventHandler);
a.connect(fileOpenEventHandler, &FileOpenEventHandler::fileOpen, [&w](const QUrl & url){
if (w.isHidden()) {
w.showNormal();
} else {
w.activateWindow();
}
w.showFiles({url});
w.initWindowSize();
});
// Handle dock icon clicks to show hidden window
a.connect(&a, &QApplication::applicationStateChanged, [&w](Qt::ApplicationState state) {
if (state == Qt::ApplicationActive && w.isHidden()) {
// YYC MARK:
// We can't use `{}` because there is an ambiguity between 2 overloads:
// `void showFiles(const QStringList& files);` and `void showFiles(const QList<QUrl>& urls);`.
QStringList emptyFileList;
w.showFiles(emptyFileList);
w.galleryCurrent(false);
w.showNormal();
w.raise();
w.activateWindow();
}
});
#endif // Q_OS_MACOS
QStringList fileList = parser.positionalArguments();
w.showFiles(fileList);
w.initWindowSize();
return QApplication::exec();
}
+581
View File
@@ -0,0 +1,581 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "settings.h"
#include "bottombuttongroup.h"
#include "graphicsview.h"
#include "navigatorview.h"
#include "graphicsscene.h"
#include "settingsdialog.h"
#include "aboutdialog.h"
#include "metadatamodel.h"
#include "metadatadialog.h"
#include "actionmanager.h"
#include "playlistmanager.h"
#include <QMouseEvent>
#include <QMovie>
#include <QDebug>
#include <QGraphicsTextItem>
#include <QApplication>
#include <QStyle>
#include <QScreen>
#include <QMenu>
#include <QShortcut>
#include <QClipboard>
#include <QMimeData>
#include <QWindow>
#include <QFile>
#include <QTimer>
#include <QFileDialog>
#include <QFileSystemWatcher>
#include <QStandardPaths>
#include <QStringBuilder>
#include <QProcess>
#include <QDesktopServices>
#include <QMessageBox>
#ifdef HAVE_QTDBUS
#include <QDBusInterface>
#include <QDBusConnectionInterface>
#endif // HAVE_QTDBUS
using namespace Qt::Literals::StringLiterals;
MainWindow::MainWindow(QWidget *parent)
: QWidget(parent)
, ui(new QT_PREPEND_NAMESPACE(Ui::MainWindow))
, m_am(new ActionManager)
, m_pm(new PlaylistManager(this))
, m_fileSystemWatcher(new QFileSystemWatcher(this))
{
ui->setupUi(this);
this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
// YYC MARK:
// Blumis set original value is 350 x 330.
// It is too small for modern device,
// so I level it up to SVGA resolution 800 x 600.
this->setMinimumSize(800, 600);
this->setWindowIcon(QIcon(u":/icons/app-icon.png"_s));
this->setAcceptDrops(true);
// Initialize playlist manager
m_pm->setAllowedSuffixes(supportedImageFormats());
// Initialize graphics scene
GraphicsScene * scene = new GraphicsScene(this);
// Setup graphics view (main photo view)
ui->m_gv->setScene(scene);
// Setup navigator view (right-bottom corner thumbnail view)
ui->m_nav->setScene(scene);
ui->m_nav->setMainView(ui->m_gv);
ui->m_nav->fitInView(ui->m_nav->sceneRect(), Qt::KeepAspectRatio);
// Binding graphics and navigator views signals
connect(ui->m_gv, &GraphicsView::navigatorViewRequired,
this, [this](bool required, const QTransform & tf){
if (Settings::instance()->showNavigatorView()){
ui->m_nav->setTransform(GraphicsView::resetScale(tf));
ui->m_nav->fitInView(ui->m_nav->sceneRect(), Qt::KeepAspectRatio);
ui->m_nav->setVisible(required);
ui->m_navPH->setVisible(required);
ui->m_nav->updateMainViewportRegion();
} else {
ui->m_nav->setVisible(false);
ui->m_navPH->setVisible(false);
}
});
connect(ui->m_gv, &GraphicsView::viewportRectChanged,
ui->m_nav, &NavigatorView::updateMainViewportRegion);
// Setup action manager
m_am->setupAction(this);
// Setup bottom button group
ui->m_bottomButtonGroup->addActions({
m_am->actionActualSize,
m_am->actionFitToScreen,
m_am->actionZoomIn,
m_am->actionZoomOut,
m_am->actionPrevPicture,
m_am->actionProperties,
m_am->actionNextPicture,
m_am->actionRotateCounterClockwise,
m_am->actionRotateClockwise,
m_am->actionFlipHorizontal,
m_am->actionFlipVertical,
});
// Setup right click menus
{
ui->m_subMenuCopy->addAction(m_am->actionCopyPixmap);
ui->m_subMenuCopy->addAction(m_am->actionCopyFilePath);
}
{
ui->m_subMenuTransform->addAction(m_am->actionActualSize);
ui->m_subMenuTransform->addAction(m_am->actionFitToScreen);
ui->m_subMenuTransform->addAction(m_am->actionFitByWidth);
ui->m_subMenuTransform->addAction(m_am->actionFitByHeight);
ui->m_subMenuTransform->addAction(m_am->actionZoomIn);
ui->m_subMenuTransform->addAction(m_am->actionZoomOut);
ui->m_subMenuTransform->addSeparator();
ui->m_subMenuTransform->addAction(m_am->actionFlipHorizontal);
ui->m_subMenuTransform->addAction(m_am->actionFlipVertical);
ui->m_subMenuTransform->addAction(m_am->actionRotateClockwise);
ui->m_subMenuTransform->addAction(m_am->actionRotateCounterClockwise);
}
{
ui->m_menu->addMenu(ui->m_subMenuCopy);
ui->m_menu->addSeparator();
ui->m_menu->addAction(m_am->actionPrevPicture);
ui->m_menu->addAction(m_am->actionNextPicture);
ui->m_menu->addSeparator();
ui->m_menu->addMenu(ui->m_subMenuTransform);
ui->m_menu->addSeparator();
ui->m_menu->addAction(m_am->actionToggleAvoidResetTransform);
ui->m_menu->addAction(m_am->actionToggleCheckerboard);
ui->m_menu->addAction(m_am->actionTogglePauseAnimation);
ui->m_menu->addAction(m_am->actionAnimationNextFrame);
ui->m_menu->addSeparator();
ui->m_menu->addAction(m_am->actionTrash);
ui->m_menu->addAction(m_am->actionLocateInFileManager);
ui->m_menu->addAction(m_am->actionProperties);
ui->m_menu->addSeparator();
ui->m_menu->addAction(m_am->actionSettings);
ui->m_menu->addAction(m_am->actionHelp);
}
// Connect playlist manager and file watcher signals for photo browsering.
connect(m_pm, &PlaylistManager::playlistChanged, this, std::bind(&MainWindow::updateActionState, this));
connect(m_pm, &PlaylistManager::playlistChanged, this, std::bind(&MainWindow::galleryCurrent, this, false));
connect(m_pm, &PlaylistManager::currentIndexChanged, this, std::bind(&MainWindow::galleryCurrent, this, false));
connect(m_fileSystemWatcher, &QFileSystemWatcher::fileChanged, this, [this](){
QTimer::singleShot(500, this, std::bind(&MainWindow::galleryCurrent, this, true));
});
// Change window location
centerWindow();
QTimer::singleShot(0, this, [this](){
m_am->setupShortcuts();
});
}
MainWindow::~MainWindow()
{
delete m_am;
delete ui;
}
void MainWindow::showFiles(const QStringList &files)
{
m_pm->loadPlaylist(files);
ui->m_nav->fitInView(ui->m_nav->sceneRect(), Qt::KeepAspectRatio);
}
void MainWindow::showFiles(const QList<QUrl>& urls)
{
m_pm->loadPlaylist(urls);
ui->m_nav->fitInView(ui->m_nav->sceneRect(), Qt::KeepAspectRatio);
}
void MainWindow::initWindowSize()
{
switch (Settings::instance()->initWindowSizeBehavior()) {
case Settings::WindowSizeBehavior::Maximized:
showMaximized();
break;
case Settings::WindowSizeBehavior::Windowed:
default:
showNormal();
break;
}
}
void MainWindow::clearGallery()
{
m_pm->clearPlaylist();
}
void MainWindow::galleryPrev()
{
const bool loopGallery = Settings::instance()->loopGallery();
if (!loopGallery && m_pm->isFirstIndex()) return;
auto index = m_pm->previousIndex();
if (index.has_value()) {
m_pm->setCurrentIndex(*index);
}
}
void MainWindow::galleryNext()
{
const bool loopGallery = Settings::instance()->loopGallery();
if (!loopGallery && m_pm->isLastIndex()) return;
auto index = m_pm->nextIndex();
if (index.has_value()) {
m_pm->setCurrentIndex(*index);
}
}
void MainWindow::galleryCurrent(bool fromFileWatcher)
{
auto index = m_pm->currentIndex();
if (index.has_value()) {
QString localFilePath = m_pm->localFileByIndex(*index);
ui->m_gv->showFileFromPath(localFilePath);
if (!fromFileWatcher) {
updateFileWatcher(localFilePath);
setWindowTitle(m_pm->urlByIndex(*index).fileName());
}
} else {
ui->m_gv->showText(tr("Drag image here"));
setWindowTitle(QString());
updateFileWatcher();
}
updateActionState();
}
QStringList MainWindow::supportedImageFormats()
{
QStringList formatFilters;
for (const QByteArray &item : QImageReader::supportedImageFormats()) {
formatFilters.append(QStringLiteral("*.") % QString::fromLocal8Bit(item));
}
return formatFilters;
}
void MainWindow::wheelEvent(QWheelEvent *event)
{
QPoint numDegrees = event->angleDelta() / 8;
bool needWeelEvent = false, wheelUp = false;
bool actionIsZoom = event->modifiers().testFlag(Qt::ControlModifier)
|| Settings::instance()->mouseWheelBehavior() == Settings::MouseWheelBehavior::Zoom;
// NOTE: Only checking angleDelta since the QWheelEvent::pixelDelta() doc says
// pixelDelta() value is driver specific and unreliable on X11...
// We are not scrolling the canvas, just zoom in or out, so it probably
// doesn't matter here.
if (!numDegrees.isNull() && numDegrees.y() != 0) {
needWeelEvent = true;
wheelUp = numDegrees.y() > 0;
}
if (needWeelEvent) {
if (actionIsZoom) {
if (wheelUp) {
on_actionZoomIn_triggered();
} else {
on_actionZoomOut_triggered();
}
} else {
if (wheelUp) {
galleryPrev();
} else {
galleryNext();
}
}
event->accept();
} else {
QWidget::wheelEvent(event);
}
}
void MainWindow::contextMenuEvent(QContextMenuEvent *event)
{
ui->m_menu->exec(mapToGlobal(event->pos()));
return QWidget::contextMenuEvent(event);
}
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasUrls()) {
event->acceptProposedAction();
} else {
event->ignore();
}
return QWidget::dragEnterEvent(event);
}
void MainWindow::dragMoveEvent(QDragMoveEvent *event)
{
Q_UNUSED(event)
}
void MainWindow::dropEvent(QDropEvent *event)
{
event->acceptProposedAction();
const QMimeData * mimeData = event->mimeData();
if (mimeData->hasUrls()) {
showFiles(mimeData->urls());
} else {
ui->m_gv->showText(tr("Not supported mimedata: %1").arg(mimeData->formats().first()));
}
}
void MainWindow::centerWindow()
{
this->setGeometry(
QStyle::alignedRect(
Qt::LeftToRight,
Qt::AlignCenter,
this->size(),
qApp->screenAt(QCursor::pos())->availableGeometry()
)
);
}
void MainWindow::toggleAvoidResetTransform()
{
ui->m_gv->setAvoidResetTransform(!ui->m_gv->isAvoidResetTransform());
}
void MainWindow::toggleFullscreen()
{
if (isFullScreen()) {
showNormal();
} else {
showFullScreen();
}
}
void MainWindow::toggleMaximize()
{
if (isMaximized()) {
showNormal();
} else {
showMaximized();
}
}
QSize MainWindow::sizeHint() const
{
return QSize(710, 530);
}
// region: Action Trigger
void MainWindow::on_actionCopyPixmap_triggered()
{
QClipboard *cb = QApplication::clipboard();
cb->setPixmap(ui->m_gv->scene()->renderToPixmap());
}
void MainWindow::on_actionCopyFilePath_triggered()
{
auto index = m_pm->currentIndex();
if (!index.has_value()) return;
QClipboard *cb = QApplication::clipboard();
cb->setText(m_pm->localFileByIndex(*index));
}
void MainWindow::on_actionPrevPicture_triggered()
{
galleryPrev();
}
void MainWindow::on_actionNextPicture_triggered()
{
galleryNext();
}
void MainWindow::on_actionActualSize_triggered()
{
ui->m_gv->resetScale();
ui->m_gv->setEnableAutoFitToScreen(false);
}
void MainWindow::on_actionFitToScreen_triggered()
{
ui->m_gv->fitInView(ui->m_nav->sceneRect(), Qt::KeepAspectRatio);
ui->m_gv->setEnableAutoFitToScreen(ui->m_gv->scaleFactor() <= 1);
}
void MainWindow::on_actionFitByWidth_triggered()
{
ui->m_gv->fitByOrientation(Qt::Orientation::Horizontal);
}
void MainWindow::on_actionFitByHeight_triggered()
{
ui->m_gv->fitByOrientation(Qt::Orientation::Vertical);
}
void MainWindow::on_actionZoomIn_triggered()
{
if (ui->m_gv->scaleFactor() < 1000) {
ui->m_gv->zoomView(1.25);
}
}
void MainWindow::on_actionZoomOut_triggered()
{
ui->m_gv->zoomView(0.8);
}
void MainWindow::on_actionFlipHorizontal_triggered()
{
ui->m_gv->flipView(true);
}
void MainWindow::on_actionFlipVertical_triggered()
{
ui->m_gv->flipView(false);
}
void MainWindow::on_actionRotateClockwise_triggered()
{
ui->m_gv->rotateView(true);
ui->m_gv->displayScene();
}
void MainWindow::on_actionRotateCounterClockwise_triggered()
{
ui->m_gv->rotateView(false);
ui->m_gv->displayScene();
}
void MainWindow::on_actionToggleAvoidResetTransform_triggered()
{
toggleAvoidResetTransform();
}
void MainWindow::on_actionToggleCheckerboard_triggered()
{
ui->m_gv->toggleCheckerboard(QGuiApplication::queryKeyboardModifiers().testFlag(Qt::ShiftModifier));
}
void MainWindow::on_actionTogglePauseAnimation_triggered()
{
ui->m_gv->scene()->togglePauseAnimation();
}
void MainWindow::on_actionAnimationNextFrame_triggered()
{
ui->m_gv->scene()->skipAnimationFrame(1);
}
void MainWindow::on_actionTrash_triggered()
{
auto index = m_pm->currentIndex();
if (!index.has_value()) return;
if (!m_pm->urlByIndex(*index).isLocalFile()) return;
QFile file(m_pm->localFileByIndex(*index));
QFileInfo fileInfo(file.fileName());
QMessageBox::StandardButton result = QMessageBox::question(this, tr("Move to Trash"),
tr("Are you sure you want to move \"%1\" to recycle bin?").arg(fileInfo.fileName()));
if (result == QMessageBox::Yes) {
bool succ = file.moveToTrash();
if (!succ) {
QMessageBox::warning(this, tr("Failed to move file to trash"),
tr("Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation."));
} else {
m_pm->removeFromPlaylist(*index);
}
}
}
void MainWindow::on_actionLocateInFileManager_triggered()
{
auto index = m_pm->currentIndex();
if (!index.has_value()) return;
QUrl currentFileUrl = m_pm->urlByIndex(*index);
if (!currentFileUrl.isValid()) return;
QFileInfo fileInfo(currentFileUrl.toLocalFile());
if (!fileInfo.exists()) return;
QUrl && folderUrl = QUrl::fromLocalFile(fileInfo.absolutePath());
#ifdef Q_OS_WIN
QProcess::startDetached("explorer", QStringList() << "/select," << QDir::toNativeSeparators(fileInfo.absoluteFilePath()));
#elif defined(Q_OS_LINUX) and defined(HAVE_QTDBUS)
// Use https://www.freedesktop.org/wiki/Specifications/file-manager-interface/ if possible
const QDBusConnectionInterface * dbusIface = QDBusConnection::sessionBus().interface();
if (!dbusIface || !dbusIface->isServiceRegistered(QLatin1String("org.freedesktop.FileManager1"))) {
QDesktopServices::openUrl(folderUrl);
return;
}
QDBusInterface fm1Iface(u"org.freedesktop.FileManager1"_s,
u"/org/freedesktop/FileManager1"_s,
u"org.freedesktop.FileManager1"_s);
fm1Iface.setTimeout(1000);
fm1Iface.callWithArgumentList(QDBus::Block, "ShowItems", {
QStringList{currentFileUrl.toString()},
QString()
});
if (fm1Iface.lastError().isValid()) {
QDesktopServices::openUrl(folderUrl);
}
#else
QDesktopServices::openUrl(folderUrl);
#endif // Q_OS_WIN
}
void MainWindow::on_actionProperties_triggered()
{
auto index = m_pm->currentIndex();
if (!index.has_value()) return;
QUrl currentFileUrl = m_pm->urlByIndex(*index);
if (!currentFileUrl.isValid()) return;
MetadataModel * md = new MetadataModel();
md->setFile(currentFileUrl.toLocalFile());
MetadataDialog * ad = new MetadataDialog(this);
ad->setMetadataModel(md);
ad->exec();
ad->deleteLater();
}
void MainWindow::on_actionSettings_triggered()
{
SettingsDialog * sd = new SettingsDialog(this);
sd->exec();
sd->deleteLater();
}
void MainWindow::on_actionHelp_triggered()
{
AboutDialog * ad = new AboutDialog(this);
ad->exec();
ad->deleteLater();
}
// endregion
bool MainWindow::updateFileWatcher(const QString &basePath)
{
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->files());
if (!basePath.isEmpty()) return m_fileSystemWatcher->addPath(basePath);
return false;
}
void MainWindow::updateActionState() {
m_am->updateActionState(m_pm, ui->m_gv);
}
+97
View File
@@ -0,0 +1,97 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QWidget>
QT_BEGIN_NAMESPACE
class QFileSystemWatcher;
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class ActionManager;
class PlaylistManager;
class MainWindow : public QWidget
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
void showFiles(const QStringList& files);
void showFiles(const QList<QUrl>& urls);
void initWindowSize();
void clearGallery();
void galleryPrev();
void galleryNext();
void galleryCurrent(bool fromFileWatcher);
static QStringList supportedImageFormats();
protected slots:
void wheelEvent(QWheelEvent *event) override;
void contextMenuEvent(QContextMenuEvent *event) override;
void dragEnterEvent(QDragEnterEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void dropEvent(QDropEvent *event) override;
void centerWindow();
void toggleAvoidResetTransform();
void toggleFullscreen();
void toggleMaximize();
protected:
QSize sizeHint() const override;
private slots:
void on_actionCopyPixmap_triggered();
void on_actionCopyFilePath_triggered();
void on_actionPrevPicture_triggered();
void on_actionNextPicture_triggered();
void on_actionActualSize_triggered();
void on_actionFitToScreen_triggered();
void on_actionFitByWidth_triggered();
void on_actionFitByHeight_triggered();
void on_actionZoomIn_triggered();
void on_actionZoomOut_triggered();
void on_actionFlipHorizontal_triggered();
void on_actionFlipVertical_triggered();
void on_actionRotateClockwise_triggered();
void on_actionRotateCounterClockwise_triggered();
void on_actionToggleAvoidResetTransform_triggered();
void on_actionToggleCheckerboard_triggered();
void on_actionTogglePauseAnimation_triggered();
void on_actionAnimationNextFrame_triggered();
void on_actionTrash_triggered();
void on_actionLocateInFileManager_triggered();
void on_actionProperties_triggered();
void on_actionSettings_triggered();
void on_actionHelp_triggered();
private:
bool updateFileWatcher(const QString & basePath = QString());
void updateActionState();
private:
QT_PREPEND_NAMESPACE(Ui::MainWindow) *ui;
ActionManager *m_am;
PlaylistManager *m_pm;
QFileSystemWatcher *m_fileSystemWatcher;
};
#endif // MAINWINDOW_H
+169
View File
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QWidget" name="MainWindow">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="minimumSize">
<size>
<width>640</width>
<height>480</height>
</size>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="m_centralLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="GraphicsView" name="m_gv">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="bottomBar" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>72</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>72</height>
</size>
</property>
<layout class="QHBoxLayout" name="bottomBarLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="m_navPH" native="true">
<property name="minimumSize">
<size>
<width>99</width>
<height>72</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>99</width>
<height>72</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="leftSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="BottomButtonGroup" name="m_bottomButtonGroup"/>
</item>
<item>
<spacer name="rightSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="NavigatorView" name="m_nav">
<property name="minimumSize">
<size>
<width>99</width>
<height>72</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>99</width>
<height>72</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
<widget class="QMenu" name="m_subMenuCopy">
<property name="title">
<string>&amp;Copy</string>
</property>
</widget>
<widget class="QMenu" name="m_subMenuTransform">
<property name="title">
<string>&amp;Transform</string>
</property>
</widget>
<widget class="QMenu" name="m_menu"/>
</widget>
<customwidgets>
<customwidget>
<class>GraphicsView</class>
<extends>QGraphicsView</extends>
<header>graphicsview.h</header>
</customwidget>
<customwidget>
<class>NavigatorView</class>
<extends>QGraphicsView</extends>
<header>navigatorview.h</header>
</customwidget>
<customwidget>
<class>BottomButtonGroup</class>
<extends>QGroupBox</extends>
<header>bottombuttongroup.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
+113
View File
@@ -0,0 +1,113 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "metadatadialog.h"
#include "ui_metadatadialog.h"
#include <QDialogButtonBox>
#include <QPainter>
#include <QStyledItemDelegate>
#include <QTreeView>
#include <QHeaderView>
#include "metadatamodel.h"
class PropertyTreeView : public QTreeView
{
public:
explicit PropertyTreeView(QWidget* parent) : QTreeView(parent) {}
~PropertyTreeView() {}
protected:
void rowsInserted(const QModelIndex& parent, int start, int end) override
{
QTreeView::rowsInserted(parent, start, end);
if (!parent.isValid()) {
// we are inserting a section group
for (int row = start; row <= end; ++row) {
setupSection(row);
}
} else {
// we are inserting a property
setRowHidden(parent.row(), QModelIndex(), false);
}
}
void reset() override
{
QTreeView::reset();
if (model()) {
for (int row = 0; row < model()->rowCount(); ++row) {
setupSection(row);
}
}
}
private:
void setupSection(int row)
{
expand(model()->index(row, 0));
setFirstColumnSpanned(row, QModelIndex(), true);
setRowHidden(row, QModelIndex(), !model()->hasChildren(model()->index(row, 0)));
}
};
class PropertyTreeItemDelegate : public QStyledItemDelegate
{
public:
PropertyTreeItemDelegate(QObject* parent)
: QStyledItemDelegate(parent)
{}
protected:
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override
{
QStyleOptionViewItem opt = option;
if (!index.parent().isValid()) {
opt.font.setBold(true);
opt.features.setFlag(QStyleOptionViewItem::Alternate);
}
QStyledItemDelegate::paint(painter, opt, index);
}
};
MetadataDialog::MetadataDialog(QWidget *parent)
: QDialog(parent), ui(new QT_PREPEND_NAMESPACE(Ui::MetadataDialog))
{
ui->setupUi(this);
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
// YYC MARK:
// Because we use custom QTreeView and we do not want to expose it to public domain.
// So I have to use this way as the compromise.
// Create our custom QTreeView and insert them
m_treeView = new PropertyTreeView(this);
auto* layout = ui->verticalLayout;
const int index = layout->indexOf(ui->m_buttonBox);
layout->insertWidget(index, m_treeView);
// Setup our custom QTreeView
m_treeView->setRootIsDecorated(false);
m_treeView->setIndentation(0);
m_treeView->setItemDelegate(new PropertyTreeItemDelegate(m_treeView));
m_treeView->header()->resizeSection(0, sizeHint().width() / 2);
connect(ui->m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close);
}
MetadataDialog::~MetadataDialog()
{
delete ui;
}
void MetadataDialog::setMetadataModel(MetadataModel * model)
{
m_treeView->setModel(model);
}
QSize MetadataDialog::sizeHint() const
{
return QSize(520, 350);
}
+37
View File
@@ -0,0 +1,37 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef METADATADIALOG_H
#define METADATADIALOG_H
#include <QDialog>
QT_BEGIN_NAMESPACE
class QTreeView;
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
namespace Ui {
class MetadataDialog;
}
QT_END_NAMESPACE
class MetadataModel;
class MetadataDialog : public QDialog
{
Q_OBJECT
public:
explicit MetadataDialog(QWidget * parent);
~MetadataDialog() override;
void setMetadataModel(MetadataModel * model);
QSize sizeHint() const override;
private:
QTreeView * m_treeView = nullptr;
QT_PREPEND_NAMESPACE(Ui::MetadataDialog) *ui;
};
#endif // METADATADIALOG_H
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MetadataDialog</class>
<widget class="QDialog" name="MetadataDialog">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="windowTitle">
<string>Image Metadata</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QDialogButtonBox" name="m_buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
+320
View File
@@ -0,0 +1,320 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "metadatamodel.h"
#include "exiv2wrapper.h"
#include <QDir>
#include <QDebug>
#include <QDateTime>
#include <QFileInfo>
#include <QImageReader>
using namespace Qt::Literals::StringLiterals;
MetadataModel::MetadataModel(QObject *parent)
: QAbstractItemModel(parent)
{
}
MetadataModel::~MetadataModel()
{
}
void MetadataModel::setFile(const QString &imageFilePath)
{
QFileInfo fileInfo(imageFilePath);
// It'll be fine if we don't re-use the image reader we pass to the graphics scene for now.
QImageReader imgReader(imageFilePath);
imgReader.setAutoTransform(true);
imgReader.setDecideFormatFromContent(true);
const QString & itemTypeString = tr("%1 File").arg(QString(imgReader.format().toUpper()));
const QString & sizeString = QLocale().formattedDataSize(fileInfo.size());
const QString & birthTimeString = QLocale().toString(fileInfo.birthTime(), QLocale::LongFormat);
const QString & lastModifiedTimeString = QLocale().toString(fileInfo.lastModified(), QLocale::LongFormat);
const QString & imageDimensionsString = imageSize(imgReader.size());
const QString & imageRatioString = imageSizeRatio(imgReader.size());
appendSection(u"Description"_s, tr("Description", "Section name."));
appendSection(u"Origin"_s, tr("Origin", "Section name."));
appendSection(u"Image"_s, tr("Image", "Section name."));
appendSection(u"Camera"_s, tr("Camera", "Section name."));
appendSection(u"AdvancedPhoto"_s, tr("Advanced photo", "Section name."));
appendSection(u"GPS"_s, tr("GPS", "Section name."));
appendSection(u"File"_s, tr("File", "Section name."));
if (imgReader.supportsOption(QImageIOHandler::Size)) {
appendProperty(u"Image"_s, u"Image.Dimensions"_s,
tr("Dimensions"), imageDimensionsString);
appendProperty(u"Image"_s, u"Image.SizeRatio"_s,
tr("Aspect ratio"), imageRatioString);
}
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
appendProperty(u"Image"_s, u"Image.FrameCount"_s,
tr("Frame count"), QString::number(imgReader.imageCount()));
}
appendProperty(u"File"_s, u"File.Name"_s,
tr("Name"), fileInfo.fileName());
appendProperty(u"File"_s, u"File.ItemType"_s,
tr("Item type"), itemTypeString);
appendProperty(u"File"_s, u"File.Path"_s,
tr("Folder path"), QDir::toNativeSeparators(fileInfo.path()));
appendProperty(u"File"_s, u"File.Size"_s,
tr("Size"), sizeString);
appendProperty(u"File"_s, u"File.CreatedTime"_s,
tr("Date created"), birthTimeString);
appendProperty(u"File"_s, u"File.LastModified"_s,
tr("Date modified"), lastModifiedTimeString);
Exiv2Wrapper wrapper;
if (wrapper.load(imageFilePath)) {
wrapper.cacheSections();
appendExivPropertyIfExist(wrapper, u"Description"_s,
u"Xmp.dc.title"_s, tr("Title"), true);
appendExivPropertyIfExist(wrapper, u"Description"_s,
u"Exif.Image.ImageDescription"_s, tr("Subject"), true);
appendExivPropertyIfExist(wrapper, u"Description"_s,
u"Exif.Image.Rating"_s, tr("Rating"));
appendExivPropertyIfExist(wrapper, u"Description"_s,
u"Xmp.dc.subject"_s, tr("Tags"));
appendPropertyIfNotEmpty(u"Description"_s, u"Description.Comments"_s,
tr("Comments"), wrapper.comment());
appendExivPropertyIfExist(wrapper, u"Origin"_s,
u"Exif.Image.Artist"_s, tr("Authors"));
appendExivPropertyIfExist(wrapper, u"Origin"_s,
u"Exif.Photo.DateTimeOriginal"_s, tr("Date taken"));
// FIXME: We may fetch the same type of metadata from different metadata collection.
// Current implementation is not pretty and may need to do a rework...
// appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
// QStringLiteral("Xmp.xmp.CreatorTool"), tr("Program name"));
appendExivPropertyIfExist(wrapper, u"Origin"_s,
u"Exif.Image.Software"_s, tr("Program name"));
appendExivPropertyIfExist(wrapper, u"Origin"_s,
u"Exif.Image.Copyright"_s, tr("Copyright"));
appendExivPropertyIfExist(wrapper, u"Image"_s,
u"Exif.Image.XResolution"_s, tr("Horizontal resolution"));
appendExivPropertyIfExist(wrapper, u"Image"_s,
u"Exif.Image.YResolution"_s, tr("Vertical resolution"));
appendExivPropertyIfExist(wrapper, u"Image"_s,
u"Exif.Image.ResolutionUnit"_s, tr("Resolution unit"));
appendExivPropertyIfExist(wrapper, u"Image"_s,
u"Exif.Photo.ColorSpace"_s, tr("Colour representation"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Image.Make"_s, tr("Camera maker"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Image.Model"_s, tr("Camera model"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.FNumber"_s, tr("F-stop"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.ExposureTime"_s, tr("Exposure time"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.ISOSpeedRatings"_s, tr("ISO speed"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.ExposureBiasValue"_s, tr("Exposure bias"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.FocalLength"_s, tr("Focal length"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.MaxApertureValue"_s, tr("Max aperture"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.MeteringMode"_s, tr("Metering mode"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.SubjectDistance"_s, tr("Subject distance"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.Flash"_s, tr("Flash mode"));
appendExivPropertyIfExist(wrapper, u"Camera"_s,
u"Exif.Photo.FocalLengthIn35mmFilm"_s, tr("35mm focal length"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.LensModel"_s, tr("Lens model"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.Contrast"_s, tr("Contrast"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.BrightnessValue"_s, tr("Brightness"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.ExposureProgram"_s, tr("Exposure program"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.Saturation"_s, tr("Saturation"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.Sharpness"_s, tr("Sharpness"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.WhiteBalance"_s, tr("White balance"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.DigitalZoomRatio"_s, tr("Digital zoom"));
appendExivPropertyIfExist(wrapper, u"AdvancedPhoto"_s,
u"Exif.Photo.ExifVersion"_s, tr("EXIF version"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSLatitudeRef"_s, tr("Latitude reference"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSLatitude"_s, tr("Latitude"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSLongitudeRef"_s, tr("Longitude reference"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSLongitude"_s, tr("Longitude"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSAltitudeRef"_s, tr("Altitude reference"));
appendExivPropertyIfExist(wrapper, u"GPS"_s,
u"Exif.GPSInfo.GPSAltitude"_s, tr("Altitude"));
}
}
QString MetadataModel::imageSize(const QSize &size)
{
QString imageSize;
if (size.isValid()) {
imageSize = tr("%1 x %2").arg(QString::number(size.width()), QString::number(size.height()));
} else {
imageSize = QLatin1Char('-');
}
return imageSize;
}
int simplegcd(int a, int b) {
return b == 0 ? a : simplegcd(b, a % b);
}
QString MetadataModel::imageSizeRatio(const QSize &size)
{
if (!size.isValid()) {
return QStringLiteral("-");
}
int gcd = simplegcd(size.width(), size.height());
return tr("%1 : %2").arg(QString::number(size.width() / gcd), QString::number(size.height() / gcd));
}
bool MetadataModel::appendSection(const QString &sectionKey, QStringView sectionDisplayName)
{
if (m_sections.contains(sectionKey)) {
return false;
}
m_sections.append(sectionKey);
m_sectionProperties[sectionKey] = qMakePair<QString, QList<QString> >(sectionDisplayName.toString(), {});
return true;
}
bool MetadataModel::appendPropertyIfNotEmpty(const QString &sectionKey, const QString &propertyKey, const QString &propertyDisplayName, const QString &propertyValue)
{
if (propertyValue.isEmpty()) return false;
return appendProperty(sectionKey, propertyKey, propertyDisplayName, propertyValue);
}
bool MetadataModel::appendProperty(const QString &sectionKey, const QString &propertyKey, QStringView propertyDisplayName, QStringView propertyValue)
{
if (!m_sections.contains(sectionKey)) {
return false;
}
QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
if (!propertyList.contains(propertyKey)) {
propertyList.append(propertyKey);
}
m_properties[propertyKey] = qMakePair<QString, QString>(propertyDisplayName.toString(), propertyValue.toString());
return true;
}
bool MetadataModel::appendExivPropertyIfExist(const Exiv2Wrapper &wrapper, const QString &sectionKey, const QString &exiv2propertyKey, const QString &propertyDisplayName, bool isXmpString)
{
const QString & value = wrapper.value(exiv2propertyKey);
if (!value.isEmpty()) {
appendProperty(sectionKey, exiv2propertyKey,
propertyDisplayName.isEmpty() ? wrapper.label(exiv2propertyKey) : propertyDisplayName,
isXmpString ? Exiv2Wrapper::XmpValue(value) : value);
return true;
}
return false;
}
QModelIndex MetadataModel::index(int row, int column, const QModelIndex &parent) const
{
if (!hasIndex(row, column, parent)) {
return QModelIndex();
}
if (!parent.isValid()) {
return createIndex(row, column, RowType::SectionRow);
} else {
// internalid param: row means nth section it belongs to.
return createIndex(row, column, RowType::PropertyRow + parent.row());
}
}
QModelIndex MetadataModel::parent(const QModelIndex &child) const
{
if (!child.isValid()) {
return QModelIndex();
}
if (child.internalId() == RowType::SectionRow) {
return QModelIndex();
} else {
return createIndex(child.internalId() - RowType::PropertyRow, 0, SectionRow);
}
}
int MetadataModel::rowCount(const QModelIndex &parent) const
{
if (!parent.isValid()) {
return m_sections.count();
}
if (parent.internalId() == RowType::SectionRow) {
const QString & sectionKey = m_sections[parent.row()];
return m_sectionProperties[sectionKey].second.count();
}
return 0;
}
int MetadataModel::columnCount(const QModelIndex &) const
{
// Always key(display name) and value.
return 2;
}
QVariant MetadataModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid()) {
return QVariant();
}
if (role != Qt::DisplayRole) {
return QVariant();
}
if (index.internalId() == RowType::SectionRow) {
return (index.column() == 0) ? m_sectionProperties[m_sections[index.row()]].first
: QVariant();
} else {
int sectionIndex = index.internalId() - RowType::PropertyRow;
const QString & sectionKey = m_sections[sectionIndex];
const QList<QString> & propertyList = m_sectionProperties[sectionKey].second;
return (index.column() == 0) ? m_properties[propertyList[index.row()]].first
: m_properties[propertyList[index.row()]].second;
}
}
QVariant MetadataModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Vertical || role != Qt::DisplayRole) {
return QVariant();
}
return section == 0 ? tr("Property") : tr("Value");
}
+52
View File
@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef METADATAMODEL_H
#define METADATAMODEL_H
#include <QAbstractItemModel>
class Exiv2Wrapper;
class MetadataModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit MetadataModel(QObject *parent = nullptr);
~MetadataModel();
void setFile(const QString & imageFilePath);
static QString imageSize(const QSize &size);
static QString imageSizeRatio(const QSize &size);
bool appendSection(const QString & sectionKey, QStringView sectionDisplayName);
bool appendPropertyIfNotEmpty(const QString & sectionKey, const QString & propertyKey,
const QString & propertyDisplayName, const QString & propertyValue = QString());
bool appendProperty(const QString & sectionKey, const QString & propertyKey,
QStringView propertyDisplayName, QStringView propertyValue = QString());
bool appendExivPropertyIfExist(const Exiv2Wrapper & wrapper, const QString & sectionKey,
const QString & exiv2propertyKey, const QString & propertyDisplayName = QString(),
bool isXmpString = false);
private:
enum RowType : quintptr {
SectionRow,
PropertyRow,
};
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &child) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex & = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
// [SECTION_KEY]
QList<QString> m_sections;
// {SECTION_KEY: (SECTION_DISPLAY_NAME, [PROPERTY_KEY])}
QMap<QString, QPair<QString, QList<QString> > > m_sectionProperties;
// {PROPERTY_KEY: (PROPERTY_DISPLAY_NAME, PROPERTY_VALUE)}
QMap<QString, QPair<QString, QString> > m_properties;
};
#endif // METADATAMODEL_H
+115
View File
@@ -0,0 +1,115 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "navigatorview.h"
#include "graphicsview.h"
#include <QStyleHints>
#include <QOperatingSystemVersion>
#include <QMouseEvent>
#include <QDebug>
#include <QTimer>
NavigatorView::NavigatorView(QWidget *parent)
: QGraphicsView (parent)
, m_viewportRegion(this->rect())
{
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
updateStyle(qGuiApp->styleHints()->colorScheme());
connect(qGuiApp->styleHints(), &QStyleHints::colorSchemeChanged, this, &NavigatorView::updateStyle);
}
// doesn't take or manage its ownership
void NavigatorView::setMainView(GraphicsView *mainView)
{
m_mainView = mainView;
}
void NavigatorView::updateMainViewportRegion()
{
// Use QTimer::singleShot with lambda to delay the update
// This ensures all geometry updates are complete before calculating viewport region
QTimer::singleShot(0, [this]() {
if (m_mainView != nullptr) {
m_viewportRegion = mapFromScene(m_mainView->mapToScene(m_mainView->rect()));
update();
}
});
}
void NavigatorView::updateStyle(Qt::ColorScheme colorScheme) {
// YYC MARK:
// If we are using Windows 10 and lower system, we should only support light mode.
// Because Qt's dark-mode-aware "Windows 11" theme is only well-supported on Windows 11.
#if defined(Q_OS_WIN)
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows11) {
colorScheme = Qt::ColorScheme::Light;
}
#endif // defined(Q_OS_WIN)
switch (colorScheme) {
case Qt::ColorScheme::Dark:
setStyleSheet(R"#(
border-style: none;
background-color: rgba(255, 255, 255, 70);
)#");
break;
case Qt::ColorScheme::Light:
case Qt::ColorScheme::Unknown:
default:
setStyleSheet(R"#(
border-style: none;
background-color: rgba(0, 0, 0, 70);
)#");
break;
}
}
void NavigatorView::mousePressEvent(QMouseEvent *event)
{
m_mouseDown = true;
if (m_mainView) {
m_mainView->centerOn(mapToScene(event->pos()));
update();
}
event->accept();
}
void NavigatorView::mouseMoveEvent(QMouseEvent *event)
{
if (m_mouseDown && m_mainView) {
m_mainView->centerOn(mapToScene(event->pos()));
update();
event->accept();
} else {
event->ignore();
}
}
void NavigatorView::mouseReleaseEvent(QMouseEvent *event)
{
m_mouseDown = false;
event->accept();
}
void NavigatorView::wheelEvent(QWheelEvent *event)
{
event->ignore();
return QGraphicsView::wheelEvent(event);
}
void NavigatorView::paintEvent(QPaintEvent *event)
{
QGraphicsView::paintEvent(event);
QPainter painter(viewport());
painter.setPen(QPen(Qt::gray, 2));
painter.drawRect(m_viewportRegion.boundingRect());
}
+38 -34
View File
@@ -1,34 +1,38 @@
#ifndef NAVIGATORVIEW_H
#define NAVIGATORVIEW_H
#include <QGraphicsView>
class OpacityHelper;
class GraphicsView;
class NavigatorView : public QGraphicsView
{
Q_OBJECT
public:
NavigatorView(QWidget *parent = nullptr);
void setMainView(GraphicsView *mainView);
void setOpacity(qreal opacity, bool animated = true);
public slots:
void updateMainViewportRegion();
private:
void mousePressEvent(QMouseEvent * event) override;
void mouseMoveEvent(QMouseEvent * event) override;
void mouseReleaseEvent(QMouseEvent * event) override;
void wheelEvent(QWheelEvent *event) override;
void paintEvent(QPaintEvent *event) override;
bool m_mouseDown = false;
QPolygon m_viewportRegion;
QGraphicsView *m_mainView = nullptr;
OpacityHelper *m_opacityHelper = nullptr;
};
#endif // NAVIGATORVIEW_H
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef NAVIGATORVIEW_H
#define NAVIGATORVIEW_H
#include <QGraphicsView>
class GraphicsView;
class NavigatorView : public QGraphicsView
{
Q_OBJECT
public:
NavigatorView(QWidget *parent = nullptr);
void setMainView(GraphicsView *mainView);
public slots:
void updateMainViewportRegion();
private slots:
void updateStyle(Qt::ColorScheme colorScheme);
private:
void mousePressEvent(QMouseEvent * event) override;
void mouseMoveEvent(QMouseEvent * event) override;
void mouseReleaseEvent(QMouseEvent * event) override;
void wheelEvent(QWheelEvent *event) override;
void paintEvent(QPaintEvent *event) override;
bool m_mouseDown = false;
QPolygon m_viewportRegion;
QGraphicsView *m_mainView = nullptr;
};
#endif // NAVIGATORVIEW_H
+295
View File
@@ -0,0 +1,295 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#include "playlistmanager.h"
#include "playlistscout.h"
#include <QCollator>
#include <QDir>
#include <QFileInfo>
#include <QUrl>
PlaylistManager::PlaylistManager(QObject *parent)
: QObject(parent)
, m_currentIndex(std::nullopt)
, m_playlist()
, m_allowedSuffixes()
{
}
PlaylistManager::~PlaylistManager()
{
}
// region: Allowed Suffixes Operations
const QStringList& PlaylistManager::allowedSuffixes() const {
return m_allowedSuffixes;
}
void PlaylistManager::setAllowedSuffixes(const QStringList& nameFilters) {
m_allowedSuffixes = nameFilters;
emit allowedSuffixesChanged(m_allowedSuffixes);
}
// endregion
// region: Playlist Loader and Reset
bool PlaylistManager::loadPlaylist(const QStringList& files) {
// Convert string list to url list first
QList<QUrl> urls;
for (const QString & file : std::as_const(files)) {
urls.append(urlFromString(file));
}
return loadPlaylist(urls);
}
bool PlaylistManager::loadPlaylist(const QList<QUrl>& urls) {
// Check its count, and check M3U8 playlist for single file case.
if (urls.isEmpty()) {
clearPlaylist();
return true;
} else if (urls.count() == 1) {
const QUrl& firstUrl = urls.first();
const QString lowerCaseUrlPath(firstUrl.path().toLower());
if (lowerCaseUrlPath.endsWith(".m3u8") || lowerCaseUrlPath.endsWith(".m3u")) {
return loadM3U8Playlist(firstUrl);
} else {
return loadSingleFilePlaylist(firstUrl);
}
} else {
return loadMultipleFilesPlaylist(std::move(urls));
}
}
bool PlaylistManager::loadSingleFilePlaylist(const QUrl& url) {
// Check URL at first
if (!checkUrl(url))
return false;
// Scout playlist by given file
auto scoutResult = PlaylistScout::scout(url, m_allowedSuffixes);
if (!scoutResult.has_value()) {
return false;
}
// Setup playlist with index
setPlaylist(std::move(scoutResult->playlist), scoutResult->indexHint);
return true;
}
bool PlaylistManager::loadMultipleFilesPlaylist(const QList<QUrl>&& urls) {
// Check all of them are valid
for (const auto& url : std::as_const(urls)) {
if (!checkUrl(url)) {
return false;
}
}
// Set playlist and return
setPlaylist(std::move(urls));
return true;
}
bool PlaylistManager::loadM3U8Playlist(const QUrl& url) {
// Check URL at first
if (!checkUrl(url))
return false;
QList<QUrl> urls;
QFile file(url.toLocalFile());
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
while (!file.atEnd()) {
QString line = file.readLine();
if (line.startsWith('#')) {
continue;
}
QFileInfo fileInfo(file);
QUrl item = QUrl::fromUserInput(line, fileInfo.absolutePath());
if (!checkUrl(item)) {
return false;
}
urls.append(item);
}
} else {
return false;
}
setPlaylist(std::move(urls));
return true;
}
void PlaylistManager::setPlaylist(const QList<QUrl>&& urls, std::optional<qsizetype> indexHint) {
// Setup playlist
m_playlist = std::move(urls);
// Set index with hint
if (indexHint.has_value()) {
m_currentIndex = *indexHint;
}
sanitizeIndex();
// Raise signal
emit playlistChanged(totalCount());
}
void PlaylistManager::clearPlaylist() {
m_playlist.clear();
sanitizeIndex();
emit playlistChanged(this->totalCount());
}
// endregion
// region: Playlist Operations
void PlaylistManager::appendToPlaylist(const QString &file)
{
return appendToPlaylist(urlFromString(file));
}
void PlaylistManager::appendToPlaylist(const QUrl &url)
{
m_playlist.append(url);
sanitizeIndex();
emit playlistChanged(totalCount());
}
bool PlaylistManager::insertIntoPlaylist(qsizetype index, const QString &file)
{
return insertIntoPlaylist(index, urlFromString(file));
}
bool PlaylistManager::insertIntoPlaylist(qsizetype index, const QUrl &url)
{
if (index < 0 || index > totalCount()) {
return false;
} else {
m_playlist.insert(index, url);
sanitizeIndex();
emit playlistChanged(totalCount());
return true;
}
}
bool PlaylistManager::removeFromPlaylist(qsizetype index)
{
if (index < 0 || index >= totalCount()) {
return false;
} else {
m_playlist.removeAt(index);
sanitizeIndex();
emit playlistChanged(totalCount());
return true;
}
}
// endregion
// region: Index Operations
qsizetype PlaylistManager::totalCount() const
{
return m_playlist.count();
}
std::optional<qsizetype> PlaylistManager::previousIndex() const
{
if (!m_currentIndex.has_value() || totalCount() <= 0) return std::nullopt;
return (isFirstIndex() ? totalCount() - 1 : *m_currentIndex - 1);
}
std::optional<qsizetype> PlaylistManager::nextIndex() const
{
if (!m_currentIndex.has_value() || totalCount() <= 0) return std::nullopt;
return (isLastIndex() ? 0 : *m_currentIndex + 1);
}
bool PlaylistManager::isFirstIndex() const
{
return m_currentIndex.has_value() && *m_currentIndex == 0;
}
bool PlaylistManager::isLastIndex() const
{
return m_currentIndex.has_value() && *m_currentIndex + 1 == totalCount();
}
std::optional<qsizetype> PlaylistManager::currentIndex() const
{
return m_currentIndex;
}
bool PlaylistManager::setCurrentIndex(qsizetype index)
{
if (!m_currentIndex.has_value()) {
return false;
}
if (index < 0 || index >= totalCount()) {
return false;
}
if (*m_currentIndex == index) {
return true;
}
m_currentIndex = index;
emit currentIndexChanged(index);
return true;
}
QUrl PlaylistManager::urlByIndex(qsizetype index) const
{
return m_playlist.value(index);
}
QString PlaylistManager::localFileByIndex(qsizetype index) const
{
return urlByIndex(index).toLocalFile();
}
// endregion
// region: Misc
void PlaylistManager::sanitizeIndex()
{
auto cnt = totalCount();
if (cnt == 0) {
// If playlist is empty, current index should be invalid.
m_currentIndex = std::nullopt;
} else {
if (m_currentIndex.has_value()) {
// Clamp current index in playlist range.
// If it is already in range, not change was done.
auto currentIndex = *m_currentIndex;
if (currentIndex < 0) {
m_currentIndex = 0;
} else if (currentIndex >= cnt) {
m_currentIndex = cnt - 1;
} else {
; // No change.
}
} else {
// If there is no set value for current index,
// set it at the beginning of playlist.
m_currentIndex = 0;
}
}
}
bool PlaylistManager::checkUrl(const QUrl& url)
{
return url.isValid() && url.isLocalFile();
}
QUrl PlaylistManager::urlFromString(const QString& file)
{
return QUrl::fromLocalFile(file);
}
// endregion
+130
View File
@@ -0,0 +1,130 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QUrl>
#include <QObject>
#include <optional>
/// The manager of playlist.
class PlaylistManager : public QObject
{
Q_OBJECT
public:
/// Constructs a PlaylistManager with an optional parent QObject.
explicit PlaylistManager(QObject* parent = nullptr);
/// Destructor.
~PlaylistManager();
/// Get the allowed file suffixes of this playlist.
/// @return The current list of allowed suffixes.
const QStringList& allowedSuffixes() const;
/// Set the allowed file suffixes of this playlist.
/// @remark This only works for "load the whole directory by one file" case.
/// @param[in] nameFilters The new list of allowed suffixes.
void setAllowedSuffixes(const QStringList& nameFilters);
/// Load user specified files as playlist.
/// @remark The wrapper for another overload.
/// @return True for successful load, otherwise false.
bool loadPlaylist(const QStringList& files);
/// Load user specified URLs as playlist.
/// @remark This function automatically dispatch these files into correct sub-load functions.
/// @return True for successful load, otherwise false.
bool loadPlaylist(const QList<QUrl>& urls);
/// Clear the entire playlist and reset current index.
void clearPlaylist();
/// Append a local file path to the playlist.
void appendToPlaylist(const QString& file);
/// Append a URL to the playlist.
void appendToPlaylist(const QUrl& url);
/// Insert a local file path at the given index.
/// @return True if inserted successfully, false if index is out of range.
bool insertIntoPlaylist(qsizetype index, const QString& file);
/// Insert a URL at the given index.
/// @return True if inserted successfully, false if index is out of range.
bool insertIntoPlaylist(qsizetype index, const QUrl& url);
/// Remove the entry at the given index.
/// @return True if removed successfully, false if index is out of range.
bool removeFromPlaylist(qsizetype index);
/// Returns the total number of items in the playlist.
/// @return Total count of entries in the playlist.
qsizetype totalCount() const;
/// Try fetching previous index.
/// @details This previous index is gallery-loop-aware.
/// @return std::nullopt if playlist is empty, otherwise the previous index considering gallery loop.
std::optional<qsizetype> previousIndex() const;
/// Try fetching next index.
/// @details This next index is gallery-loop-aware.
/// @return std::nullopt if playlist is empty, otherwise the next index considering gallery loop.
std::optional<qsizetype> nextIndex() const;
/// Check whether current index is the first index.
/// @return False if current index is not the first index or playlist is empty, otherwise true.
bool isFirstIndex() const;
/// Check whether current index is the last index.
/// @return False if current index is not the last index or playlist is empty, otherwise true.
bool isLastIndex() const;
/// Returns the current index.
/// @return std::nullopt if the playlist is empty, otherwise the current index.
std::optional<qsizetype> currentIndex() const;
/// Set the current index.
/// @remark Index only can be set when playlist is not empty.
/// @return True if successful set, including "not changed" set, otherwise false.
/// This return value only indicates whether we can set index and given index is valid for setting.
/// If "no changed" set occurs, this function returns true, but doesn't raise current index changed signal.
bool setCurrentIndex(qsizetype index);
/// Returns the URL at the given index.
/// @return The URL if index is valid.
/// This class guarantee that this QUrl is pointing to a local file.
QUrl urlByIndex(qsizetype index) const;
/// Returns the local file path at the given index.
/// @return The local file path if index is valid.
/// This class guarantee that local file path always is valid.
QString localFileByIndex(qsizetype index) const;
signals:
void allowedSuffixesChanged(const QStringList& suffixes);
/// Raised when index was changed bu setter.
/// The argument holds the new current index.
/// Please note that this signal will NOT be raised by the whole playlist change caused index change.
void currentIndexChanged(qsizetype index);
/// The whole playlist was changed, involving loading, editing and deleting some or full entries.
/// The argument holds the total count of new play list.
void playlistChanged(qsizetype count);
private:
/// The fundamental playlist setter.
/// @details All playlist load functions will call this function to set playlist at last.
/// @param[in] urls ALl urls in this list should be checked by checkUrl() function.
/// @param[in] indexHint Try to set current index to this index if possible.
void setPlaylist(const QList<QUrl>&& urls, std::optional<qsizetype> indexHint = std::nullopt);
/// Load playlist from a single file.
/// @details This function scans the same directory for siblings matching allowed suffixes, sorted naturally.
/// @return True if the playlist was loaded successfully, false otherwise.
bool loadSingleFilePlaylist(const QUrl& url);
/// Load playlist from multiple URLs directly.
/// @return True if all URLs are valid, false otherwise.
bool loadMultipleFilesPlaylist(const QList<QUrl>&& urls);
/// Load playlist from an M3U/M3U8 playlist file.
/// @return True if loaded successfully, false otherwise.
bool loadM3U8Playlist(const QUrl& url);
/// Make sure that current index is valid.
/// @details This function usually is used by those functions manipulating playlist.
void sanitizeIndex();
/// Check whether given QUrl is proper to be put into playlist.
/// @details Only the url pointing to local file can be put into playlist.
static bool checkUrl(const QUrl& url);
/// Convert a string to local file into a QUrl.
/// @param[in] file The string pointing to local file.
static QUrl urlFromString(const QString& file);
std::optional<qsizetype> m_currentIndex;
QList<QUrl> m_playlist;
QStringList m_allowedSuffixes;
};
+25
View File
@@ -0,0 +1,25 @@
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#include "playlistscout.h"
#include "playlistscouts/qtscout.h"
#include "playlistscouts/explorerscout.h"
std::optional<PlaylistScout::ScoutResult> PlaylistScout::scout(
const QUrl &url, const QStringList &allowedSuffixes) {
#ifdef Q_OS_WIN
// In Windows, Qt approach can not aware Windows Explorer custom sort order.
// So we need to try using Win32 functions for fetching it at first.
if (auto rv = PlaylistScout::Explorer::scout(url, allowedSuffixes); rv.has_value()) {
return rv;
}
#endif // Q_OS_WIN
// TODO: We may add macOS Finder, KDE Dolphin and etc supports in future.
// Qt way is the last fallback.
return PlaylistScout::Qt::scout(url, allowedSuffixes);
}
+31
View File
@@ -0,0 +1,31 @@
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QUrl>
#include <QStringList>
#include <QList>
#include <optional>
namespace PlaylistScout {
/// The result of scout
struct ScoutResult {
/// The final fetched playlist (it can be empty).
/// Each item must be a QUrl pointing to a local file.
QList<QUrl> playlist;
/// The index of given file located in playlist.
/// Nullopt if it is not presented in playlist.
std::optional<qsizetype> indexHint;
};
/// @brief Scout available image files in given file's parent dir with given allowed suffixes.
/// @param[in] url The path to file whose parent dir is our target dir for finding image files.
/// @param[in] allowedSuffixes
/// Each items in this list is a wildcard pattern for matching allowed file name, like \c *.png .
/// The fetched item will be preserved if its name matching any of them.
/// If this list is empty, there is no restrictions for finding files.
/// @return Scout result if success, otherwise nullopt.
std::optional<ScoutResult> scout(const QUrl &url, const QStringList &allowedSuffixes);
}
+341
View File
@@ -0,0 +1,341 @@
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#include "explorerscout.h"
#ifdef Q_OS_WIN
#include <QDir>
#include <QDebug>
#include <QFileInfo>
#include <QRegularExpression>
#include <optional>
// YYC MARK:
// <exdisp.h> is not self-contained: it only includes <rpc.h>/<rpcndr.h> before
// emitting `typedef interface ...` forward declarations, while the `interface`
// macro (defined as `struct` for C++) lives in <combaseapi.h>, which is pulled
// in via the <objbase.h> chain. Without this prelude, MSVC fails to parse those
// forward declarations (C2146/C2371) and every IShellWindows usage breaks.
// (Qt headers do not include <windows.h>, so nothing else provides it here.)
#include <objbase.h>
#include <exdisp.h> // IShellWindows, CLSID_ShellWindows
#include <servprov.h> // IServiceProvider
#include <shlguid.h> // SID_STopLevelBrowser
#include <shlobj.h>
// YYC MARK:
// We use custom RAII wrappers instead of existing COM smart pointers because the
// project may be built with MinGW, which does not have good compatibility with
// CComPtr and Microsoft's WRL ComPtr (<wrl/client.h>).
// Furthermore, PIDLs are not COM objects (they are freed via ILFree, not Release),
// so no standard smart pointer covers them regardless of compiler.
/// RAII wrapper for COM initialization (CoInitialize / CoUninitialize).
/// Must be declared before any COM objects (e.g., ComPtr, UniquePidl) so that
/// CoUninitialize runs after all COM objects are released during scope exit.
class ComGuard {
public:
ComGuard() : m_hr(CoInitialize(nullptr)) {}
~ComGuard() { if (SUCCEEDED(m_hr)) CoUninitialize(); }
ComGuard(const ComGuard&) = delete;
ComGuard& operator=(const ComGuard&) = delete;
bool IsInitialized() const { return SUCCEEDED(m_hr); }
private:
HRESULT m_hr;
};
/// RAII wrapper for COM interface pointers.
template <typename T>
class ComPtr {
public:
ComPtr() = default;
ComPtr(std::nullptr_t) {}
~ComPtr() { Reset(); }
ComPtr(const ComPtr&) = delete;
ComPtr& operator=(const ComPtr&) = delete;
ComPtr(ComPtr&& other) noexcept : m_ptr(other.m_ptr) { other.m_ptr = nullptr; }
ComPtr& operator=(ComPtr&& other) noexcept {
if (this != &other) {
Reset();
m_ptr = other.m_ptr;
other.m_ptr = nullptr;
}
return *this;
}
T* operator->() const { return m_ptr; }
T* Get() const { return m_ptr; }
T** GetAddressOf() { return &m_ptr; }
explicit operator bool() const { return m_ptr != nullptr; }
void Reset() { if (m_ptr) { m_ptr->Release(); m_ptr = nullptr; } }
private:
T* m_ptr = nullptr;
};
/// RAII wrapper for PIDL (Item ID List).
class UniquePidl {
public:
UniquePidl() = default;
explicit UniquePidl(LPITEMIDLIST pidl) : m_pidl(pidl) {}
~UniquePidl() { Reset(); }
UniquePidl(const UniquePidl&) = delete;
UniquePidl& operator=(const UniquePidl&) = delete;
UniquePidl(UniquePidl&& other) noexcept : m_pidl(other.m_pidl) { other.m_pidl = nullptr; }
UniquePidl& operator=(UniquePidl&& other) noexcept {
if (this != &other) {
Reset();
m_pidl = other.m_pidl;
other.m_pidl = nullptr;
}
return *this;
}
LPCITEMIDLIST Get() const { return m_pidl; }
LPITEMIDLIST* GetAddressOf() { return &m_pidl; }
explicit operator bool() const { return m_pidl != nullptr; }
void Reset() { if (m_pidl) { ILFree(m_pidl); m_pidl = nullptr; } }
private:
LPITEMIDLIST m_pidl = nullptr;
};
/// Outputs a diagnostic warning for debugging Windows Explorer integration failures.
static void ReportError(const QString& detail)
{
qWarning("Windows Explorer file list fetch error: %s",
qPrintable(detail));
}
/// Normalizes a Windows directory path for case-insensitive comparison:
/// converts to native separators, lowercases, and ensures a trailing backslash.
static QString NormalizePath(const QString& path)
{
QString result = QDir::toNativeSeparators(path).toLower();
if (!result.endsWith(QChar('\\'))) {
result += QChar('\\');
}
return result;
}
/// Checks whether the Explorer window represented by the given IDispatch is
/// displaying the target folder. Returns its IFolderView2 on match, or null.
static ComPtr<IFolderView2> TryMatchWindow(IDispatch* dispatch, const QString& normalizedTarget)
{
// Navigate: IDispatch -> IServiceProvider -> IShellBrowser.
ComPtr<IServiceProvider> serviceProvider;
if (FAILED(dispatch->QueryInterface(IID_PPV_ARGS(serviceProvider.GetAddressOf())))) {
return nullptr;
}
ComPtr<IShellBrowser> shellBrowser;
if (FAILED(serviceProvider->QueryService(SID_STopLevelBrowser,
IID_PPV_ARGS(shellBrowser.GetAddressOf())))) {
return nullptr;
}
// IShellBrowser -> active IShellView.
ComPtr<IShellView> shellView;
if (FAILED(shellBrowser->QueryActiveShellView(shellView.GetAddressOf()))) {
return nullptr;
}
// Retrieve the folder's path via IPersistIDList.
ComPtr<IPersistIDList> persistIdList;
if (FAILED(shellView->QueryInterface(IID_PPV_ARGS(persistIdList.GetAddressOf())))) {
return nullptr;
}
UniquePidl folderPidl;
if (FAILED(persistIdList->GetIDList(folderPidl.GetAddressOf()))) {
return nullptr;
}
PWSTR pathStr = nullptr;
if (FAILED(SHGetNameFromIDList(folderPidl.Get(), SIGDN_DESKTOPABSOLUTEPARSING, &pathStr))) {
return nullptr;
}
QString windowPath = NormalizePath(QString::fromWCharArray(pathStr));
CoTaskMemFree(pathStr);
if (windowPath != normalizedTarget) {
return nullptr;
}
// Path matches — query IFolderView2 from the ShellView.
ComPtr<IFolderView2> folderView2;
if (FAILED(shellView->QueryInterface(IID_PPV_ARGS(folderView2.GetAddressOf())))) {
return nullptr;
}
return folderView2;
}
/// Tries to find a live Explorer window that is currently displaying the given
/// folder path. Returns the IFolderView2 from that window, or an empty ComPtr.
///
/// Explorer's sort order is stored only in the running Explorer process's memory.
/// Creating a new shell view via IShellFolder::CreateViewObject yields a default
/// sort (always by name), so we must find the actual live IFolderView2 instead.
///
/// Reference:
/// - https://www.stephenli.ca/getting-windows-explorers-current-directory-sort-order
/// - https://github.com/d2phap/ImageGlass/blob/75a296287f338edcf409eee3917531b25ff5d927/v9/Components/ImageGlass.Base/FileSystem/FileFinder.cs
/// - NuGet Package: D2Phap.EggShell
static ComPtr<IFolderView2> FindLiveFolderView(const QString& targetFolderPath)
{
// Create the Shell windows collection (all open Explorer windows).
ComPtr<IShellWindows> shellWindows;
if (FAILED(CoCreateInstance(CLSID_ShellWindows, nullptr, CLSCTX_ALL,
IID_PPV_ARGS(shellWindows.GetAddressOf())))) {
ReportError("Failed to create IShellWindows instance");
return nullptr;
}
QString normalizedTarget = NormalizePath(targetFolderPath);
// 1. Try the Desktop window first — it may contain the file the user opened.
{
VARIANT varLoc;
VariantInit(&varLoc);
varLoc.vt = VT_I4;
varLoc.lVal = 0;
VARIANT varLocRoot;
VariantInit(&varLocRoot);
long desktopHwnd = 0;
ComPtr<IDispatch> desktopDispatch;
HRESULT findHr = shellWindows->FindWindowSW(
&varLoc, &varLocRoot, SWC_DESKTOP,
&desktopHwnd, SWFO_NEEDDISPATCH,
desktopDispatch.GetAddressOf());
VariantClear(&varLoc);
VariantClear(&varLocRoot);
if (SUCCEEDED(findHr) && desktopDispatch) {
ComPtr<IFolderView2> result = TryMatchWindow(desktopDispatch.Get(), normalizedTarget);
if (result) return result;
}
}
// 2. Iterate regular Explorer windows.
LONG count = 0;
shellWindows->get_Count(&count);
for (LONG i = 0; i < count; i++) {
VARIANT varIndex;
VariantInit(&varIndex);
varIndex.vt = VT_I4;
varIndex.lVal = i;
ComPtr<IDispatch> dispatch;
HRESULT itemHr = shellWindows->Item(varIndex, dispatch.GetAddressOf());
VariantClear(&varIndex);
if (FAILED(itemHr) || !dispatch) {
continue;
}
ComPtr<IFolderView2> result = TryMatchWindow(dispatch.Get(), normalizedTarget);
if (result) return result;
}
return nullptr;
}
std::optional<PlaylistScout::ScoutResult> PlaylistScout::Explorer::scout(
const QUrl &url, const QStringList &allowedSuffixes) {
PlaylistScout::ScoutResult rv;
QFileInfo info(url.toLocalFile());
QString folderPath = info.path();
QString currentFileName = info.fileName();
// Pre-compile wildcard suffix filters into regular expressions for performance.
QList<QRegularExpression> nameRegexps;
for (const QString &pattern : allowedSuffixes) {
nameRegexps.append(QRegularExpression(
QRegularExpression::wildcardToRegularExpression(pattern),
QRegularExpression::CaseInsensitiveOption));
}
// Initialize COM. The ComGuard must be declared before any COM objects
// below so that CoUninitialize runs after all of them are released.
ComGuard comGuard;
if (!comGuard.IsInitialized()) {
ReportError("COM initialization failed");
return std::nullopt;
}
// Find a live Explorer window that is currently displaying the target folder.
ComPtr<IFolderView2> folderView2 = FindLiveFolderView(folderPath);
if (!folderView2) {
ReportError("No open Explorer window matches the folder: " + folderPath);
return std::nullopt;
}
// Get items already sorted in Explorer's view order, as an IShellItemArray.
// SVGIO_ALLVIEW returns all items; SVGIO_FLAG_VIEWORDER respects the view's sort.
ComPtr<IShellItemArray> itemArray;
if (FAILED(folderView2->Items(SVGIO_ALLVIEW | SVGIO_FLAG_VIEWORDER,
IID_PPV_ARGS(itemArray.GetAddressOf())))) {
ReportError("IFolderView2::Items(SVGIO_ALLVIEW | SVGIO_FLAG_VIEWORDER) failed");
return std::nullopt;
}
DWORD itemCount = 0;
itemArray->GetCount(&itemCount);
// Enumerate sorted items, filter by pattern, and build the playlist.
for (DWORD i = 0; i < itemCount; i++) {
ComPtr<IShellItem> shellItem;
if (FAILED(itemArray->GetItemAt(i, shellItem.GetAddressOf()))) {
continue;
}
// Get the full parsing path of the item.
PWSTR pathStr = nullptr;
if (FAILED(shellItem->GetDisplayName(SIGDN_DESKTOPABSOLUTEPARSING, &pathStr)) || !pathStr) {
continue;
}
QString filePath = QString::fromWCharArray(pathStr);
CoTaskMemFree(pathStr);
// Skip directories — the view may include folders alongside files.
QFileInfo fileInfo(filePath);
if (!fileInfo.isFile()) {
continue;
}
QString fileName = fileInfo.fileName();
// Match against compiled wildcard patterns.
bool matches = nameRegexps.isEmpty();
for (const QRegularExpression &re : std::as_const(nameRegexps)) {
if (re.match(fileName).hasMatch()) {
matches = true;
break;
}
}
if (!matches) {
continue;
}
rv.playlist.append(QUrl::fromLocalFile(filePath));
if (fileName == currentFileName) {
rv.indexHint = rv.playlist.size() - 1;
}
}
return rv;
}
#endif // Q_OS_WIN
+16
View File
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#pragma once
#include "../playlistscout.h"
#include <QtSystemDetection>
#ifdef Q_OS_WIN
namespace PlaylistScout::Explorer {
std::optional<ScoutResult> scout(const QUrl &url, const QStringList &allowedSuffixes);
}
#endif // Q_OS_WIN
+40
View File
@@ -0,0 +1,40 @@
// SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#include "qtscout.h"
#include <QFileInfo>
#include <QDir>
#include <QCollator>
std::optional<PlaylistScout::ScoutResult> PlaylistScout::Qt::scout(
const QUrl &url, const QStringList &allowedSuffixes) {
PlaylistScout::ScoutResult rv;
QFileInfo info(url.toLocalFile());
QDir dir(info.path());
QString currentFileName = info.fileName();
QStringList entryList = dir.entryList(
allowedSuffixes, QDir::Files | QDir::NoSymLinks, QDir::NoSort);
QCollator collator;
collator.setNumericMode(true);
std::sort(entryList.begin(), entryList.end(), collator);
for (qsizetype i = 0; i < entryList.count(); i++) {
const QString &fileName = entryList.at(i);
const QString &oneEntry = dir.absoluteFilePath(fileName);
const QUrl &url = QUrl::fromLocalFile(oneEntry);
rv.playlist.append(url);
if (fileName == currentFileName) {
rv.indexHint = i;
}
}
return rv;
}
+11
View File
@@ -0,0 +1,11 @@
// SPDX-FileCopyrightText: 2026 yyc12345 <yyc12321@outlook.com>
//
// SPDX-License-Identifier: MIT
#pragma once
#include "../playlistscout.h"
namespace PlaylistScout::Qt {
std::optional<ScoutResult> scout(const QUrl &url, const QStringList &allowedSuffixes);
}
+174
View File
@@ -0,0 +1,174 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "settings.h"
#include <QApplication>
#include <QStandardPaths>
#include <QDebug>
#include <QDir>
#include <QAction>
#include <QWidget>
#include <QKeySequence>
#include <QMetaEnum>
Settings *Settings::instance()
{
// SAFETY:
// This is a global singleton and it is leaked by design.
static Settings* INSTANCE = new Settings(nullptr);
return INSTANCE;
}
namespace QEnumHelper
{
template <typename E>
E fromString(const QString &text, const E defaultValue)
{
bool ok;
E result = static_cast<E>(QMetaEnum::fromType<E>().keyToValue(text.toUtf8(), &ok));
if (!ok) {
return defaultValue;
}
return result;
}
template <typename E>
QString toString(E value)
{
const int intValue = static_cast<int>(value);
return QString::fromUtf8(QMetaEnum::fromType<E>().valueToKey(intValue));
}
}
bool Settings::showNavigatorView() const
{
return m_qsettings->value("show_navigator_view", true).toBool();
}
bool Settings::useLightCheckerboard() const
{
return m_qsettings->value("use_light_checkerboard", false).toBool();
}
bool Settings::loopGallery() const
{
return m_qsettings->value("loop_gallery", true).toBool();
}
bool Settings::svgTiny12Only() const
{
// Qt 6.7.0's SVG support is terrible caused by huge memory usage, see QTBUG-124287
// Qt 6.7.1's is somewhat better, memory issue seems fixed, but still laggy when zoom in, see QTBUG-126771.
// Qt 6.9.3 and Qt 6.10.1 seems no longer have the laggy issue, so let's make the default value different
// based on Qt version.
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 3)
return m_qsettings->value("svg_tiny12_only", true).toBool();
#else
return m_qsettings->value("svg_tiny12_only", false).toBool();
#endif // QT_VERSION < QT_VERSION_CHECK(6, 9, 3)
}
Settings::MouseWheelBehavior Settings::mouseWheelBehavior() const
{
QString result = m_qsettings->value("mouse_wheel_behavior", "").toString();
return QEnumHelper::fromString<MouseWheelBehavior>(result, MouseWheelBehavior::Zoom);
}
Settings::WindowSizeBehavior Settings::initWindowSizeBehavior() const
{
QString result = m_qsettings->value("init_window_size_behavior", "").toString();
return QEnumHelper::fromString<WindowSizeBehavior>(result, WindowSizeBehavior::Windowed);
}
Qt::HighDpiScaleFactorRoundingPolicy Settings::hiDpiScaleFactorBehavior() const
{
QString result = m_qsettings->value("hidpi_scale_factor_behavior", "").toString();
return QEnumHelper::fromString<Qt::HighDpiScaleFactorRoundingPolicy>(result, Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
}
void Settings::setShowNavigatorView(bool on)
{
m_qsettings->setValue("show_navigator_view", on);
m_qsettings->sync();
}
void Settings::setUseLightCheckerboard(bool light)
{
m_qsettings->setValue("use_light_checkerboard", light);
m_qsettings->sync();
}
void Settings::setLoopGallery(bool on)
{
m_qsettings->setValue("loop_gallery", on);
m_qsettings->sync();
}
void Settings::setSvgTiny12Only(bool on)
{
m_qsettings->setValue("svg_tiny12_only", on);
m_qsettings->sync();
}
void Settings::setMouseWheelBehavior(MouseWheelBehavior mwb)
{
m_qsettings->setValue("mouse_wheel_behavior", QEnumHelper::toString(mwb));
m_qsettings->sync();
}
void Settings::setInitWindowSizeBehavior(WindowSizeBehavior wsb)
{
m_qsettings->setValue("init_window_size_behavior", QEnumHelper::toString(wsb));
m_qsettings->sync();
}
void Settings::setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy hidpi)
{
m_qsettings->setValue("hidpi_scale_factor_behavior", QEnumHelper::toString(hidpi));
m_qsettings->sync();
}
#if defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
#include <windows.h>
// QCoreApplication::applicationDirPath() parses the "applicationDirPath" from arg0, which...
// 1. rely on a QApplication object instance
// but we need to call QGuiApplication::setHighDpiScaleFactorRoundingPolicy() before QApplication get created
// 2. arg0 is NOT garanteed to be the path of execution
// see also: https://stackoverflow.com/questions/383973/is-args0-guaranteed-to-be-the-path-of-execution
// This function is here mainly for #1.
QString getApplicationDirPath()
{
WCHAR buffer[MAX_PATH];
GetModuleFileNameW(NULL, buffer, MAX_PATH);
QString appPath = QString::fromWCharArray(buffer);
return appPath.left(appPath.lastIndexOf('\\'));
}
#endif // defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
Settings::Settings(QObject *parent)
: QObject(parent)
{
QString configPath;
#if defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
QString portableConfigDirPath = QDir(getApplicationDirPath()).absoluteFilePath("data");
QFileInfo portableConfigDirInfo(portableConfigDirPath);
if (portableConfigDirInfo.exists() && portableConfigDirInfo.isDir() && portableConfigDirInfo.isWritable()) {
// we can use it.
configPath = portableConfigDirPath;
}
#endif // defined(FLAG_PORTABLE_MODE_SUPPORT) && defined(Q_OS_WIN)
if (configPath.isEmpty()) {
// Should be %LOCALAPPDATA%\<APPNAME> under Windows, ~/.config/<APPNAME> under Linux.
configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
}
m_qsettings = new QSettings(QDir(configPath).absoluteFilePath("config.ini"), QSettings::IniFormat, this);
qRegisterMetaType<QList<QKeySequence>>();
}
+52
View File
@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QObject>
#include <QSettings>
class Settings : public QObject
{
Q_OBJECT
public:
enum MouseWheelBehavior {
Zoom,
Switch,
};
Q_ENUM(MouseWheelBehavior)
enum WindowSizeBehavior {
Maximized,
Windowed,
};
Q_ENUM(WindowSizeBehavior)
static Settings *instance();
bool showNavigatorView() const;
bool useLightCheckerboard() const;
bool loopGallery() const;
bool svgTiny12Only() const;
MouseWheelBehavior mouseWheelBehavior() const;
WindowSizeBehavior initWindowSizeBehavior() const;
Qt::HighDpiScaleFactorRoundingPolicy hiDpiScaleFactorBehavior() const;
void setShowNavigatorView(bool on);
void setUseLightCheckerboard(bool light);
void setLoopGallery(bool on);
void setSvgTiny12Only(bool on);
void setMouseWheelBehavior(MouseWheelBehavior mwb);
void setInitWindowSizeBehavior(WindowSizeBehavior wsb);
void setHiDpiScaleFactorBehavior(Qt::HighDpiScaleFactorRoundingPolicy hidpi);
private:
Settings(QObject *parent = nullptr);
QSettings *m_qsettings;
signals:
public slots:
};
+142
View File
@@ -0,0 +1,142 @@
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#include "settings.h"
#include <QApplication>
#include <QTimer>
#include <QStringListModel>
#include <type_traits>
template <typename E, typename = std::enable_if_t<std::is_enum_v<E>>>
class EnumComboBoxTransformer {
public:
using Pair = QPair<E, QString>;
using Pairs = QList<QPair<E, QString>>;
EnumComboBoxTransformer(Pairs &&pairs) : pairs(std::move(pairs)) {}
~EnumComboBoxTransformer() = default;
Q_DISABLE_COPY_MOVE(EnumComboBoxTransformer)
/// Build Qt model used for QComboBox
QStringListModel* buildComboBoxModel(QObject *parent = nullptr) const {
QStringList dropDownEntries;
for (const auto& pair : std::as_const(this->pairs)) {
dropDownEntries.append(pair.second);
}
return new QStringListModel(dropDownEntries, parent);
}
/// Convert QComboBox index to enum value.
E to_value(int index) const {
return this->pairs.at(static_cast<qsizetype>(index)).first;
}
/// Convert enum value to QComboBox index.
int to_index(E value) const {
for (qsizetype i = 0; i < pairs.size(); ++i) {
if (pairs.at(i).first == value) {
return static_cast<int>(i);
}
}
// Value not found
throw std::invalid_argument("invalid enum value for finding index");
}
private:
Pairs pairs;
};
SettingsDialog::SettingsDialog(QWidget *parent)
: QDialog(parent), ui(new QT_PREPEND_NAMESPACE(Ui::SettingsDialog))
{
ui->setupUi(this);
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
// YYC MARK:
// These transformers must stay as function-local statics: their initialization
// evaluates QCoreApplication::translate(), which returns translated text only
// after the QTranslator is installed in main(). Namespace-scope statics would
// be initialized before that and always keep the untranslated source text.
static EnumComboBoxTransformer<Settings::MouseWheelBehavior, QString> MW_OPTIONS {
{
{ Settings::MouseWheelBehavior::Zoom, QCoreApplication::translate("SettingsDialog", "Zoom in and out") },
{ Settings::MouseWheelBehavior::Switch, QCoreApplication::translate("SettingsDialog", "View next or previous item") }
}
};
static EnumComboBoxTransformer<Settings::WindowSizeBehavior, QString> IWS_OPTIONS {
{
{ Settings::WindowSizeBehavior::Maximized, QCoreApplication::translate("SettingsDialog", "Maximized") },
{ Settings::WindowSizeBehavior::Windowed, QCoreApplication::translate("SettingsDialog", "Windowed") }
}
};
static EnumComboBoxTransformer<Qt::HighDpiScaleFactorRoundingPolicy, QString> HIDPI_OPTIONS {
{
{ Qt::HighDpiScaleFactorRoundingPolicy::Round, QCoreApplication::translate("SettingsDialog", "Round (Integer scaling)", "This option means round up for .5 and above") },
{ Qt::HighDpiScaleFactorRoundingPolicy::Ceil, QCoreApplication::translate("SettingsDialog", "Ceil (Integer scaling)", "This option means always round up") },
{ Qt::HighDpiScaleFactorRoundingPolicy::Floor, QCoreApplication::translate("SettingsDialog", "Floor (Integer scaling)", "This option means always round down") },
{ Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, QCoreApplication::translate("SettingsDialog", "Follow system (Fractional scaling)", "This option means don't round") }
}
};
auto* settings = Settings::instance();
ui->m_showNavigatorView->setChecked(Settings::instance()->showNavigatorView());
ui->m_useLightCheckerboard->setChecked(settings->useLightCheckerboard());
ui->m_loopGallery->setChecked(settings->loopGallery());
ui->m_svgTiny12Only->setChecked(settings->svgTiny12Only());
ui->m_mouseWheelBehavior->setModel(MW_OPTIONS.buildComboBoxModel(this));
Settings::MouseWheelBehavior mwb = settings->mouseWheelBehavior();
ui->m_mouseWheelBehavior->setCurrentIndex(MW_OPTIONS.to_index(mwb));
ui->m_initWindowSizeBehavior->setModel(IWS_OPTIONS.buildComboBoxModel(this));
Settings::WindowSizeBehavior iwsb = settings->initWindowSizeBehavior();
ui->m_initWindowSizeBehavior->setCurrentIndex(IWS_OPTIONS.to_index(iwsb));
ui->m_hiDpiRoundingPolicyBehavior->setModel(HIDPI_OPTIONS.buildComboBoxModel(this));
Qt::HighDpiScaleFactorRoundingPolicy hidpi = settings->hiDpiScaleFactorBehavior();
ui->m_hiDpiRoundingPolicyBehavior->setCurrentIndex(HIDPI_OPTIONS.to_index(hidpi));
connect(ui->m_showNavigatorView, &QCheckBox::checkStateChanged, this, [ = ](Qt::CheckState state){
Settings::instance()->setShowNavigatorView(state == Qt::Checked);
});
connect(ui->m_useLightCheckerboard, &QCheckBox::checkStateChanged, this, [ = ](Qt::CheckState state){
Settings::instance()->setUseLightCheckerboard(state == Qt::Checked);
});
connect(ui->m_loopGallery, &QCheckBox::checkStateChanged, this, [ = ](Qt::CheckState state){
Settings::instance()->setLoopGallery(state == Qt::Checked);
});
connect(ui->m_svgTiny12Only, &QCheckBox::checkStateChanged, this, [ = ](Qt::CheckState state){
Settings::instance()->setSvgTiny12Only(state == Qt::Checked);
});
connect(ui->m_mouseWheelBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
Settings::instance()->setMouseWheelBehavior(MW_OPTIONS.to_value(index));
});
connect(ui->m_initWindowSizeBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
Settings::instance()->setInitWindowSizeBehavior(IWS_OPTIONS.to_value(index));
});
connect(ui->m_hiDpiRoundingPolicyBehavior, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [ = ](int index){
Settings::instance()->setHiDpiScaleFactorBehavior(HIDPI_OPTIONS.to_value(index));
});
// YYC MARK:
// Use adjustSize() to make sure all ComboBox are expanded by its items.
// Because items are added after inserting them into layout.
// It is inviable to call this function in ctor because this relys on Qt event system.
// It only can be done by QTimer::singleShot().
QTimer::singleShot(0, this, [this](){
this->adjustSize();
});
}
SettingsDialog::~SettingsDialog()
{
delete ui;
}
+27 -26
View File
@@ -1,26 +1,27 @@
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QObject>
#include <QWidget>
#include <QDialog>
class QCheckBox;
class QComboBox;
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit SettingsDialog(QWidget *parent = nullptr);
~SettingsDialog();
signals:
public slots:
private:
QCheckBox * m_stayOnTop = nullptr;
QComboBox * m_doubleClickBehavior = nullptr;
};
#endif // SETTINGSDIALOG_H
// SPDX-FileCopyrightText: 2022 Gary Wang <wzc782970009@gmail.com>
//
// SPDX-License-Identifier: MIT
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QDialog>
QT_BEGIN_NAMESPACE
namespace Ui {
class SettingsDialog;
}
QT_END_NAMESPACE
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit SettingsDialog(QWidget *parent = nullptr);
~SettingsDialog();
private:
QT_PREPEND_NAMESPACE(Ui::SettingsDialog) *ui;
};
#endif // SETTINGSDIALOG_H
+88
View File
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
<property name="windowTitle">
<string>Settings</string>
</property>
<layout class="QHBoxLayout" name="mainLayout">
<item>
<widget class="QTabWidget" name="settingsTabs">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="optionsTab">
<attribute name="title">
<string>Options</string>
</attribute>
<layout class="QFormLayout" name="settingsForm">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="m_showNavigatorView">
<property name="text">
<string>Show navigation view</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="m_useLightCheckerboard">
<property name="text">
<string>Use light-color checkerboard</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="m_loopGallery">
<property name="text">
<string>Loop the loaded gallery</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="m_svgTiny12Only">
<property name="text">
<string>Limit SVG support to SVG Tiny 1.2</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="m_mouseWheelBehaviorLabel">
<property name="text">
<string>Mouse wheel behavior</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="m_mouseWheelBehavior"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="m_initWindowSizeBehaviorLabel">
<property name="text">
<string>Default window size</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="m_initWindowSizeBehavior"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="m_hiDpiRoundingPolicyBehaviorLabel">
<property name="text">
<string>HiDPI scale factor rounding policy</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="m_hiDpiRoundingPolicyBehavior"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
-69
View File
@@ -1,69 +0,0 @@
environment:
CMAKE_INSTALL_ROOT: C:\projects\cmake
ZLIB_ROOT: C:\projects\zlib
matrix:
- build_name: mingw73_32_qt5_12_6
QTPATH: C:\Qt\5.12.6\mingw73_32
MINGW32: C:\Qt\Tools\mingw730_32
install:
- mkdir %CMAKE_INSTALL_ROOT%
- mkdir %ZLIB_ROOT%
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
- set PATH=%PATH%;%CMAKE_INSTALL_ROOT%;%QTPATH%\bin;%MINGW32%\bin
build_script:
# prepare
- mkdir 3rdparty
- cinst ninja
# install ECM so we can build KImageFormats
- cd 3rdparty
- git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git
- cd extra-cmake-modules
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT%
- cmake --build .
- cmake --build . --target install
- cd %APPVEYOR_BUILD_FOLDER%
# download and install zlib for KArchive
- cd %ZLIB_ROOT%
- curl -fsS -o zlib128-dll.zip http://zlib.net/zlib128-dll.zip
- 7z e zlib128-dll.zip
- cd %APPVEYOR_BUILD_FOLDER%
# install KArchive for kra format support of KImageFormats
- cd 3rdparty
- git clone -q https://invent.kde.org/frameworks/karchive.git
- cd karchive
- mkdir build
- cd build
- cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_ROOT% -DCMAKE_CXX_FLAGS_RELEASE="-s" -DCMAKE_MAKE_PROGRAM=mingw32-make -DZLIB_ROOT=%ZLIB_ROOT%
# -DCMAKE_PREFIX_PATH=%CMAKE_INSTALL_ROOT%
- cmake --build . --config Release
- cmake --build . --config Release --target install
- cd %APPVEYOR_BUILD_FOLDER%
# install KImageFormats
- cd 3rdparty
- git clone -q https://invent.kde.org/frameworks/kimageformats.git
- cd kimageformats
- mkdir build
- cd build
- cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-s" -DCMAKE_MAKE_PROGRAM=mingw32-make -DQT_PLUGIN_INSTALL_DIR=%QTPATH%\plugins
- cmake --build . --config Release
- cmake --build . --config Release --target install
- cd %APPVEYOR_BUILD_FOLDER%
# finally...
- mkdir build
- cd build
- cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_INSTALL_PREFIX='%cd%'
- mingw32-make
- mingw32-make install
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
- cd bin
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE .
- copy C:\projects\cmake\bin\libKF5Archive.dll .
- windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-angle --no-system-d3d-compiler --release .\ppic.exe
# for debug..
- tree /f
artifacts:
- path: build\bin
+26
View File
@@ -0,0 +1,26 @@
<center>
<p>
<img width='128' height='128' src=':/icons/app-icon.png'/>
<br/>
<!-- Application name -->
<span>%1</span>
<br/>
<!-- Version info -->
<span>%2</span>
</p>
<hr/>
<p>
<!-- Upstream author and fork author -->
<span>%3</span><span>:&nbsp;</span><a href='https://github.com/BLumia'>@BLumia</a>
<br/>
<span>%4</span><span>:&nbsp;</span><a href='https://github.com/yyc12345'>@yyc12345</a>
</p>
<hr/>
<p>
<!-- Built Qt version info -->
<span>%5</span>
<br/>
<!-- Source code -->
<span>%6</span><span>:&nbsp;</span><a href='https://github.com/SarasasChipWorkshop/sarasacw-picture'>GitHub</a>
</p>
</center>
+29
View File
@@ -0,0 +1,29 @@
<!-- General help -->
<h1 align='center'>%1</h1>
<ul>
<li>
<span>%2</span>
<ul>
<li>%3</li>
<li>%4</li>
</ul>
</li>
<li>%5</li>
<li>%6</li>
</ul>
<hr/>
<!-- Context menu option help -->
<h1 align='center'>%7</h1>
<!-- Context menu option list -->
<ul>
<li>
<b>%8</b><span>:</span>
<br/>
<span>%9</span>
</li>
<li>
<b>%10</b><span>:</span>
<br/>
<span>%11</span>
</li>
</ul>
+30
View File
@@ -0,0 +1,30 @@
<!-- License -->
<h1 align='center'><b>%1</b></h1>
<p>%2</p>
<hr/>
<!-- VErbatime license -->
<h1 align='center'><b>%3</b></h1>
<pre>
Expat/MIT License
Copyright &copy; 2026 BLumia
Copyright &copy; 2026 Sarasa's Chip Workshop
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
+33
View File
@@ -0,0 +1,33 @@
<!-- Contributor title -->
<h1 align='center'>%1</h1>
<!-- Contributor list -->
<a href='https://github.com/SarasasChipWorkshop/sarasacw-picture/graphs/contributors'>%2</a>
<!-- The message to thank these contributors -->
<p>%3</p>
<!-- Translator title -->
<h1 align='center'>%4</h1>
<!-- The message to thank these translators -->
<p>%5</p>
<ul>
<li><u>Arabic</u>: Tech-Tac</li>
<li><u>Catalan</u>: Toni Estévez</li>
<li><u>Chinese (Simplified)</u>: Percy Hong</li>
<li><u>Dutch</u>: Heimen Stoffels</li>
<li><u>French</u>: J. Lavoie, K. Herbert, Maxime Leroy</li>
<li><u>German</u>: K. Herbert, J. Lavoie, sal0max</li>
<li><u>Indonesian</u>: liimee, Reza Almanda</li>
<li><u>Italian</u>: albanobattistella</li>
<li><u>Japanese</u>: Black Cat, mmahhi, Percy Hong</li>
<li><u>Korean</u>: VenusGirl</li>
<li><u>Norwegian Bokmål</u>: Allan Nordhøy, ovl-1</li>
<li><u>Punjabi (Pakistan)</u>: bgo-eiu</li>
<li><u>Russian</u>: Sergey Shornikov, Artem, Andrey</li>
<li><u>Sinhala</u>: HelaBasa</li>
<li><u>Slovenian</u>: Andrej Poženel - SDT</li>
<li><u>Spanish</u>: Toni Estévez, Génesis Toxical, William(ѕ)ⁿ, gallegonovato</li>
<li><u>Tamil</u>: தமிழ்நேரம் (TamilNeram)</li>
<li><u>Turkish</u>: E-Akcaer, Oğuz Ersen, Sabri Ünal</li>
<li><u>Ukrainian</u>: Dan, volkov, Сергій</li>
<li><u>Vietnamese</u>: Loc Huynh</li>
</ul>
+15
View File
@@ -0,0 +1,15 @@
<!-- Title -->
<h1 align='center'><b>%1</b></h1>
<!-- List intro message -->
<p>%2</p>
<p>%3</p>
<ul>
<li>
<a href='https://www.qt.io/'>Qt</a><span>: </span>
<span>GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3</span>
</li>
<li style="display: none;">
<a href='https://www.exiv2.org/'>Exiv2</a><span>: </span>
<span>GPLv2</span>
</li>
</ul>
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+23
View File
@@ -0,0 +1,23 @@
<RCC>
<qresource prefix="/">
<!-- In-app icon resources -->
<file>icons/app-icon.png</file>
<file>icons/image-info.png</file>
<file>icons/fit-to-screen.png</file>
<file>icons/fit-to-size.png</file>
<file>icons/zoom-in.png</file>
<file>icons/zoom-out.png</file>
<file>icons/rotate-left.png</file>
<file>icons/rotate-right.png</file>
<file>icons/go-next.png</file>
<file>icons/go-previous.png</file>
<file>icons/flip-horizontal.png</file>
<file>icons/flip-vertical.png</file>
<!-- HTML resources -->
<file>htmls/help.html</file>
<file>htmls/about.html</file>
<file>htmls/special-thanks.html</file>
<file>htmls/license.html</file>
<file>htmls/third-party-libs.html</file>
</qresource>
</RCC>
-68
View File
@@ -1,68 +0,0 @@
#include "bottombuttongroup.h"
#include "opacityhelper.h"
#include <functional>
#include <QPushButton>
#include <QVBoxLayout>
#include <QDebug>
BottomButtonGroup::BottomButtonGroup(QWidget *parent)
: QGroupBox (parent)
, m_opacityHelper(new OpacityHelper(this))
{
QHBoxLayout * mainLayout = new QHBoxLayout(this);
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
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)"
"}"
"QPushButton {"
"background-color:rgba(225,255,255,0);"
"color: white;"
"border-style: none;"
"}");
auto newBtn = [](QString text, std::function<void()> func) -> QPushButton * {
QPushButton * btn = new QPushButton(QIcon(QStringLiteral(":/icons/") + text), "");
btn->setIconSize(QSize(40, 40));
btn->setFixedSize(40, 40);
connect(btn, &QAbstractButton::clicked, btn, func);
return btn;
};
addButton(newBtn("zoom-original", [this]() {
emit resetToOriginalBtnClicked();
}));
addButton(newBtn("view-fullscreen", [this]() {
emit toggleWindowMaximum();
}));
addButton(newBtn("zoom-in", [this]() {
emit zoomInBtnClicked();
}));
addButton(newBtn("zoom-out", [this]() {
emit zoomOutBtnClicked();
}));
addButton(newBtn("view-background-checkerboard", [this]() {
emit toggleCheckerboardBtnClicked();
}));
addButton(newBtn("object-rotate-right", [this]() {
emit rotateRightBtnClicked();
}));
}
void BottomButtonGroup::setOpacity(qreal opacity, bool animated)
{
m_opacityHelper->setOpacity(opacity, animated);
}
void BottomButtonGroup::addButton(QAbstractButton *button)
{
layout()->addWidget(button);
updateGeometry();
}
-29
View File
@@ -1,29 +0,0 @@
#ifndef BOTTOMBUTTONGROUP_H
#define BOTTOMBUTTONGROUP_H
#include <QAbstractButton>
#include <QGroupBox>
class OpacityHelper;
class BottomButtonGroup : public QGroupBox
{
Q_OBJECT
public:
explicit BottomButtonGroup(QWidget *parent = nullptr);
void setOpacity(qreal opacity, bool animated = true);
void addButton(QAbstractButton *button);
signals:
void resetToOriginalBtnClicked();
void toggleWindowMaximum();
void zoomInBtnClicked();
void zoomOutBtnClicked();
void toggleCheckerboardBtnClicked();
void rotateRightBtnClicked();
private:
OpacityHelper * m_opacityHelper;
};
#endif // BOTTOMBUTTONGROUP_H
+307
View File
@@ -0,0 +1,307 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="SarasasChipWorkshop.Picture" Publisher="CN=Sarasa's Chip Workshop, O=Sarasa's Chip Workshop, C=CN" Version="@PROJECT_VERSION@.0" />
<Properties>
<DisplayName>ms-resource:AppDisplayName</DisplayName>
<PublisherDisplayName>ms-resource:PublisherDisplayName</PublisherDisplayName>
<Logo>Assets\SarasasChipWorkshop.Picture.StoreLogo.png</Logo>
</Properties>
<Resources>
{% for lang in langs %}
<Resource Language="{{ lang }}" />
{% endfor %}
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.0" MaxVersionTested="10.0.26100.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="SarasasChipWorkshop.Picture" Executable="MyApp\scwpic.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
DisplayName="ms-resource:AppDisplayName"
Description="ms-resource:AppDescription"
BackgroundColor="transparent"
Square44x44Logo="Assets\SarasasChipWorkshop.Picture.Square44x44Logo.png"
Square150x150Logo="Assets\SarasasChipWorkshop.Picture.Square150x150Logo.png" />
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="jpegimages">
<uap:DisplayName>ms-resource:FileTypeJpegDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\jpg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.jfif</uap:FileType>
<uap:FileType>.jpeg</uap:FileType>
<uap:FileType>.jpg</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="gifimages">
<uap:DisplayName>ms-resource:FileTypeGifDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\gif.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.gif</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="pngimages">
<uap:DisplayName>ms-resource:FileTypePngDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\png.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.apng</uap:FileType>
<uap:FileType>.png</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="svgimages">
<uap:DisplayName>ms-resource:FileTypeSvgDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.svg</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="webpimages">
<uap:DisplayName>ms-resource:FileTypeWebpDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\png.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.webp</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="avifimages">
<uap:DisplayName>ms-resource:FileTypeAvifDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\png.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.avif</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="icoimages">
<uap:DisplayName>ms-resource:FileTypeIcoDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.ico</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="icnsimages">
<uap:DisplayName>ms-resource:FileTypeIcnsDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.icns</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="psdimages">
<uap:DisplayName>ms-resource:FileTypePsdDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.pdd</uap:FileType>
<uap:FileType>.psb</uap:FileType>
<uap:FileType>.psd</uap:FileType>
<uap:FileType>.psdt</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="kraimages">
<uap:DisplayName>ms-resource:FileTypeKraDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.kra</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="xcfimages">
<uap:DisplayName>ms-resource:FileTypeXcfDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.xcf</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="tgaimages">
<uap:DisplayName>ms-resource:FileTypeTgaDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.tga</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="tifimages">
<uap:DisplayName>ms-resource:FileTypeTifDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\jpg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.tif</uap:FileType>
<uap:FileType>.tiff</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="bmpimages">
<uap:DisplayName>ms-resource:FileTypeBmpDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.bmp</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="wbmpimages">
<uap:DisplayName>ms-resource:FileTypeWbmpDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.wbmp</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="ddsimages">
<uap:DisplayName>ms-resource:FileTypeDdsDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.dds</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="hdrimages">
<uap:DisplayName>ms-resource:FileTypeHdrDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\jpg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.exr</uap:FileType>
<uap:FileType>.hdr</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="iffimages">
<uap:DisplayName>ms-resource:FileTypeIffDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.iff</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="picimages">
<uap:DisplayName>ms-resource:FileTypePicDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.pic</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="pcximages">
<uap:DisplayName>ms-resource:FileTypePcxDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.pcx</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="qoiimages">
<uap:DisplayName>ms-resource:FileTypeQoiDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\png.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.qoi</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="rasimages">
<uap:DisplayName>ms-resource:FileTypeRasDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.ras</uap:FileType>
<uap:FileType>.sun</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="oraimages">
<uap:DisplayName>ms-resource:FileTypeOraDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\bmp.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.ora</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="aniimages">
<uap:DisplayName>ms-resource:FileTypeAniDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\gif.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.ani</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="pfmimages">
<uap:DisplayName>ms-resource:FileTypePfmDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\jpg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.pfm</uap:FileType>
<uap:FileType>.phm</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="rgbimages">
<uap:DisplayName>ms-resource:FileTypeRgbDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.bw</uap:FileType>
<uap:FileType>.rgb</uap:FileType>
<uap:FileType>.rgba</uap:FileType>
<uap:FileType>.sgi</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="pxrimages">
<uap:DisplayName>ms-resource:FileTypePxrDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.pxr</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="sctimages">
<uap:DisplayName>ms-resource:FileTypeSctDisplayName</uap:DisplayName>
<uap:Logo>Assets\FileAssoc\svg.png</uap:Logo>
<uap:SupportedFileTypes>
<uap:FileType>.sct</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
</Applications>
</Package>
+126
View File
@@ -0,0 +1,126 @@
version = 1
source_language = "en_US"
[strings.app_display_name]
msgid = "SCW Photo Viewer"
comment = "Display name of the application, referenced as ms-resource:AppDisplayName."
[strings.publisher_display_name]
msgid = "Sarasa's Chip Workshop"
comment = "Publisher display name, referenced as ms-resource:PublisherDisplayName."
[strings.app_description]
msgid = "Yet another legacy Windows Photo Viewer with cross-platform support."
comment = "Application description, referenced as ms-resource:AppDescription."
[strings.file_type_jpeg]
msgid = "JPEG Image"
comment = "Display name of the JPEG file type association (jpg, jpeg, jfif), referenced as ms-resource:FileTypeJpegDisplayName."
[strings.file_type_gif]
msgid = "GIF Animation Image"
comment = "Display name of the GIF file type association, referenced as ms-resource:FileTypeGifDisplayName."
[strings.file_type_png]
msgid = "PNG Image"
comment = "Display name of the PNG file type association (png, apng), referenced as ms-resource:FileTypePngDisplayName."
[strings.file_type_svg]
msgid = "Scalable Vector Graphics"
comment = "Display name of the SVG file type association, referenced as ms-resource:FileTypeSvgDisplayName."
[strings.file_type_webp]
msgid = "WebP Image"
comment = "Display name of the WebP file type association, referenced as ms-resource:FileTypeWebpDisplayName."
[strings.file_type_avif]
msgid = "AV1 Image File"
comment = "Display name of the AVIF file type association, referenced as ms-resource:FileTypeAvifDisplayName."
[strings.file_type_ico]
msgid = "Windows Icon Image"
comment = "Display name of the ICO file type association, referenced as ms-resource:FileTypeIcoDisplayName."
[strings.file_type_icns]
msgid = "Apple Icon Image"
comment = "Display name of the ICNS file type association, referenced as ms-resource:FileTypeIcnsDisplayName."
[strings.file_type_psd]
msgid = "Photoshop Document"
comment = "Display name of the Photoshop file type association (psd, psb, pdd, psdt), referenced as ms-resource:FileTypePsdDisplayName."
[strings.file_type_kra]
msgid = "Krita Document"
comment = "Display name of the Krita file type association, referenced as ms-resource:FileTypeKraDisplayName."
[strings.file_type_xcf]
msgid = "GIMP Document"
comment = "Display name of the GIMP file type association, referenced as ms-resource:FileTypeXcfDisplayName."
[strings.file_type_tga]
msgid = "TARGA Image"
comment = "Display name of the TARGA file type association, referenced as ms-resource:FileTypeTgaDisplayName."
[strings.file_type_tif]
msgid = "Tagged Image File Format"
comment = "Display name of the TIFF file type association (tif, tiff), referenced as ms-resource:FileTypeTifDisplayName."
[strings.file_type_bmp]
msgid = "Bitmap"
comment = "Display name of the BMP file type association, referenced as ms-resource:FileTypeBmpDisplayName."
[strings.file_type_wbmp]
msgid = "Wireless Bitmap"
comment = "Display name of the WBMP file type association, referenced as ms-resource:FileTypeWbmpDisplayName."
[strings.file_type_dds]
msgid = "DirectDraw Surface"
comment = "Display name of the DDS file type association, referenced as ms-resource:FileTypeDdsDisplayName."
[strings.file_type_hdr]
msgid = "High Dynamic Range Image"
comment = "Display name of the HDR file type association (hdr, exr), referenced as ms-resource:FileTypeHdrDisplayName."
[strings.file_type_iff]
msgid = "Interchange File Format"
comment = "Display name of the IFF file type association, referenced as ms-resource:FileTypeIffDisplayName."
[strings.file_type_pic]
msgid = "Softimage Picture"
comment = "Display name of the Softimage PIC file type association, referenced as ms-resource:FileTypePicDisplayName."
[strings.file_type_pcx]
msgid = "PiCture eXchange PC Paintbrush Image"
comment = "Display name of the PCX file type association, referenced as ms-resource:FileTypePcxDisplayName."
[strings.file_type_qoi]
msgid = "Quite OK Image"
comment = "Display name of the QOI file type association, referenced as ms-resource:FileTypeQoiDisplayName."
[strings.file_type_ras]
msgid = "Sun Raster Image"
comment = "Display name of the Sun Raster file type association (ras, sun), referenced as ms-resource:FileTypeRasDisplayName."
[strings.file_type_ora]
msgid = "OpenRaster Image"
comment = "Display name of the OpenRaster file type association, referenced as ms-resource:FileTypeOraDisplayName."
[strings.file_type_ani]
msgid = "Animated Cursor"
comment = "Display name of the ANI file type association, referenced as ms-resource:FileTypeAniDisplayName."
[strings.file_type_pfm]
msgid = "Portable Float Map"
comment = "Display name of the Portable Float Map file type association (pfm, phm), referenced as ms-resource:FileTypePfmDisplayName."
[strings.file_type_rgb]
msgid = "Silicon Graphics Image"
comment = "Display name of the Silicon Graphics file type association (rgb, rgba, bw, sgi), referenced as ms-resource:FileTypeRgbDisplayName."
[strings.file_type_pxr]
msgid = "Pixar Raster Image"
comment = "Display name of the Pixar file type association, referenced as ms-resource:FileTypePxrDisplayName."
[strings.file_type_sct]
msgid = "Scitex Continuous Tone"
comment = "Display name of the Scitex CT file type association, referenced as ms-resource:FileTypeSctDisplayName."
+129
View File
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>{{ default.strings.app_name | xml_escape }}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>MIT/Expat License - Copyright (C) 2026 Sarasa's Chip Workshop</string>
<!--
CFBundleLocalizations is generated from the metadata localization languages (the metaglot
"langs" list), while this field by definition describes the application's language
availability. This deviation works around an upstream Qt bug: since the Qt 6.7.0 refactor,
the CMake function _qt_internal_store_languages_from_ts_files_in_targets loses the parsed
TS language codes (a missing list(APPEND)), so Qt's own CFBundleLocalizations generation
yields an empty list. Consistency between the metadata languages and the application
languages is maintained manually at release time.
TODO: drop this workaround and let Qt generate CFBundleLocalizations itself once the
upstream bug is fixed and the fix ships in the CI toolchain.
-->
<key>CFBundleLocalizations</key>
<array>
{% for lang in langs %}
<string>{{ lang }}</string>
{% endfor %}
</array>
<key>CFBundleDocumentTypes</key>
<array>
<!-- JPEG -->
<dict>
<key>CFBundleTypeName</key>
<string>JPEG Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>jpg</string>
<string>jpeg</string>
<string>jfif</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/jpeg</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<!-- PNG -->
<dict>
<key>CFBundleTypeName</key>
<string>PNG Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>png</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/png</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<!-- WebP -->
<dict>
<key>CFBundleTypeName</key>
<string>WebP Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>webp</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/webp</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<!-- GIF -->
<dict>
<key>CFBundleTypeName</key>
<string>GIF Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>gif</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/gif</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<!-- SVG -->
<dict>
<key>CFBundleTypeName</key>
<string>SVG Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>svg</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/svg+xml</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
</dict>
</plist>
+26
View File
@@ -0,0 +1,26 @@
version = 1
source_language = "en"
[strings.app_name]
msgid = "SCW Photo Viewer"
comment = "Display name of the application."
[strings.file_type_jpeg]
msgid = "JPEG Image"
comment = "Name of the JPEG document type (jpg, jpeg, jfif)."
[strings.file_type_png]
msgid = "PNG Image"
comment = "Name of the PNG document type."
[strings.file_type_webp]
msgid = "WebP Image"
comment = "Name of the WebP document type."
[strings.file_type_gif]
msgid = "GIF Image"
comment = "Name of the GIF document type."
[strings.file_type_svg]
msgid = "SVG Image"
comment = "Name of the SVG document type."
+8
View File
@@ -0,0 +1,8 @@
/* Application display name. The key is the Info.plist key name. */
"CFBundleName" = "{{ strings.app_name | plist_strings_escape }}";
/* File type names. The key is the source text, covering CFBundleTypeName. */
"{{ sources.file_type_jpeg | plist_strings_escape }}" = "{{ strings.file_type_jpeg | plist_strings_escape }}";
"{{ sources.file_type_png | plist_strings_escape }}" = "{{ strings.file_type_png | plist_strings_escape }}";
"{{ sources.file_type_webp | plist_strings_escape }}" = "{{ strings.file_type_webp | plist_strings_escape }}";
"{{ sources.file_type_gif | plist_strings_escape }}" = "{{ strings.file_type_gif | plist_strings_escape }}";
"{{ sources.file_type_svg | plist_strings_escape }}" = "{{ strings.file_type_svg | plist_strings_escape }}";
+33
View File
@@ -0,0 +1,33 @@
{
"AppDisplayName": "{{ strings.app_display_name | json_escape }}",
"PublisherDisplayName": "{{ strings.publisher_display_name | json_escape }}",
"AppDescription": "{{ strings.app_description | json_escape }}",
"FileTypeJpegDisplayName": "{{ strings.file_type_jpeg | json_escape }}",
"FileTypeGifDisplayName": "{{ strings.file_type_gif | json_escape }}",
"FileTypePngDisplayName": "{{ strings.file_type_png | json_escape }}",
"FileTypeSvgDisplayName": "{{ strings.file_type_svg | json_escape }}",
"FileTypeWebpDisplayName": "{{ strings.file_type_webp | json_escape }}",
"FileTypeAvifDisplayName": "{{ strings.file_type_avif | json_escape }}",
"FileTypeIcoDisplayName": "{{ strings.file_type_ico | json_escape }}",
"FileTypeIcnsDisplayName": "{{ strings.file_type_icns | json_escape }}",
"FileTypePsdDisplayName": "{{ strings.file_type_psd | json_escape }}",
"FileTypeKraDisplayName": "{{ strings.file_type_kra | json_escape }}",
"FileTypeXcfDisplayName": "{{ strings.file_type_xcf | json_escape }}",
"FileTypeTgaDisplayName": "{{ strings.file_type_tga | json_escape }}",
"FileTypeTifDisplayName": "{{ strings.file_type_tif | json_escape }}",
"FileTypeBmpDisplayName": "{{ strings.file_type_bmp | json_escape }}",
"FileTypeWbmpDisplayName": "{{ strings.file_type_wbmp | json_escape }}",
"FileTypeDdsDisplayName": "{{ strings.file_type_dds | json_escape }}",
"FileTypeHdrDisplayName": "{{ strings.file_type_hdr | json_escape }}",
"FileTypeIffDisplayName": "{{ strings.file_type_iff | json_escape }}",
"FileTypePicDisplayName": "{{ strings.file_type_pic | json_escape }}",
"FileTypePcxDisplayName": "{{ strings.file_type_pcx | json_escape }}",
"FileTypeQoiDisplayName": "{{ strings.file_type_qoi | json_escape }}",
"FileTypeRasDisplayName": "{{ strings.file_type_ras | json_escape }}",
"FileTypeOraDisplayName": "{{ strings.file_type_ora | json_escape }}",
"FileTypeAniDisplayName": "{{ strings.file_type_ani | json_escape }}",
"FileTypePfmDisplayName": "{{ strings.file_type_pfm | json_escape }}",
"FileTypeRgbDisplayName": "{{ strings.file_type_rgb | json_escape }}",
"FileTypePxrDisplayName": "{{ strings.file_type_pxr | json_escape }}",
"FileTypeSctDisplayName": "{{ strings.file_type_sct | json_escape }}"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.
+18
View File
@@ -0,0 +1,18 @@
[Desktop Entry]
Type=Application
Name={{ default.strings.name | desktop_escape }}
GenericName={{ default.strings.generic_name | desktop_escape }}
Comment={{ default.strings.comment | desktop_escape }}
Exec=scwpic %F
Icon=org.sarasaschipworkshop.picture
Terminal=false
StartupNotify=false
Categories=Graphics;
MimeType=image/bmp;image/bmp24;image/jpg;image/jpe;image/jpeg;image/jpeg24;image/jng;image/pcd;image/pcx;image/png;image/tif;image/tiff;image/tiff24;image/dds;image/gif;image/sgi;image/j2k;image/jp2;image/pct;image/wdp;image/arw;image/icb;image/dng;image/vda;image/vst;image/svg;image/ptif;image/mef;image/xbm;image/svg+xml;
Keywords={{ default.strings.keywords | desktop_escape }}
{% for lang in languages %}
Name[{{ lang.locale }}]={{ lang.strings.name | desktop_escape }}
GenericName[{{ lang.locale }}]={{ lang.strings.generic_name | desktop_escape }}
Comment[{{ lang.locale }}]={{ lang.strings.comment | desktop_escape }}
Keywords[{{ lang.locale }}]={{ lang.strings.keywords | desktop_escape }}
{% endfor %}
+18
View File
@@ -0,0 +1,18 @@
version = 1
source_language = "en"
[strings.name]
msgid = "SCW Photo Viewer"
comment = "Display name of the application."
[strings.generic_name]
msgid = "Image Viewer"
comment = "Generic name describing the application category."
[strings.comment]
msgid = "SCW Photo Viewer is a lightweight image viewer"
comment = "Tooltip-like description of the application."
[strings.keywords]
msgid = "Picture;Image;Viewer;Jpg;Jpeg;Png;"
comment = "Search keywords. Semicolon separated list; the trailing semicolon is required."
+361
View File
@@ -0,0 +1,361 @@
<?xml version="1.0" encoding="utf-8"?>
<component type="desktop-application">
<id>org.sarasaschipworkshop.picture</id>
<name>{{ default.strings.name | xml_escape }}</name>
{% for lang in languages %}
<name xml:lang="{{ lang.lang }}">{{ lang.strings.name | xml_escape }}</name>
{% endfor %}
<summary>{{ default.strings.summary | xml_escape }}</summary>
{% for lang in languages %}
<summary xml:lang="{{ lang.lang }}">{{ lang.strings.summary | xml_escape }}</summary>
{% endfor %}
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<description>
<p>{{ default.strings.description | xml_escape }}</p>
{% for lang in languages %}
<p xml:lang="{{ lang.lang }}">{{ lang.strings.description | xml_escape }}</p>
{% endfor %}
</description>
<developer id="org.sarasaschipworkshop">
<name>{{ default.strings.developer_name | xml_escape }}</name>
{% for lang in languages %}
<name xml:lang="{{ lang.lang }}">{{ lang.strings.developer_name | xml_escape }}</name>
{% endfor %}
</developer>
<launchable type="desktop-id">org.sarasaschipworkshop.picture.desktop</launchable>
<url type="homepage">https://github.com/SarasasChipWorkshop/sarasacw-picture</url>
<url type="bugtracker">https://github.com/SarasasChipWorkshop/sarasacw-picture/issues</url>
<url type="translate">https://github.com/SarasasChipWorkshop/sarasacw-picture</url>
<url type="vcs-browser">https://github.com/SarasasChipWorkshop/sarasacw-picture</url>
<provides>
<binary>scwpic</binary>
</provides>
<!-- TODO: Add new screenshots for SCW Photo Viewer here, in an AppStream <screenshots> section, once screenshots are available. -->
<releases>
<release type="stable" version="1.6.0" date="2026-08-22T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Allow dragging window from titlebar to move window when maximized</li>
<li>Add an option to show/hide bird-eye view</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Maximize the window when the image size matches the screen size</li>
<li>Fix window might stuck when drag move on some ill-formed window manager</li>
<li>Make titlebar respect RTL layout</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Update translations</li>
<li>Update Qt version to 6.11.2 for Windows and macOS pre-built binaries</li>
</ul>
<p>With contributions from:</p>
<p>Tech-Tac, Heimen Stoffels (vistaus), VenusGirl, Oğuz Ersen</p>
</description>
</release>
<release type="stable" version="1.5.0" date="2026-07-04T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Introduced an optional titlebar that display file name and allows drag and double-click to move and toggle maximize state</li>
<li>Windows: Now the application will use the system's built-in animation for open window animation</li>
</ul>
<p>This release fixes the following bug:</p>
<ul>
<li>Show empty url list should also reset window title to blank</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Update translations</li>
<li>Add vcs-browser link to AppStream metadata</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels (vistaus), VenusGirl (VenusGirl)</p>
</description>
</release>
<release type="stable" version="1.4.1" date="2026-04-05T00:00:00Z">
<description>
<p>This release includes the following changes:</p>
<ul>
<li>Update translations</li>
<li>Update Qt version to 6.10.3 for Windows and macOS pre-built binaries</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels (vistaus), Loc Huynh (hthienloc)</p>
</description>
</release>
<release type="stable" version="1.4.0" date="2026-02-11T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Action to save image as new file with different format</li>
<li>Add Vietnamese and Slovenian translation</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Update copyright year to 2026</li>
<li>Update translations</li>
<li>Update Qt version to 6.10.2 for Windows and macOS pre-built binaries</li>
</ul>
<p>With contributions from:</p>
<p>Loc Huynh, Sabri Ünal, VenusGirl, Andrej Poženel, Andrey</p>
</description>
</release>
<release type="stable" version="1.3.0" date="2025-12-20T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>New option to limit SVG support to SVG Tiny 1.2 standard</li>
<li>Windows: ship tools and configurations that help user associate image files to this program</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Fix window not appear at the screen that the mouse cursor is at</li>
<li>Fix Windows prebuilt binary having AVIF plugin included but not actually support it</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>CPack DEB: will now recommend "kimageformat6-plugins" instead of the KF5 version</li>
<li>Update translations</li>
<li>Update exiv2 version for Windows binary build</li>
</ul>
<p>With contributions from:</p>
<p>VenusGirl, Andrey</p>
</description>
</release>
<release type="stable" version="1.2.1" date="2025-11-22T00:00:00Z">
<description>
<p>This release fixes the following bug:</p>
<ul>
<li>Fix incorrect color when display some CMYK images.</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Now use Qt 6.10.1 for pre-built binary</li>
<li>Update README description and AppStream metainfo</li>
<li>Update translations</li>
<li>Update libavif, AOM and expat version for Windows binary build</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella</p>
</description>
</release>
<release type="stable" version="1.2.0" date="2025-09-21T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Long image mode that detect extra wide image and auto fit by its thin side</li>
<li>Windows: Add product version to binary metadata / resource file</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Update translations</li>
<li>Update libavif version for Windows binary build</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels, albanobattistella, Sabri Ünal</p>
</description>
</release>
<release type="stable" version="1.1.1" date="2025-08-02T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>Click dock icon should show window when it's hidden on macOS</li>
</ul>
<p>This release fixes the following bug:</p>
<ul>
<li>Ensure "Fit by Width" position the view to the beginning of the image</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Update translations</li>
<li>Update Exiv2 version for Windows binary build</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels, VenusGirl, தமிழ்நேரம்</p>
</description>
</release>
<release type="stable" version="1.1.0" date="2025-07-06T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>New option to disable built-in close window animation</li>
<li>New option to disable gallery looping</li>
<li>Support load m3u8 as image gallery playlist</li>
</ul>
<p>This release includes the following change:</p>
<ul>
<li>Drop Qt 5 support</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels, albanobattistella, தமிழ்நேரம்</p>
</description>
</release>
<release type="stable" version="1.0.0" date="2025-05-03T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Support enforces windowed mode on start-up</li>
<li>Reload image automatically when current image gets updated</li>
</ul>
<p>This release fixes the following bug:</p>
<ul>
<li>Display correct text language on macOS</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Use native text for shortcut editor's label</li>
<li>Display native commandline message when possible</li>
<li>Merge Qt translations into app applications as well</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels, albanobattistella, mmahhi</p>
</description>
</release>
<release type="stable" version="0.9.2" date="2025-03-05T00:00:00Z">
<description>
<p>This release fixes the following bug:</p>
<ul>
<li>Refer to the right exiv2 CMake module so it can be found on Linux</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Convert DEP5 to REUSE.toml for better REUSE compliance</li>
<li>Update translations</li>
</ul>
<p>With contributions from:</p>
<p>Pino Toscano, TamilNeram</p>
</description>
</release>
<release type="stable" version="0.9.1" date="2025-01-25T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Option to double-click to fullscreen</li>
<li>Build-time option to embed translation resources</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Fix window size not adjusted when open file on macOS</li>
<li>Should center window according to available screen geometry</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Change close window bahavior on macOS</li>
<li>Update translations</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella, Sabri Ünal</p>
</description>
</release>
<release type="stable" version="0.9.0" date="2024-12-08T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>Support custom shortcuts for existing actions</li>
<li>Actions for frame-by-frame animated image playback support</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>Initial macOS bundle support</li>
<li>bump minimum required CMake version to 3.16</li>
<li>Update translations</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella, VenusGirl, gallegonovato, Sabri Ünal</p>
</description>
</release>
<release type="stable" version="0.8.2.1" date="2024-10-27T00:00:00Z">
<description>
<p>This release fixes the following bug:</p>
<ul>
<li>Cannot load translations caused by a change in 0.8.2</li>
</ul>
</description>
</release>
<release type="stable" version="0.8.2" date="2024-10-26T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>New option to allow use light-color checkerboard by default</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella, mmahhi, gallegonovato</p>
</description>
</release>
<release type="stable" version="0.8.1" date="2024-08-25T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>New command line option to list all supported formats</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella, mmahhi, ovl-1, gallegonovato, Oğuz Ersen</p>
</description>
</release>
<release type="stable" version="0.8.0" date="2024-06-29T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>Support move image file to trash</li>
</ul>
<p>With contributions from:</p>
<p>albanobattistella, mmahhi, gallegonovato, Oğuz Ersen</p>
</description>
</release>
<release type="stable" version="0.7.4" date="2024-04-04T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>Add some icons for corresponding menu actions</li>
</ul>
<p>With contributions from:</p>
<p>Reza Almanda, mmahhi, Oğuz Ersen, volkov, Сергій</p>
</description>
</release>
<release type="stable" version="0.7.3" date="2023-10-24T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>Add "Keep transformation" to menu</li>
</ul>
<p>With contributions from:</p>
<p>mmahhi, VenusGirl, albanobattistella, gallegonovato, Heimen Stoffels</p>
</description>
</release>
<release type="stable" version="0.7.2" date="2023-08-27T00:00:00Z">
<description>
<p>This release adds the following feature:</p>
<ul>
<li>Add an option in setting dialog to tweak the High-DPI scaling rounding policy (might only works in Qt 6 build)</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Remove image size limit for Qt 6 build</li>
<li>Fix application icon install location under Linux</li>
</ul>
<p>With contributions from:</p>
<p>Heimen Stoffels, Andrey, Dan, gallegonovato, albanobattistella, Sabri Ünal</p>
</description>
</release>
<release type="stable" version="0.7.1" date="2023-07-08T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>TIF and TIFF format files in the same folder will now be automatically added to the gallery</li>
<li>Built-in window resizing now also supports Linux desktop. (macOS might also works as well)</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Settings dialog will automatedly use a suitable size instead of a hard-coded one</li>
<li>Fix default configuration file location under Linux. (was `~/.config/config.ini`, now it's `~/.config/Pineapple Pictures/config.ini`)</li>
</ul>
<p>With contributions from:</p>
<p>yyc12345</p>
</description>
</release>
</releases>
<content_rating type="oars-1.1"/>
</component>
+18
View File
@@ -0,0 +1,18 @@
version = 1
source_language = "en"
[strings.name]
msgid = "SCW Photo Viewer"
comment = "Display name of the application."
[strings.summary]
msgid = "Image Viewer"
comment = "One-line summary shown in software centers."
[strings.description]
msgid = "SCW Photo Viewer is a lightweight and easy-to-use image viewer that comes with a handy navigation thumbnail when zoom-in, and doesn't contain any image management support."
comment = "Description paragraph shown in the details page."
[strings.developer_name]
msgid = "Sarasa's Chip Workshop"
comment = "Name of the application developers."
+73
View File
@@ -0,0 +1,73 @@
// Generated by MetaGlot. DO NOT EDIT.
// Sources: dist/sarasacw-picture.rc.in.toml, locales/winrc/*.po (CMake placeholders are substituted later).
#pragma code_page(65001)
// ---------------------------------------------------------------------------
// Icon resources (referenced from the registry as "<exe path>,-<id>")
// ---------------------------------------------------------------------------
101 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/app.ico" // app
102 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/bmp.ico" // bmp
103 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/gif.ico" // gif
104 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/jpg.ico" // jpg
105 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/png.ico" // png
106 ICON "@CMAKE_CURRENT_SOURCE_DIR@/dist/winrc-icos/svg.ico" // svg
// ---------------------------------------------------------------------------
// String tables (file type descriptions, referenced as "@<exe path>,-<id>")
// ---------------------------------------------------------------------------
{% for lang in languages -%}
// {{ lang.name }}
LANGUAGE {{ lang.primary }}, {{ lang.sublanguage }}
STRINGTABLE
BEGIN
{%- for i in (1000..1028) -%}
{% assign key = i | to_string %}
{{ i }} "{{ lang.strings[key] | rc_escape }}"
{%- endfor %}
END
{% endfor -%}
// ---------------------------------------------------------------------------
// Version information (one VERSIONINFO resource per language; Windows picks by resource language)
// ---------------------------------------------------------------------------
{% for lang in languages -%}
LANGUAGE {{ lang.primary }}, {{ lang.sublanguage }}
1 VERSIONINFO
FILEVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
PRODUCTVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L // VOS_NT_WINDOWS32
FILETYPE 0x1L // VFT_APP
FILESUBTYPE 0x0L // VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "{{ lang.block_key }}"
BEGIN
VALUE "Comments", "https://github.com/SarasasChipWorkshop/sarasacw-picture"
VALUE "CompanyName", "Sarasa's Chip Workshop"
VALUE "FileDescription", "{{ lang.strings.file_description | rc_escape }}"
VALUE "FileVersion", "@PROJECT_VERSION@"
VALUE "InternalName", "scwpic"
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2026 Sarasa's Chip Workshop"
VALUE "OriginalFilename", "scwpic.exe"
VALUE "ProductName", "{{ lang.strings.product_name | rc_escape }}"
VALUE "ProductVersion", "@PROJECT_VERSION@"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", {{ lang.langid }}, {{ lang.code_page }}
END
END
{% endfor -%}
+127
View File
@@ -0,0 +1,127 @@
version = 1
source_language = "en"
[strings.1000]
msgid = "SCW Photo Viewer"
context = "Explorer"
comment = "Application friendly name shown by Explorer, e.g. in the 'Open with' menu."
[strings.1001]
msgid = "JPEG Image"
comment = "File type name for: jpg, jpeg, jfif"
[strings.1002]
msgid = "GIF Animation Image"
comment = "File type name for: gif"
[strings.1003]
msgid = "PNG Image"
comment = "File type name for: png"
[strings.1004]
msgid = "Scalable Vector Graphics"
comment = "File type name for: svg"
[strings.1005]
msgid = "WebP Image"
comment = "File type name for: webp"
[strings.1006]
msgid = "AV1 Image File"
comment = "File type name for: avif"
[strings.1007]
msgid = "Windows Icon Image"
comment = "File type name for: ico"
[strings.1008]
msgid = "Apple Icon Image"
comment = "File type name for: icns"
[strings.1009]
msgid = "Photoshop Document"
comment = "File type name for: psd, psb, pdd, psdt"
[strings.1010]
msgid = "Krita Document"
comment = "File type name for: kra"
[strings.1011]
msgid = "GIMP Document"
comment = "File type name for: xcf"
[strings.1012]
msgid = "TARGA Image"
comment = "File type name for: tga"
[strings.1013]
msgid = "Tagged Image File Format"
comment = "File type name for: tif, tiff"
[strings.1014]
msgid = "Bitmap"
comment = "File type name for: bmp"
[strings.1015]
msgid = "Wireless Bitmap"
comment = "File type name for: wbmp"
[strings.1016]
msgid = "DirectDraw Surface"
comment = "File type name for: dds"
[strings.1017]
msgid = "High Dynamic Range Image"
comment = "File type name for: hdr"
[strings.1018]
msgid = "Interchange File Format"
comment = "File type name for: iff"
[strings.1019]
msgid = "Softimage Picture"
comment = "File type name for: pic"
[strings.1020]
msgid = "PiCture eXchange PC Paintbrush Image"
comment = "File type name for: pcx"
[strings.1021]
msgid = "Quite OK Image"
comment = "File type name for: qoi"
[strings.1022]
msgid = "Sun Raster Image"
comment = "File type name for: ras, sun"
[strings.1023]
msgid = "OpenRaster Image"
comment = "File type name for: ora"
[strings.1024]
msgid = "Animated Cursor"
comment = "File type name for: ani"
[strings.1025]
msgid = "Portable Float Map"
comment = "File type name for: pfm, phm"
[strings.1026]
msgid = "Silicon Graphics Image"
comment = "File type name for: rgb, rgba, bw, sgi"
[strings.1027]
msgid = "Pixar Raster Image"
comment = "File type name for: pxr"
[strings.1028]
msgid = "Scitex Continuous Tone"
comment = "File type name for: sct"
[strings.file_description]
msgid = "Yet another legacy Windows Photo Viewer with cross-platform support."
comment = "File description of the executable."
[strings.product_name]
msgid = "SCW Photo Viewer"
comment = "Display name of the product."
+4
View File
@@ -0,0 +1,4 @@
[CustomMessages]
MyAppName={{ strings.MyAppName | inno_escape }}
MyOther={{ strings.MyOther | inno_escape }}
MyAssociateWithFiles={{ strings.MyAssociateWithFiles | inno_escape }}
+394
View File
@@ -0,0 +1,394 @@
; Inno Setup script for the Windows installer of SCW Photo Viewer.
;
; ISCC.exe /DPublishDir=<publish-dir> /DOutputDir=<dist-dir> path\to\this.iss
;
#ifndef PublishDir
#error PublishDir must be specified when running this script. It specifies the directory from which Inno Setup retrieves the artifacts to be packaged.
#endif
#ifndef OutputDir
#error OutputDir must be specified when running this script. It specifies the directory in which Inno Setup writes the generated setup package.
#endif
#define MyAppName "SCW Photo Viewer"
#define MyAppVersion "@PROJECT_VERSION@"
#define MyAppPublisher "Sarasa's Chip Workshop"
#define MyAppURL "https://github.com/SarasasChipWorkshop/sarasacw-picture"
#define MyAppExeName "scwpic.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
{% comment %}
The escaped double opening brace in the AppId value below is wrapped in a Liquid raw block,
because it would otherwise open a Liquid output tag.
{% endcomment %}
AppId={% raw %}{{A90F12B1-1BD5-4816-994B-A3E95CCFF24E}{% endraw %}
AppName={cm:MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
; Explicit literals (via preprocessor defines): the Setup.exe version info resource
; must not fall back to AppName, because AppName carries an Inno constant and the
; fallback yields an empty string in that case.
VersionInfoDescription={#MyAppName} Setup
VersionInfoProductName={#MyAppName}
DefaultDirName={autopf}\sarasacw-picture
UninstallDisplayIcon={app}\{#MyAppExeName}
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible
ChangesAssociations=yes
DefaultGroupName={cm:MyAppName}
AllowNoIcons=yes
LicenseFile={#PublishDir}\LICENSE
; Uncomment the following line to run in non administrative install mode (install for current user only).
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir={#OutputDir}
OutputBaseFilename=scwpic-setup
SolidCompression=yes
WizardStyle=modern
[Languages]
{% comment %}
YYC MARK:
The base messages file pairing (the official full translation that provides
the language identity) is derived from MetaGlot's best-effort conversion of
the PO language tag to the conventional Inno Setup language name (lang.lang)
and its officiality (lang.is_official). A language without an official base
file - a community provided conventional name, or a language unknown to
MetaGlot which converts to nothing - is dropped instead of falling back:
every [Languages] entry inherits the language identity of its base file, and
"compiler:Default.isl" carries the English identity, so a fallback entry
would flood the setup language selection dialog with duplicate English
items. To keep such a language, ship its base messages file with the
installer and pair it explicitly (e.g. via a "case" on "lang.name"). The
incremental custom messages file is named after the conventional name; keep
it in sync with the "--isl-path" argument in CMakeLists.txt. The path
rendering loop is independent of the dropping decision, so a dropped
language still gets an (unreferenced) messages file written.
{% endcomment -%}
{% for lang in langs -%}
{%- if lang.is_official -%}
{%- if lang.lang == 'Default' -%}
{% assign base = 'compiler:Default.isl' -%}
{%- else -%}
{% assign base = 'compiler:Languages\' | append: lang.lang | append: '.isl' -%}
{%- endif -%}
Name: "{{ lang.name }}"; MessagesFile: "{{ base }},Strings\{{ lang.lang }}.isl"
{% else -%}
{%- comment -%}
unofficial or unmapped: dropped, since a Default.isl fallback would duplicate the English identity in the Select Language dialog
{%- endcomment -%}
{% endif -%}
{% endfor -%}
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "associatewithfiles"; Description: "{cm:MyAssociateWithFiles,{#MyAppName}}"; GroupDescription: "{cm:MyOther}"
[Files]
; YYC MARK:
; This script is compiled in place and retrieves the artifacts to be packaged
; from the directory given by the "PublishDir" define, which must contain
; "scwpic.exe" and the "LICENSE" file. Otherwise exception will be thrown.
Source: "{#PublishDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#PublishDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Registry]
; Registration scheme follows the app-registration model (App Paths + Applications
; keys plus per-family ProgIds), with all display names and icons referenced as
; indirect strings into scwpic.exe itself (string table 1000-1028, icons 101-105),
; so the registry values stay language-neutral and Explorer resolves them per
; user UI language. Adding a new file family: copy a family block below, adjust
; the ProgId, string ID, icon ID and extension list, then add the extensions to
; SupportedTypes. String/icon IDs must exist in the Windows RC resources
; (dist/sarasacw-picture.rc.in.toml and dist/winrc-icos).
; --- Application registration (always installed) ---
; App Paths: lets the shell resolve "scwpic.exe" by name and locates its DLL directory.
Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\scwpic.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\scwpic.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
; Applications: makes scwpic.exe itself appear in the "Open with" lists.
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe"; ValueType: string; ValueName: "FriendlyAppName"; ValueData: "@{app}\scwpic.exe,-1000"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe"; ValueType: string; ValueName: "NoOpenWith"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-101"
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
; SupportedTypes: declares the supported types to filter the "Open with" dialog.
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".ani"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".apng"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".avif"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".bmp"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".bw"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".dds"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".exr"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".gif"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".hdr"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".icns"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".ico"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".iff"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".jfif"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".jpeg"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".jpg"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".kra"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".ora"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".pdd"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".pcx"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".pfm"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".phm"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".pic"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".png"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".psb"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".psd"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".psdt"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".pxr"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".qoi"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".ras"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".rgb"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".rgba"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".sct"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".sgi"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".sun"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".svg"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".tga"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".tif"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".tiff"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".wbmp"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".webp"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\Applications\scwpic.exe\SupportedTypes"; ValueType: string; ValueName: ".xcf"; ValueData: ""
; --- File type ProgId declarations (always installed) ---
; Per family: one ProgId shared by its extensions, always registered. Default
; value and FriendlyTypeName both carry the indirect string; DefaultIcon
; references the embedded icon by resource ID (101 app, 102 bmp, 103 gif,
; 104 jpg, 105 png, 106 svg). Only the OpenWithProgids line(s) at the end of each
; family block claim the actual association and are gated by the installer
; task "associatewithfiles".
; JPEG family (string 1001, icon 104)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Jpeg"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1001"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Jpeg"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1001"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Jpeg\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-104"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Jpeg\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.jpg\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Jpeg"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.jpeg\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Jpeg"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.jfif\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Jpeg"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; GIF family (string 1002, icon 103)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Gif"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1002"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Gif"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1002"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Gif\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-103"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Gif\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.gif\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Gif"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; PNG family (string 1003, icon 105)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Png"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1003"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Png"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1003"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Png\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-105"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Png\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.png\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Png"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.apng\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Png"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; SVG (string 1004, icon 106 - vector)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Svg"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1004"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Svg"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1004"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Svg\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Svg\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.svg\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Svg"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; WebP (string 1005, icon 105 - transparency capable)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Webp"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1005"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Webp"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1005"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Webp\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-105"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Webp\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.webp\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Webp"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; AVIF (string 1006, icon 105 - transparency capable)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Avif"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1006"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Avif"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1006"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Avif\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-105"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Avif\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.avif\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Avif"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; ICO (string 1007, icon 106 - icon format)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ico"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1007"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ico"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1007"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ico\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ico\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.ico\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Ico"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; ICNS (string 1008, icon 106 - icon format)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Icns"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1008"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Icns"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1008"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Icns\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Icns\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.icns\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Icns"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Photoshop family (string 1009, icon 102 - artwork)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Psd"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1009"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Psd"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1009"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Psd\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Psd\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.psd\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Psd"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.psb\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Psd"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.pdd\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Psd"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.psdt\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Psd"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Krita (string 1010, icon 102 - artwork)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Kra"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1010"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Kra"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1010"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Kra\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Kra\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.kra\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Kra"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; GIMP XCF (string 1011, icon 102 - artwork)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Xcf"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1011"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Xcf"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1011"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Xcf\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Xcf\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.xcf\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Xcf"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; TARGA (string 1012, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tga"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1012"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tga"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1012"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tga\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tga\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.tga\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Tga"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; TIFF family (string 1013, icon 104 - photo)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tif"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1013"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tif"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1013"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tif\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-104"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Tif\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.tif\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Tif"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.tiff\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Tif"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; BMP (string 1014, icon 102)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Bmp"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1014"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Bmp"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1014"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Bmp\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Bmp\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.bmp\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Bmp"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Wireless BMP (string 1015, icon 102)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Wbmp"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1015"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Wbmp"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1015"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Wbmp\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Wbmp\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.wbmp\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Wbmp"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; DirectDraw Surface (string 1016, icon 102 - artwork)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Dds"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1016"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Dds"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1016"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Dds\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Dds\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.dds\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Dds"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; HDR family incl. EXR (string 1017, icon 104 - photo)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Hdr"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1017"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Hdr"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1017"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Hdr\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-104"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Hdr\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.hdr\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Hdr"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.exr\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Hdr"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; IFF (string 1018, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Iff"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1018"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Iff"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1018"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Iff\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Iff\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.iff\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Iff"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Softimage PIC (string 1019, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pic"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1019"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pic"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1019"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pic\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pic\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.pic\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Pic"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; PCX (string 1020, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pcx"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1020"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pcx"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1020"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pcx\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pcx\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.pcx\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Pcx"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; QOI (string 1021, icon 105 - transparency capable)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Qoi"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1021"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Qoi"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1021"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Qoi\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-105"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Qoi\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.qoi\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Qoi"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Sun Raster family (string 1022, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ras"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1022"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ras"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1022"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ras\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ras\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.ras\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Ras"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.sun\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Ras"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; OpenRaster (string 1023, icon 102 - artwork)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ora"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1023"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ora"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1023"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ora\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-102"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ora\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.ora\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Ora"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Animated Cursor (string 1024, icon 103 - animated)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ani"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1024"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ani"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1024"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ani\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-103"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Ani\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.ani\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Ani"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Portable Float Map family (string 1025, icon 104 - photo/HDR)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pfm"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1025"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pfm"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1025"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pfm\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-104"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pfm\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.pfm\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Pfm"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.phm\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Pfm"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Silicon Graphics family (string 1026, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Rgb"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1026"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Rgb"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1026"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Rgb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Rgb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.rgb\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Rgb"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.rgba\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Rgb"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.bw\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Rgb"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
Root: HKA; Subkey: "Software\Classes\.sgi\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Rgb"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Pixar (string 1027, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pxr"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1027"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pxr"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1027"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pxr\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Pxr\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.pxr\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Pxr"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
; Scitex CT (string 1028, icon 106 - archaic)
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Sct"; ValueType: string; ValueName: ""; ValueData: "@{app}\scwpic.exe,-1028"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Sct"; ValueType: string; ValueName: "FriendlyTypeName"; ValueData: "@{app}\scwpic.exe,-1028"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Sct\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\scwpic.exe,-106"
Root: HKA; Subkey: "Software\Classes\SarasasChipWorkshop.Picture.Sct\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\scwpic.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\.sct\OpenWithProgids"; ValueType: string; ValueName: "SarasasChipWorkshop.Picture.Sct"; ValueData: ""; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: associatewithfiles
[Icons]
Name: "{group}\{cm:MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "https://github.com/SarasasChipWorkshop/sarasacw-picture"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{cm:MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
Loaded 100 of 359 files, more files were not shown because too many files have changed in this diff. Show more