diff --git a/app/build.gradle.kts b/app/build.gradle.kts index aaadeff..46b95dd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -27,8 +27,8 @@ android { applicationId = "com.ledga.app" minSdk = 26 targetSdk = 34 - versionCode = 3 - versionName = "1.3.0" + versionCode = 4 + versionName = "1.3.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/ledga/app/ui/components/v2/PillTabBar.kt b/app/src/main/java/com/ledga/app/ui/components/v2/PillTabBar.kt index e91a21a..04cd062 100644 --- a/app/src/main/java/com/ledga/app/ui/components/v2/PillTabBar.kt +++ b/app/src/main/java/com/ledga/app/ui/components/v2/PillTabBar.kt @@ -9,10 +9,13 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -59,7 +62,9 @@ fun PillTabBar( Box( modifier = modifier .fillMaxWidth() - .padding(PaddingValues(start = 21.dp, end = 21.dp, top = 12.dp, bottom = 21.dp)), + // Sit above the navigation bar / gesture pill, never under it. + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(PaddingValues(start = 21.dp, end = 21.dp, top = 12.dp, bottom = 12.dp)), ) { Surface( modifier = Modifier diff --git a/app/src/main/java/com/ledga/app/ui/components/v2/TopBar.kt b/app/src/main/java/com/ledga/app/ui/components/v2/TopBar.kt index d054976..791428a 100644 --- a/app/src/main/java/com/ledga/app/ui/components/v2/TopBar.kt +++ b/app/src/main/java/com/ledga/app/ui/components/v2/TopBar.kt @@ -7,10 +7,13 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBars +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons @@ -51,6 +54,9 @@ fun LedgaTopBar( Row( modifier = modifier .fillMaxWidth() + // Push below the status bar โ€” MainActivity uses enableEdgeToEdge, + // so without this the avatar + actions sit under the system clock. + .windowInsetsPadding(WindowInsets.statusBars) .height(64.dp) .padding(horizontal = Space.Screen), verticalAlignment = Alignment.CenterVertically, diff --git a/app/src/main/java/com/ledga/app/ui/theme/Type.kt b/app/src/main/java/com/ledga/app/ui/theme/Type.kt index d16ad7c..5814aef 100644 --- a/app/src/main/java/com/ledga/app/ui/theme/Type.kt +++ b/app/src/main/java/com/ledga/app/ui/theme/Type.kt @@ -4,94 +4,86 @@ import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.googlefonts.Font -import androidx.compose.ui.text.googlefonts.GoogleFont import androidx.compose.ui.unit.sp -import com.ledga.app.R // ===================================================================== // Ledga v2 type scale โ€” LEDGA_REDESIGN.md ยง1.4 -// Font: Inter (via Google Fonts). Numbers should use tnum where shown. +// +// We use [FontFamily.SansSerif] (the platform's sans-serif font โ€” Roboto +// on AOSP, Samsung One UI Sans on Galaxy, etc.) deliberately over +// FontFamily.Default. Default inherits the user's system font preference, +// which on some devices (Samsung One UI) is a handwritten / script style +// that breaks our type rhythm. +// +// A future patch can switch back to Inter via downloadable fonts or a +// bundled TTF; for now reliability > Inter-pixel-fidelity. // ===================================================================== -private val GoogleFontsProvider = GoogleFont.Provider( - providerAuthority = "com.google.android.gms.fonts", - providerPackage = "com.google.android.gms", - certificates = R.array.com_google_android_gms_fonts_certs, -) - -private val InterFont = GoogleFont("Inter") - -private val Inter = FontFamily( - Font(googleFont = InterFont, fontProvider = GoogleFontsProvider, weight = FontWeight.Normal), - Font(googleFont = InterFont, fontProvider = GoogleFontsProvider, weight = FontWeight.Medium), - Font(googleFont = InterFont, fontProvider = GoogleFontsProvider, weight = FontWeight.SemiBold), - Font(googleFont = InterFont, fontProvider = GoogleFontsProvider, weight = FontWeight.Bold), -) +private val LedgaFont = FontFamily.SansSerif object LedgaText { val DisplayXL = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 56.sp, fontWeight = FontWeight.Bold, lineHeight = 58.8.sp, letterSpacing = (-1.5).sp, ) val DisplayL = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 44.sp, fontWeight = FontWeight.Bold, lineHeight = 46.2.sp, letterSpacing = (-1).sp, ) val DisplayM = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 32.sp, fontWeight = FontWeight.Bold, lineHeight = 35.2.sp, letterSpacing = (-0.5).sp, ) val TitleL = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 24.sp, fontWeight = FontWeight.Bold, lineHeight = 28.8.sp, letterSpacing = (-0.2).sp, ) val TitleM = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 20.sp, fontWeight = FontWeight.SemiBold, lineHeight = 25.sp, letterSpacing = (-0.1).sp, ) val TitleS = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 17.sp, fontWeight = FontWeight.SemiBold, lineHeight = 22.1.sp, ) val BodyL = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 16.sp, fontWeight = FontWeight.Medium, lineHeight = 22.4.sp, ) val BodyM = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 14.sp, fontWeight = FontWeight.Medium, lineHeight = 19.6.sp, ) val Caption = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 12.sp, fontWeight = FontWeight.Medium, lineHeight = 15.6.sp, letterSpacing = 0.1.sp, ) val Overline = TextStyle( - fontFamily = Inter, + fontFamily = LedgaFont, fontSize = 11.sp, fontWeight = FontWeight.SemiBold, lineHeight = 14.3.sp,