From 0f69ed3ba19f308033f120bb8a5230af421398e1 Mon Sep 17 00:00:00 2001
From: rayvader <42436531+rayvader@users.noreply.github.com>
Date: Sun, 1 Nov 2026 10:40:32 +0000
Subject: [PATCH] fix: Auto text size keeps unfolded text at 100 %
Unfolded / tablet (smallest width 600 dp and over) is now 100 % instead
of 90 %. Folded stays 110 %; 520-599 dp blends 110 -> 100.
---
README.md | 2 +-
.../github/rayvader/kirocrew/core/AutoText.kt | 8 +++----
app/src/main/res/values/strings.xml | 2 +-
.../rayvader/kirocrew/core/AutoTextTest.kt | 24 +++++++++----------
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/README.md b/README.md
index 3a24c48..0320646 100644
--- a/README.md
+++ b/README.md
@@ -129,7 +129,7 @@ Open **Settings** from the app menu.
|---|---|
| Server | Several servers, start page (or a custom path), fast page switching |
| Notifications | On or off. Background alerts: only while open, every 15/30/60 minutes, or instant. Sound and vibration per kind of alert. |
-| Look | Light, dark or system theme. 6 accent colors. Force-dark pages. Text size 50–200 %, or **Auto text size**: slightly bigger text on a folded phone (110 %), slightly smaller on an unfolded phone or a tablet (90 %), and the slider adjusts it. Turning the phone does not change it. Top bar and bottom bar on or off. Pick up to 5 bottom-bar pages. Full screen. |
+| Look | Light, dark or system theme. 6 accent colors. Force-dark pages. Text size 50–200 %, or **Auto text size**: slightly bigger text on a folded phone (110 %), normal size on an unfolded phone or a tablet (100 %), and the slider adjusts it. Turning the phone does not change it. Top bar and bottom bar on or off. Pick up to 5 bottom-bar pages. Full screen. |
| Behavior | Pull to refresh, keep screen on, desktop mode, open other sites in browser, double back to exit, custom CSS, user-agent suffix |
| Security | App lock (fingerprint, face or screen lock) with timeout. Privacy screen (no screenshots, hidden in recents). |
| Data | Clear cache. Sign out (cookies and site data). |
diff --git a/app/src/main/java/io/github/rayvader/kirocrew/core/AutoText.kt b/app/src/main/java/io/github/rayvader/kirocrew/core/AutoText.kt
index 802515e..ab84de1 100644
--- a/app/src/main/java/io/github/rayvader/kirocrew/core/AutoText.kt
+++ b/app/src/main/java/io/github/rayvader/kirocrew/core/AutoText.kt
@@ -5,19 +5,19 @@ import kotlin.math.roundToInt
/**
* "Auto text size": a base page text size taken from the screen's smallest width
* (`Configuration.smallestScreenWidthDp`), so a folded phone gets slightly larger text
- * and an unfolded phone or a tablet slightly smaller text. The smallest width does not
+ * and an unfolded phone or a tablet normal-size text. The smallest width does not
* change when the phone is turned, so rotating never changes the size.
*
* smallest width size
* < 520 dp 110 % folded phone, cover screen (~344-411 dp)
- * 520-599 dp 110 -> 90 %, straight line (560 dp -> 100 %)
- * >= 600 dp 90 % unfolded phone, tablet
+ * 520-599 dp 110 -> 100 %, straight line (560 dp -> 105 %)
+ * >= 600 dp 100 % unfolded phone, tablet
*/
object AutoText {
const val PHONE_MAX_DP = 520
const val TABLET_MIN_DP = 600
const val PHONE_PERCENT = 110
- const val TABLET_PERCENT = 90
+ const val TABLET_PERCENT = 100
/** The automatic size in percent for a screen whose smallest width is [smallestWidthDp]. */
fun percent(smallestWidthDp: Int): Int = when {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5cc1bfe..d60d3a6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -212,7 +212,7 @@ The app saves the server and signs you in.
Darken pages that have no dark theme (dark app theme only)
Text size
Auto text size
- Slightly bigger text when folded, slightly smaller when unfolded or on a tablet
+ Slightly bigger text when folded, normal size when unfolded or on a tablet
Adjusts the automatic size
Show top bar
When off, tap the Kiro ghost peeking from the screen edge for the menu. Drag it to move it.
diff --git a/app/src/test/java/io/github/rayvader/kirocrew/core/AutoTextTest.kt b/app/src/test/java/io/github/rayvader/kirocrew/core/AutoTextTest.kt
index 18cc830..3822a3e 100644
--- a/app/src/test/java/io/github/rayvader/kirocrew/core/AutoTextTest.kt
+++ b/app/src/test/java/io/github/rayvader/kirocrew/core/AutoTextTest.kt
@@ -15,19 +15,19 @@ class AutoTextTest {
}
@Test
- fun unfoldedPhonesAndTabletsGetSlightlySmallerText() {
- assertEquals(90, AutoText.percent(600))
- assertEquals(90, AutoText.percent(673)) // unfolded Fold inner screen
- assertEquals(90, AutoText.percent(880))
- assertEquals(90, AutoText.percent(2000))
+ fun unfoldedPhonesAndTabletsGetNormalText() {
+ assertEquals(100, AutoText.percent(600))
+ assertEquals(100, AutoText.percent(673)) // unfolded Fold inner screen
+ assertEquals(100, AutoText.percent(880))
+ assertEquals(100, AutoText.percent(2000))
}
@Test
fun betweenItBlendsInAStraightLine() {
assertEquals(110, AutoText.percent(520))
- assertEquals(100, AutoText.percent(560))
- assertEquals(105, AutoText.percent(540))
- assertEquals(95, AutoText.percent(580))
+ assertEquals(105, AutoText.percent(560))
+ assertEquals(108, AutoText.percent(540))
+ assertEquals(103, AutoText.percent(580))
var last = 111
for (w in 500..620) {
val p = AutoText.percent(w)
@@ -59,10 +59,10 @@ class AutoTextTest {
assertEquals(110, AutoText.zoom(411, 100))
assertEquals(88, AutoText.zoom(411, 80)) // 110 % x 80 %
assertEquals(132, AutoText.zoom(411, 120)) // 110 % x 120 %
- assertEquals(90, AutoText.zoom(673, 100))
- assertEquals(72, AutoText.zoom(673, 80)) // 90 % x 80 %
- assertEquals(108, AutoText.zoom(673, 120)) // 90 % x 120 %
- assertEquals(100, AutoText.zoom(560, 100))
+ assertEquals(100, AutoText.zoom(673, 100))
+ assertEquals(80, AutoText.zoom(673, 80)) // 100 % x 80 %
+ assertEquals(120, AutoText.zoom(673, 120)) // 100 % x 120 %
+ assertEquals(105, AutoText.zoom(560, 100))
}
@Test