Skip to content

Commit

Permalink
Scaling now will not make very little things on pc monitors
Browse files Browse the repository at this point in the history
a scaling.dp(X) will never return less than X
  • Loading branch information
TronFortyTwo committed Jan 12, 2021
1 parent c6191f9 commit 78e981d
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 99 deletions.
196 changes: 98 additions & 98 deletions po/sturmreader.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sturmreader.emanuelesorce\n"
"Report-Msgid-Bugs-To: [email protected] - [email protected]\n"
"POT-Creation-Date: 2021-01-12 13:31+0100\n"
"POT-Creation-Date: 2021-01-12 12:55+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -18,51 +18,65 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: ui/qml/About.qml:30
msgid "About"
#: ui/qml/Settings.qml:33
msgid "Settings"
msgstr ""

#: ui/qml/About.qml:75
msgid "Sturm Reader"
#: ui/qml/Settings.qml:64 ui/qml/Settings.qml:95
msgid "Default Book Location"
msgstr ""

#: ui/qml/About.qml:83
#: ui/qml/Settings.qml:68
msgid ""
"Sturm (und Drang) Reader is an open source Ebook reader.<br>Community is "
"what makes this app possible, so pull requests, translations, feedback and "
"donations are very appreciated :)<br>This app Is a fork of the Beru app by "
"Rshcroll, Thanks!<br>This app stands on the shoulder of various Open Source "
"projects, see source code for licensing details"
"Sturm Reader seems to be operating under AppArmor restrictions that prevent "
"it from accessing most of your home directory. Ebooks should be put in <i>"
"%1</i> for Sturm Reader to read them."
msgstr ""

#: ui/qml/About.qml:91
#. / Read the books in the given directory again. /
#: ui/qml/Settings.qml:76 ui/qml/Settings.qml:122
msgid "Reload Directory"
msgstr ""

#: ui/qml/Settings.qml:99
msgid ""
"A big thanks to all translators, beta-testers, and users<br/>in general who "
"improve this app with their work and feedback"
"Enter the folder in your home directory where your ebooks are or should be "
"stored. Changing this value will not affect existing books in your library."
msgstr ""

#: ui/qml/About.qml:99
msgid "A special thanks to Joan Cibersheep for the new logo"
#. / Create a new directory from path given. /
#: ui/qml/Settings.qml:113
msgid "Create Directory"
msgstr ""

#: ui/qml/About.qml:107
msgid "A special thanks to Jeroen for support and a test device"
#. / File exists with path given. /
#: ui/qml/Settings.qml:117
msgid "File Exists"
msgstr ""

#: ui/qml/About.qml:112
msgid "See source on Github"
#. / Use directory specified to store books. /
#: ui/qml/Settings.qml:125
msgid "Use Directory"
msgstr ""

#: ui/qml/About.qml:120
msgid "Report bug or feature request"
#: ui/qml/Settings.qml:159
msgid "Use legacy PDF viewer"
msgstr ""

#: ui/qml/About.qml:128
msgid "See License (GNU GPL v3)"
#: ui/qml/Settings.qml:172
msgid "Application Style (experimental)"
msgstr ""

#: ui/qml/About.qml:135
msgid "❤Donate❤"
#: ui/qml/Settings.qml:176
msgid "Supported styles: "
msgstr ""

#: ui/qml/Settings.qml:181
msgid "Requires a restart to take effect"
msgstr ""

#: ui/qml/ImporterUT.qml:51
msgid "Import books from"
msgstr ""

#: ui/qml/BookPage.qml:81
Expand Down Expand Up @@ -122,38 +136,24 @@ msgstr ""
msgid "Close"
msgstr ""

#: ui/qml/ImportPage.qml:42
msgid "Importing books..."
msgstr ""

#: ui/qml/ImportPage.qml:92
msgid "Waiting"
msgstr ""

#: ui/qml/ImportPage.qml:94
msgid "Processing"
msgstr ""

#: ui/qml/ImportPage.qml:96
msgid "Imported to %1"
msgstr ""

#: ui/qml/ImportPage.qml:98
msgid "Already in library: %1"
#: ui/qml/Reader.qml:21
msgid ""
"Could not determine file type.\n"
"\n"
"Remember, Sturm Reader can only open EPUB, PDF, and CBZ files without DRM."
msgstr ""

#: ui/qml/ImportPage.qml:100
msgid "Error: %1"
#: ui/qml/Reader.qml:22
msgid ""
"Could not parse file.\n"
"\n"
"Although it appears to be a %1 file, it could not be parsed by Sturm Reader."
msgstr ""

#: ui/qml/ImporterPortable.qml:23
msgid "Choose the books to import"
msgstr ""

#: ui/qml/ImporterUT.qml:51
msgid "Import books from"
msgstr ""

#: ui/qml/LocalBooks.qml:41
msgid "Library"
msgstr ""
Expand Down Expand Up @@ -231,85 +231,85 @@ msgstr ""
msgid "Swipe to Delete"
msgstr ""

#: ui/qml/Main.qml:106
msgid "Error Opening File"
#: ui/qml/About.qml:30
msgid "About"
msgstr ""

#: ui/qml/MetricsUT.qml:13
msgid "Pages read today: %1"
#: ui/qml/About.qml:75
msgid "Sturm Reader"
msgstr ""

#: ui/qml/MetricsUT.qml:14
msgid "No pages read today"
#: ui/qml/About.qml:83
msgid ""
"Sturm (und Drang) Reader is an open source Ebook reader.<br>Community is "
"what makes this app possible, so pull requests, translations, feedback and "
"donations are very appreciated :)<br>This app Is a fork of the Beru app by "
"Rshcroll, Thanks!<br>This app stands on the shoulder of various Open Source "
"projects, see source code for licensing details"
msgstr ""

#: ui/qml/Reader.qml:21
#: ui/qml/About.qml:91
msgid ""
"Could not determine file type.\n"
"\n"
"Remember, Sturm Reader can only open EPUB, PDF, and CBZ files without DRM."
"A big thanks to all translators, beta-testers, and users<br/>in general who "
"improve this app with their work and feedback"
msgstr ""

#: ui/qml/Reader.qml:22
msgid ""
"Could not parse file.\n"
"\n"
"Although it appears to be a %1 file, it could not be parsed by Sturm Reader."
#: ui/qml/About.qml:99
msgid "A special thanks to Joan Cibersheep for the new logo"
msgstr ""

#: ui/qml/Settings.qml:33
msgid "Settings"
#: ui/qml/About.qml:107
msgid "A special thanks to Jeroen for support and a test device"
msgstr ""

#: ui/qml/Settings.qml:64 ui/qml/Settings.qml:95
msgid "Default Book Location"
#: ui/qml/About.qml:112
msgid "See source on Github"
msgstr ""

#: ui/qml/Settings.qml:68
msgid ""
"Sturm Reader seems to be operating under AppArmor restrictions that prevent "
"it from accessing most of your home directory. Ebooks should be put in <i>"
"%1</i> for Sturm Reader to read them."
#: ui/qml/About.qml:120
msgid "Report bug or feature request"
msgstr ""

#. / Read the books in the given directory again. /
#: ui/qml/Settings.qml:76 ui/qml/Settings.qml:122
msgid "Reload Directory"
#: ui/qml/About.qml:128
msgid "See License (GNU GPL v3)"
msgstr ""

#: ui/qml/Settings.qml:99
msgid ""
"Enter the folder in your home directory where your ebooks are or should be "
"stored. Changing this value will not affect existing books in your library."
#: ui/qml/About.qml:135
msgid "❤Donate❤"
msgstr ""

#. / Create a new directory from path given. /
#: ui/qml/Settings.qml:113
msgid "Create Directory"
#: ui/qml/ImportPage.qml:42
msgid "Importing books..."
msgstr ""

#. / File exists with path given. /
#: ui/qml/Settings.qml:117
msgid "File Exists"
#: ui/qml/ImportPage.qml:92
msgid "Waiting"
msgstr ""

#. / Use directory specified to store books. /
#: ui/qml/Settings.qml:125
msgid "Use Directory"
#: ui/qml/ImportPage.qml:94
msgid "Processing"
msgstr ""

#: ui/qml/Settings.qml:159
msgid "Use legacy PDF viewer"
#: ui/qml/ImportPage.qml:96
msgid "Imported to %1"
msgstr ""

#: ui/qml/Settings.qml:172
msgid "Application Style (experimental)"
#: ui/qml/ImportPage.qml:98
msgid "Already in library: %1"
msgstr ""

#: ui/qml/Settings.qml:176
msgid "Supported styles: "
#: ui/qml/ImportPage.qml:100
msgid "Error: %1"
msgstr ""

#: ui/qml/Settings.qml:181
msgid "Requires a restart to take effect"
#: ui/qml/Main.qml:106
msgid "Error Opening File"
msgstr ""

#: ui/qml/MetricsUT.qml:13
msgid "Pages read today: %1"
msgstr ""

#: ui/qml/MetricsUT.qml:14
msgid "No pages read today"
msgstr ""
1 change: 1 addition & 0 deletions ui/qml/Scaling.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ QtObject {
return;
}
console.log("Scaling implementation: Portable");
console.log("scaling.dp(100) = " + scaling.dp(100) );
}
}
3 changes: 2 additions & 1 deletion ui/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ int Units::dp(double value) const
}

// Based on 160 DPI as 1:1 to match Android
return qRound(value * (dpi / 160.0) * screen->devicePixelRatio());
// BUT avoid having too little stuff, preventing 1 dp to be smaller than a real pixel
return qRound( qMax( value * (dpi / 160.0) * screen->devicePixelRatio(), value));
}

0 comments on commit 78e981d

Please sign in to comment.