From a85bf705dbe2e4ccdb88df3aa5e732f94be4c867 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 6 Nov 2022 15:50:52 +0100 Subject: [PATCH] some UI changes --- .../libretube/ui/views/MarkableTimeBar.kt | 6 +++--- app/src/main/res/layout/fragment_playlist.xml | 8 +++++--- app/src/main/res/layout/playlists_row.xml | 17 ++++++++++------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/views/MarkableTimeBar.kt b/app/src/main/java/com/github/libretube/ui/views/MarkableTimeBar.kt index e3f9b0582..65a2e748f 100644 --- a/app/src/main/java/com/github/libretube/ui/views/MarkableTimeBar.kt +++ b/app/src/main/java/com/github/libretube/ui/views/MarkableTimeBar.kt @@ -38,7 +38,7 @@ class MarkableTimeBar( canvas.save() length = canvas.width - 2 * HORIZONTAL_OFFSET - val marginY = canvas.height / 2 - PROGRESS_HEIGHT / 2 + val marginY = canvas.height / 2 - PROGRESS_BAR_HEIGHT / 2 segments.forEach { canvas.drawRect( @@ -46,7 +46,7 @@ class MarkableTimeBar( (it.segment.first() + HORIZONTAL_OFFSET).toLength(), marginY, (it.segment.last() + HORIZONTAL_OFFSET).toLength(), - canvas.height - marginY - 1 + canvas.height - marginY ), Paint().apply { color = ThemeHelper.getThemeColor(context, R.attr.colorError) @@ -74,6 +74,6 @@ class MarkableTimeBar( companion object { const val HORIZONTAL_OFFSET = 10 - const val PROGRESS_HEIGHT = 6 + const val PROGRESS_BAR_HEIGHT = 4 } } diff --git a/app/src/main/res/layout/fragment_playlist.xml b/app/src/main/res/layout/fragment_playlist.xml index 3f9ed8024..4e2b59170 100644 --- a/app/src/main/res/layout/fragment_playlist.xml +++ b/app/src/main/res/layout/fragment_playlist.xml @@ -38,16 +38,18 @@ + android:paddingHorizontal="15dp"> - + android:background="#CC000000" + android:gravity="center" + android:orientation="vertical"> - +