Skip to content
Snippets Groups Projects
Commit aa4bda0c authored by SeeLook's avatar SeeLook :musical_note:
Browse files

[Android] Increase defaule font size but set it globally

- calculate bigger factor from screen density
- but force to use such a pixel size for entire app
parent 638d3f4e
Branches
Tags
No related merge requests found
...@@ -354,7 +354,7 @@ qreal TnootkaQML::lightness(const QColor& c) const { ...@@ -354,7 +354,7 @@ qreal TnootkaQML::lightness(const QColor& c) const {
int TnootkaQML::factor() { int TnootkaQML::factor() {
#if defined (Q_OS_ANDROID) #if defined (Q_OS_ANDROID)
// Set Android font according to screen size/density // Set Android font according to screen size/density
return qRound(Tmtr::fingerPixels() * 0.3 * GLOB->guiScale()); return qRound(Tmtr::fingerPixels() * 0.35 * GLOB->guiScale());
#else #else
// but use system font size on desktops // but use system font size on desktops
return qRound(Tmtr::systemFont.pointSize() / 72.0 * qApp->primaryScreen()->logicalDotsPerInch() * GLOB->guiScale()); return qRound(Tmtr::systemFont.pointSize() / 72.0 * qApp->primaryScreen()->logicalDotsPerInch() * GLOB->guiScale());
......
...@@ -144,7 +144,7 @@ int main(int argc, char *argv[]) ...@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
auto f = a->font(); auto f = a->font();
#if defined (Q_OS_ANDROID) #if defined (Q_OS_ANDROID)
f.setPixelSize(qRound(static_cast<qreal>(f.pixelSize()) * gl->guiScale())); f.setPixelSize(nooObj->factor());
auto pal = qApp->palette(); auto pal = qApp->palette();
pal.setColor(QPalette::Active, QPalette::Highlight, QColor(0, 160, 160)); // Teal color of highlight for Android pal.setColor(QPalette::Active, QPalette::Highlight, QColor(0, 160, 160)); // Teal color of highlight for Android
pal.setColor(QPalette::Active, QPalette::Shadow, QColor(120, 120, 120)); // Dark gray for shadow pal.setColor(QPalette::Active, QPalette::Shadow, QColor(120, 120, 120)); // Dark gray for shadow
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment