From 3f01f3608de295d2490d382dce3fe710196f932c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adriel=20Caf=C3=A9?= Date: Thu, 9 Sep 2021 15:04:50 -0300 Subject: [PATCH] fix: adjust tuning note position on small screens --- .../main/kotlin/cafe/adriel/chroma/view/components/tuning.kt | 2 ++ .../main/kotlin/cafe/adriel/chroma/view/tuner/TunerScreen.kt | 1 + 2 files changed, 3 insertions(+) diff --git a/app/src/main/kotlin/cafe/adriel/chroma/view/components/tuning.kt b/app/src/main/kotlin/cafe/adriel/chroma/view/components/tuning.kt index 38f450d..2977334 100644 --- a/app/src/main/kotlin/cafe/adriel/chroma/view/components/tuning.kt +++ b/app/src/main/kotlin/cafe/adriel/chroma/view/components/tuning.kt @@ -39,6 +39,7 @@ fun TuningNote( ) = ConstraintLayout(modifier = modifier) { val (toneRef, semitoneRef, octaveRef, frequencyRef) = createRefs() + val horizontalGuideline = createGuidelineFromStart(.40f) Text( text = tone, @@ -47,6 +48,7 @@ fun TuningNote( fontWeight = FontWeight.Bold, modifier = Modifier.constrainAs(toneRef) { centerVerticallyTo(parent) + centerAround(horizontalGuideline) } ) if (accidental != null) { diff --git a/app/src/main/kotlin/cafe/adriel/chroma/view/tuner/TunerScreen.kt b/app/src/main/kotlin/cafe/adriel/chroma/view/tuner/TunerScreen.kt index 1686768..50b05f2 100644 --- a/app/src/main/kotlin/cafe/adriel/chroma/view/tuner/TunerScreen.kt +++ b/app/src/main/kotlin/cafe/adriel/chroma/view/tuner/TunerScreen.kt @@ -141,6 +141,7 @@ class TunerScreen( advancedMode = settings.advancedMode, modifier = Modifier.constrainAs(noteRef) { centerHorizontallyTo(parent) + top.linkTo(parent.top) bottom.linkTo(deviationBarsRef.top) } )