Skip to content

Commit

Permalink
added #159
Browse files Browse the repository at this point in the history
  • Loading branch information
mienaiyami committed May 20, 2023
1 parent 7e9895e commit e0e0752
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
10 changes: 7 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ Linux distribution currently not available as direct download but can be build e
## Added

- Option to open reader directly in zen mode (access from app settings).
- #159.

## Changed

- UI Enhancements.
- Open prev/next page on scroll in reader modes "left to right, right to left" when image height is smaller than window.
- re-enabling hardware acceleration as stutter no longer present, #6.
- Added delay on page number input before starting scroll (can be bypassed by clicking enter).
- Removed sync/blocking removing of temp file on clicking home.
- #152


## Fixed

- fixed #143, #140.
- fixed #145,#147,#155.
- epub history not going to top after updating.
- checkboxes focusable through tab even if disabled.

---

Expand Down
6 changes: 5 additions & 1 deletion src/Components/EPubReader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,11 @@ const EPubReader = () => {
<div
ref={readerRef}
id="EPubReader"
className={(isSideListPinned ? "sideListPinned " : "") + "reader "}
className={
(isSideListPinned ? "sideListPinned " : "") +
"reader " +
(zenMode && appSettings.hideCursorInZenMode ? "noCursor " : "")
}
style={{
gridTemplateColumns: sideListWidth + "px auto",
display: isReaderOpen ? (isSideListPinned ? "grid" : "block") : "none",
Expand Down
6 changes: 5 additions & 1 deletion src/Components/Reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,11 @@ const Reader = () => {
<div
ref={readerRef}
id="reader"
className={(isSideListPinned ? "sideListPinned " : "") + "reader "}
className={
(isSideListPinned ? "sideListPinned " : "") +
"reader " +
(zenMode && appSettings.hideCursorInZenMode ? "noCursor " : "")
}
style={{
gridTemplateColumns: sideListWidth + "px auto",

Expand Down
12 changes: 12 additions & 0 deletions src/Components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,18 @@ const Settings = (): ReactElement => {
Open in <code>Zen Mode</code> by default.
</p>
</label>
<label className={appSettings.hideCursorInZenMode ? "selected" : ""}>
<input
type="checkbox"
checked={appSettings.hideCursorInZenMode}
onChange={(e) => {
dispatch(setAppSettings({ hideCursorInZenMode: e.currentTarget.checked }));
}}
/>
<p>
Hide cursor in <code>Zen Mode</code>.
</p>
</label>
<label className={appSettings.useCanvasBasedReader ? "selected" : ""}>
<input
type="checkbox"
Expand Down
2 changes: 2 additions & 0 deletions src/MainImports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const settingValidatorData = {
showSearch: false,

openInZenMode: false,
hideCursorInZenMode: false,
readerSettings: {
/**
* width of reader in percent
Expand Down Expand Up @@ -875,6 +876,7 @@ const defaultSettings: AppSettings = {
disableListNumbering: false,
showSearch: false,
openInZenMode: false,
hideCursorInZenMode: false,
readerSettings: {
readerWidth: 60,
variableImageSize: true,
Expand Down
4 changes: 4 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,10 @@ body {
// --mangaListWidth: clamp(400px, 40%, 500px);
--sideListWidth: 450px;

&.noCursor {
cursor: none;
}

&.sideListPinned {
&#reader {
overflow: hidden;
Expand Down

0 comments on commit e0e0752

Please sign in to comment.