mienaiyami / yomikiru

An offline desktop reader for manga, comics, and novels. Offers a customizable reading experience with extensive settings, shortcuts, themes and layouts. Manga reader / Manhwa reader / Webtoon Reader / EPUB Reader. **Not a downloader**
MIT License
217 stars 10 forks source link

Pages Per Row odd offset sometimes doesn't work #366

Open Phallss opened 2 months ago

Phallss commented 2 months ago

Type of installation

Portable (.zip)

Type of reader (if reader related)

image

Steps to reproduce

Below is a small webm of the bug: clicking.webm

The same thing happens when using the shortcut keys: shortcut.webm

Note: the feature isn't entirely broken and works in some cases. Since you might not find a case where it is broken, I have provided 10 pages of a case where it doesn't work.

✔️ Expected Behavior

The double page view switches between the odd and even pairings of available pages.

❌ Actual Behavior

The double page view '2' pages and '2 odd' pages options are the same.

Phallss commented 2 months ago

It seems the issue lies with the detection of what is and isn't a double page. Whenever I delete all other sized pages and only keep the single pages, everything works as it should (i.e. that's the workaround). If you could point me to the part where this detection happens I might take a look at fixing it myself.

I'd detect double pages simply by checking whether the width is greater than the height. If true then it can be a double page, otherwise it'll be detected as a single page. That way the offset should hopefully be fixed as well as there's no confusion anymore in case there's more than 2 different page sizes in the chapter.