Commit Graph

226 Commits

Author SHA1 Message Date
Luis Ángel San Martín
f3249e4053 Add shortcuts to control the double page mode offset 2023-07-09 10:44:43 +02:00
Luis Ángel San Martín
d70e2136ce Map comic type to manga mode in YACReader until comic type is fully supported 2023-06-09 19:02:51 +02:00
Luis Ángel San Martín
68ece533e1 Replace Q_OS_MAC with Q_OS_MACOS 2023-06-04 20:55:11 +02:00
Luis Ángel San Martín Rodríguez
0f974d7caa Update macos icons 2023-06-01 16:38:40 +02:00
Luis Ángel San Martín Rodríguez
7b88d47396 #include "yacreader_global.h" in Y_MAC_UI is used 2023-05-24 18:10:03 +02:00
Luis Ángel San Martín
315d2deced Don't use Q_OS_MAC for ui specifics, Y_MAC_UI is the replacement 2023-05-23 18:51:33 +02:00
Luis Ángel San Martín
f2bf53ce5b Add new fields to the DB and make then available to be used in the apps 2023-05-12 16:59:23 +02:00
Luis Ángel San Martín
686e91af57 Fix missing include 2023-04-30 14:28:40 +02:00
Luis Ángel San Martín
2a1f3febea Format 2023-04-30 14:17:26 +02:00
Luis Ángel San Martín
6593f03740 Remove some unused includes 2023-04-30 14:07:35 +02:00
Luis Ángel San Martín
3355f2137c Remove include 2023-04-29 10:45:57 +02:00
Luis Ángel San Martín
b3d970fdf4 Remove unused dialog 2023-04-29 08:36:30 +02:00
Felix Kauselmann
9f67bb5e53 Server: Port IP detection and filtering to QNetworkInterface 2023-04-07 20:22:49 +02:00
Luis Ángel San Martín
0afe2c33b7 Fix currentPage value when closing YACReader in double page mode
If the latest page of the comic is visible, that should be the currentPage value so YACReaderLibrary can mark the comic as read.
2022-12-27 09:26:55 +01:00
Luis Ángel San Martín
250c48848c setAllocationLimit is Qt6 only 2022-12-12 22:07:30 +01:00
Luis Ángel San Martín
fc1f48aaa5 Remove image allocation limit
This commit fixes this error: QImageIOHandler: Rejecting image as it exceeds the current allocation limit of 128 megabytes
2022-12-12 18:37:29 +01:00
Felix Kauselmann
0414104067 YACReader: Fix crash when exiting while processing a comic
When quitting YACReader while processing a comic, the comic thread needs
to be properly terminated to avoid segfaults and other possible problems.
2022-11-19 19:27:52 +01:00
Felix Kauselmann
a35cb979e4 Unix: Fix regression in translation install target
The introduction of CONFIG+= lrelease introduced a regression in the
installation of translation files on systems using make install targets.

This is fixed by replacing the old translation targets with the target
supplied by lrelease.

Fixes #349
2022-10-31 13:19:50 +01:00
Luis Ángel San Martín Rodríguez
5389540537 Fix Qt5 compilation in macos 2022-10-23 16:37:54 +02:00
Luis Ángel San Martín
8f1c63fcf0 Move functions 2022-10-22 11:40:16 +02:00
Luis Ángel San Martín
c8f8c5661f Update close translator icon to svg 2022-10-21 17:58:51 +02:00
Luis Ángel San Martín Rodríguez
0b37c7c684 Use the new svg icons in macos too 2022-10-20 19:14:13 +02:00
Luis Ángel San Martín
4c66b8ecad Use SVG icons in YACReader's toolbar (windows/linux) and in shortcuts dialog 2022-10-20 17:51:22 +02:00
Luis Ángel San Martín
b9c1f0b505 Update translation files with new strings 2022-10-16 18:23:17 +02:00
Luis Ángel San Martín
4839b416bd Add english translations 2022-10-16 18:20:42 +02:00
Luis Ángel San Martín
424f3c3014 Fix qm files build output in windows 2022-10-16 17:59:41 +02:00
Luis Ángel San Martín
68e67fd777 Copy qm files manually after linking to the output folder
Windows only
2022-10-16 17:25:20 +02:00
Felix Kauselmann
76a12cd7e3 Translations: Don't use QLocale::system::name
Older versions of the Qt documentation advocate using QLocale::system::name
for system language resolving. This is deprecated and causes misbehavior,
such as selecting the system unit language instead of system display language
on Windows.

Solution: Use QTranslator::load(QLocale(), ... ...), which is display language
aware.
2022-10-16 14:33:49 +02:00
Luis Ángel San Martín Rodríguez
794c0c47b5 Simplify QColorDialog usage
This fixes the color dialog being always available in macos as a YACReader's child window.
2022-10-11 21:23:55 +02:00
Lisa Thamer
9d79d0638b
Added missing German translations and fixed errors
I'm a native German speaker, so I fixed errors in the German translations that were already present in the file and added all missing translations.
2022-10-10 10:43:12 +02:00
Felix Kauselmann
99114b00e7 Qmake: Use lrelease to automate language file compilation 2022-10-08 19:19:50 +02:00
sabriunal
64d9c6ca3e Update Turkish translation 2022-10-08 01:47:58 +03:00
Luis Ángel San Martín Rodríguez
e026f25617 QMacToolBar is not available in Qt6
This commit adds new qt pure versions of the mac toolbar to be used in qt6.
2022-09-12 19:24:56 +02:00
Luis Ángel San Martín Rodríguez
52fe8683bb macextras is not available in qt6 2022-09-12 19:24:56 +02:00
Luis Ángel San Martín
906028b184 Always clear the page number field in GoToDialog when it is opened 2022-09-04 17:47:09 +02:00
Luis Ángel San Martín
c25c586811 Fix bug that didn't let the magnifying glass expand horizontally using alt 2022-09-02 17:00:05 +02:00
BEN ENGLISCH
862c220069 Add libarchive decompression backend 2022-08-31 09:32:23 +02:00
tuwulin
788a3ef434 Update simplified Chinese.
Add traditional Chinese (Hong Kong, Taiwan).
2022-07-06 15:54:54 +02:00
Luis Ángel San Martín
01abda4d60
Merge pull request #292 from spinningthelock/patch-1
Enable using integrated GPU in Dual GPU Macs
2022-07-06 15:53:12 +02:00
Luis Ángel San Martín
9e9f035f35 Use Qt::HighDpiScaleFactorRoundingPolicy::PassThrough
It will be the default in Qt6 and respecting the scale factor that the user sets is the right thing to do.
2022-03-12 11:51:29 +01:00
Igor Kushnir
662b5c99fd Don't leak "orphan" actions at exit
The original reason to orphan these actions is likely obsolete now.

Extract MainWindowViewer::addActionWithShortcut() to reduce code
duplication.
2022-01-15 18:02:31 +02:00
Igor Kushnir
482c19b358 Allow triggering Open latest comic action when the toolbar is hidden
This action is added to the toolbar but not to the viewer. Thus it
cannot be triggered when the toolbar is hidden. Adding it to
MainWindowViewer makes it available at all times.
2022-01-15 18:02:31 +02:00
Igor Kushnir
24e42f76d2 Make Magnifying glass shortcuts work with non-Latin layouts
Viewer::keyPressEvent()'s and MagnifyingGlass::keyPressEvent()'s custom
matching of these shortcuts is the same as
MainWindowViewer::keyPressEvent()'s before the recent commit
"Reader: make 3 keyboard shortcuts work with non-Latin layouts". That
commit's message details the issues with the custom code.

The Magnifying glass actions are now enabled/disabled when
loadedComicActions are enabled/disabled - for the same reason (see the
recent "Reader: make 12 keyboard shortcuts work with non-Latin layouts"
commit). In addition, Viewer::keyPressEvent() propagated the Magnifying
glass shortcuts to MagnifyingGlass only when it was visible. Therefore
showing/hiding Magnifying glass also enables/disables these actions.
Note that Viewer::showMagnifyingGlass() shows Magnifying glass only if
render->hasLoadedComic() returns true, so
MainWindowViewer::setMglassActionsEnabled slot can be connected directly
to Viewer::magnifyingGlassVisibilityChanged signal without checking this
condition again.
2022-01-15 18:02:31 +02:00
Igor Kushnir
5254e66da3 Fix a typo in Viewer::magnifyingGlassShowed name
Make Viewer::magnifyingGlassIsVisible() const.
2022-01-15 18:02:30 +02:00
Igor Kushnir
c8697ccd2d Always limit Magnifying glass's height
MagnifyingGlass::sizeUp() and MagnifyingGlass::sizeDown() grow/shrink
both width and height, but check only width's limits. Thus the user can
first increase Magnifying glass's height, then increase its size and
make the height greater than the main window's height. The user can also
first increase the width, then decrease the size until the height
shrinks to 0 and Magnifying glass disappears.

When Magnifying glass disappears, the only way to make it visible again
is to restore its default size by restarting YACReader, because the
invisible MagnifyingGlass widget does not receive wheel events and
Viewer::keyPressEvent() propagates shortcuts to mglass only if it is
visible. And even this workaround is possible only because YACReader
does not save/restore Magnifying glass's size (should it?).

Always checking both width and height limits fixes the bug. If one of
the dimensions reaches a limit, only the other dimension is modified. If
both dimensions reach their limits, neither is modified.
2022-01-15 18:02:30 +02:00
Igor Kushnir
efe9a1b995 MagnifyingGlass: get rid of C-style casts to Viewer*
qobject_cast<const Viewer *> improves const correctness.
QLabel::pixmap() is const-qualified => make Viewer::pixmap() const too.

Return non-const QPixmap from Viewer::pixmap() to let compiler move the
return value at the function's call sites.

Introduce a named constant maxRelativeDimension. Change its type from
float to double, which usually multiplies faster on x86-64.

Remove redundant parentheses to improve readability.
2022-01-15 18:02:30 +02:00
Igor Kushnir
fdba938fe8 MagnifyingGlass: don't updateImage() needlessly
Not all possible keyboard modifiers of a wheel event change
MagnifyingGlass's pixmap. So in case of e.g. MetaModifier or more than
one modifier, MagnifyingGlass::wheelEvent() calls updateImage() to no
avail.

Move the updateImage() call into the public slots to make them
self-sufficient. This also allows not to call updateImage() when the
pixmap is not changed in case the adjusted parameter has reached its
minimum or maximum value already.
2022-01-15 18:02:30 +02:00
Igor Kushnir
a1bb7735d2 Reader: make 12 keyboard shortcuts work with non-Latin layouts
Viewer::keyPressEvent()'s custom matching of these shortcuts is the same
as MainWindowViewer::keyPressEvent()'s before the recent commit
"Reader: make 3 keyboard shortcuts work with non-Latin layouts". That
commit's message details the issues with the custom code.

render->hasLoadedComic() condition in Viewer::keyPressEvent() becomes
true when Comic::_loaded is set to true. This always happens right after
Comic emits its numPages() signal. That is why the 12 fixed actions are
now enabled when Viewer emits its comicLoaded() signal, which is
connected to Render::numPages, which in turn is connected to
Comic::numPages signal.

The 12 fixed actions are now disabled when most other actions are
disabled: before a comic is opened and on comic opening error.
2022-01-15 18:02:30 +02:00
Igor Kushnir
0fad89dc03 Simplify code that disables previous/next comic actions 2022-01-15 18:02:30 +02:00
Igor Kushnir
f030a7fb0c Remove deprecated and always disabled alwaysOnTopAction 2022-01-15 18:02:30 +02:00