From 5e00fe54aeed2fc88fbcee2ab82aadd9c86332be Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Mon, 5 Sep 2022 18:39:12 +0200 Subject: [PATCH] Fixes bg and divider colors and top margin of recents --- .../list/home/recent/RecentRoomCarouselController.kt | 10 ++++++++-- vector/src/main/res/layout/item_invites_count.xml | 2 +- vector/src/main/res/layout/item_recent_room.xml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt index 608a2f3484..0c5d9a3533 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/recent/RecentRoomCarouselController.kt @@ -45,6 +45,12 @@ class RecentRoomCarouselController @Inject constructor( resources.displayMetrics ).toInt() + private val topPadding = TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, + 12f, + resources.displayMetrics + ).toInt() + private val itemSpacing = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 24f, @@ -63,13 +69,13 @@ class RecentRoomCarouselController @Inject constructor( id("recents_carousel") padding(Carousel.Padding( host.hPadding, - 0, + host.topPadding, host.hPadding, 0, host.itemSpacing) ) onBind { _, view, _ -> - val colorSurface = MaterialColors.getColor(view, R.attr.colorSurface) + val colorSurface = MaterialColors.getColor(view, R.attr.vctr_toolbar_background) view.setBackgroundColor(colorSurface) } withModelsFrom(data) { roomSummary -> diff --git a/vector/src/main/res/layout/item_invites_count.xml b/vector/src/main/res/layout/item_invites_count.xml index 8a5c2b1222..8ec4eb0279 100644 --- a/vector/src/main/res/layout/item_invites_count.xml +++ b/vector/src/main/res/layout/item_invites_count.xml @@ -50,7 +50,7 @@ android:layout_height="1dp" android:layout_marginStart="22dp" android:layout_marginEnd="16dp" - android:background="?vctr_list_separator_system" + android:background="?vctr_list_separator" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> diff --git a/vector/src/main/res/layout/item_recent_room.xml b/vector/src/main/res/layout/item_recent_room.xml index 56ed3c40c0..ef82784f8b 100644 --- a/vector/src/main/res/layout/item_recent_room.xml +++ b/vector/src/main/res/layout/item_recent_room.xml @@ -5,7 +5,7 @@ android:id="@+id/recentRoot" android:layout_width="60dp" android:layout_height="wrap_content" - android:background="?colorSurface" + android:background="?vctr_toolbar_background" android:clickable="true" android:focusable="true" android:foreground="?attr/selectableItemBackground"