From 94c91e0dae32c4d64edc381362d884f630712596 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 5 Jun 2019 15:58:00 +0200 Subject: [PATCH] Theme rework WIP --- .../main/res/layout/adapter_item_action.xml | 5 ++- .../adapter_item_action_quick_reaction.xml | 2 + .../main/res/layout/fragment_home_drawer.xml | 4 +- .../src/main/res/layout/item_public_room.xml | 11 +++--- vector/src/main/res/layout/item_room.xml | 2 +- .../main/res/layout/item_room_category.xml | 2 +- .../main/res/layout/item_room_directory.xml | 6 +-- .../res/layout/item_timeline_event_base.xml | 3 +- .../item_timeline_event_day_separator.xml | 7 ++-- .../item_timeline_event_text_message_stub.xml | 2 +- .../main/res/layout/vector_invite_view.xml | 1 - vector/src/main/res/layout/view_state.xml | 9 ++--- .../src/main/res/values-v21/theme_black.xml | 7 +++- vector/src/main/res/values-v21/theme_dark.xml | 7 +++- .../src/main/res/values-v23/theme_black.xml | 10 +++++ vector/src/main/res/values-v23/theme_dark.xml | 10 +++++ .../src/main/res/values-v23/theme_light.xml | 5 --- .../src/main/res/values-v27/theme_black.xml | 10 +++++ vector/src/main/res/values/colors.xml | 2 - vector/src/main/res/values/theme_black.xml | 21 ++++++++++ vector/src/main/res/values/theme_dark.xml | 19 ++++++++++ vector/src/main/res/values/theme_light.xml | 38 +++++++++---------- 22 files changed, 128 insertions(+), 55 deletions(-) create mode 100644 vector/src/main/res/values-v23/theme_black.xml create mode 100644 vector/src/main/res/values-v23/theme_dark.xml create mode 100644 vector/src/main/res/values-v27/theme_black.xml diff --git a/vector/src/main/res/layout/adapter_item_action.xml b/vector/src/main/res/layout/adapter_item_action.xml index ce518071..03d2f811 100644 --- a/vector/src/main/res/layout/adapter_item_action.xml +++ b/vector/src/main/res/layout/adapter_item_action.xml @@ -21,8 +21,8 @@ android:layout_gravity="center_vertical" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" - tools:src="@drawable/ic_delete" - android:tint="?android:attr/textColorTertiary" /> + android:tint="?riotx_text_secondary" + tools:src="@drawable/ic_delete" /> diff --git a/vector/src/main/res/layout/adapter_item_action_quick_reaction.xml b/vector/src/main/res/layout/adapter_item_action_quick_reaction.xml index fef7b0ee..272f89a6 100644 --- a/vector/src/main/res/layout/adapter_item_action_quick_reaction.xml +++ b/vector/src/main/res/layout/adapter_item_action_quick_reaction.xml @@ -52,6 +52,7 @@ android:layout_marginTop="4dp" android:text="@string/reactions_agree" android:textAlignment="center" + android:textColor="?riotx_text_secondary" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/center_guideline" @@ -108,6 +109,7 @@ android:layout_height="wrap_content" android:text="@string/reactions_like" android:textAlignment="center" + android:textColor="?riotx_text_secondary" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="@id/quick_react_agree_text" app:layout_constraintEnd_toEndOf="parent" diff --git a/vector/src/main/res/layout/fragment_home_drawer.xml b/vector/src/main/res/layout/fragment_home_drawer.xml index 7e7caf9c..4bffe6fe 100644 --- a/vector/src/main/res/layout/fragment_home_drawer.xml +++ b/vector/src/main/res/layout/fragment_home_drawer.xml @@ -11,7 +11,7 @@ android:id="@+id/homeDrawerHeader" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/dark_two" + android:background="?riotx_base" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> @@ -72,7 +72,7 @@ android:id="@+id/homeDrawerGroupListContainer" android:layout_width="0dp" android:layout_height="0dp" - android:background="#FAFAFA" + android:background="?riotx_header_panel_background" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/vector/src/main/res/layout/item_public_room.xml b/vector/src/main/res/layout/item_public_room.xml index 16835388..9d670fc1 100644 --- a/vector/src/main/res/layout/item_public_room.xml +++ b/vector/src/main/res/layout/item_public_room.xml @@ -32,7 +32,7 @@ android:layout_marginRight="16dp" android:ellipsize="end" android:maxLines="2" - android:textColor="#2E2F3E" + android:textColor="?riotx_text_primary" android:textSize="15sp" android:textStyle="bold" app:layout_constraintBottom_toTopOf="@+id/itemPublicRoomMembersCount" @@ -52,9 +52,10 @@ android:drawableStart="@drawable/ic_user" android:drawableLeft="@drawable/ic_user" android:drawablePadding="8dp" + android:drawableTint="?riotx_text_secondary" android:gravity="center_vertical" android:minWidth="56dp" - android:textColor="#7E899C" + android:textColor="?riotx_text_secondary" android:textSize="15sp" app:layout_constraintBottom_toTopOf="@+id/itemPublicRoomTopic" app:layout_constraintStart_toStartOf="@+id/itemPublicRoomName" @@ -72,7 +73,7 @@ android:maxLines="1" android:minWidth="40dp" android:singleLine="true" - android:textColor="#7E899C" + android:textColor="?riotx_text_secondary" android:textSize="15sp" app:layout_constraintBaseline_toBaselineOf="@+id/itemPublicRoomMembersCount" app:layout_constraintEnd_toStartOf="@+id/itemPublicRoomButtonState" @@ -89,7 +90,7 @@ android:gravity="center_vertical" android:maxLines="1" android:singleLine="true" - android:textColor="#2E2F3E" + android:textColor="?riotx_text_primary" android:textSize="15sp" android:visibility="gone" app:layout_constraintBottom_toTopOf="@+id/itemPublicRoomBottomSeparator" @@ -116,7 +117,7 @@ android:id="@+id/itemPublicRoomBottomSeparator" android:layout_width="0dp" android:layout_height="1dp" - android:background="#E9EDF1" + android:background="?riotx_header_panel_border_mobile" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> diff --git a/vector/src/main/res/layout/item_room.xml b/vector/src/main/res/layout/item_room.xml index f8b99b75..d8bcfa29 100644 --- a/vector/src/main/res/layout/item_room.xml +++ b/vector/src/main/res/layout/item_room.xml @@ -120,7 +120,7 @@ android:id="@+id/roomDividerView" android:layout_width="0dp" android:layout_height="1dp" - android:background="#1e000000" + android:background="?riotx_header_panel_border_mobile" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/vector/src/main/res/layout/item_room_category.xml b/vector/src/main/res/layout/item_room_category.xml index b5559e1f..26338d9b 100644 --- a/vector/src/main/res/layout/item_room_category.xml +++ b/vector/src/main/res/layout/item_room_category.xml @@ -28,7 +28,7 @@ android:ellipsize="end" android:gravity="center_vertical" android:maxLines="1" - android:textColor="#7E899C" + android:textColor="?riotx_text_secondary" android:textSize="14sp" tools:text="@string/room_participants_header_direct_chats" /> diff --git a/vector/src/main/res/layout/item_room_directory.xml b/vector/src/main/res/layout/item_room_directory.xml index edaea71d..6babf515 100644 --- a/vector/src/main/res/layout/item_room_directory.xml +++ b/vector/src/main/res/layout/item_room_directory.xml @@ -32,7 +32,7 @@ android:ellipsize="end" android:lines="1" android:maxLines="2" - android:textColor="#2E2F3E" + android:textColor="?riotx_text_primary" android:textSize="15sp" android:textStyle="bold" app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryDescription" @@ -51,7 +51,7 @@ android:ellipsize="end" android:lines="1" android:maxLines="2" - android:textColor="#2E2F3E" + android:textColor="?riotx_text_primary" android:textSize="15sp" app:layout_constraintBottom_toTopOf="@+id/itemRoomDirectoryBottomSeparator" app:layout_constraintEnd_toEndOf="parent" @@ -63,7 +63,7 @@ android:id="@+id/itemRoomDirectoryBottomSeparator" android:layout_width="0dp" android:layout_height="1dp" - android:background="#E9EDF1" + android:background="?riotx_header_panel_border_mobile" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> diff --git a/vector/src/main/res/layout/item_timeline_event_base.xml b/vector/src/main/res/layout/item_timeline_event_base.xml index becff2a8..bf566731 100644 --- a/vector/src/main/res/layout/item_timeline_event_base.xml +++ b/vector/src/main/res/layout/item_timeline_event_base.xml @@ -36,6 +36,7 @@ android:layout_marginRight="8dp" android:ellipsize="end" android:maxLines="1" + android:textColor="?riotx_text_primary" android:textSize="15sp" android:textStyle="bold" app:layout_constrainedWidth="true" @@ -53,7 +54,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" - android:textColor="@color/brown_grey" + android:textColor="?riotx_text_secondary" android:textSize="12sp" app:layout_constraintBaseline_toBaselineOf="@id/messageMemberNameView" app:layout_constraintEnd_toEndOf="parent" diff --git a/vector/src/main/res/layout/item_timeline_event_day_separator.xml b/vector/src/main/res/layout/item_timeline_event_day_separator.xml index c05bd80b..81e94fd6 100644 --- a/vector/src/main/res/layout/item_timeline_event_day_separator.xml +++ b/vector/src/main/res/layout/item_timeline_event_day_separator.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?riotx_background" android:padding="8dp"> diff --git a/vector/src/main/res/layout/vector_invite_view.xml b/vector/src/main/res/layout/vector_invite_view.xml index 0a6a8cf6..604d1fe6 100644 --- a/vector/src/main/res/layout/vector_invite_view.xml +++ b/vector/src/main/res/layout/vector_invite_view.xml @@ -79,7 +79,6 @@ android:layout_marginStart="4dp" android:layout_marginLeft="4dp" android:minWidth="120dp" - android:background="#341DDD" android:text="@string/accept" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_chainStyle="packed" diff --git a/vector/src/main/res/layout/view_state.xml b/vector/src/main/res/layout/view_state.xml index 83f9424d..1350fd78 100644 --- a/vector/src/main/res/layout/view_state.xml +++ b/vector/src/main/res/layout/view_state.xml @@ -28,7 +28,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" - android:textColor="@android:color/black" + android:textColor="?riotx_text_primary" android:textSize="16sp" tools:text="Une erreur est survenue" /> @@ -39,8 +39,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="8dp" - android:text="@string/global_retry" - android:textColor="@android:color/white" /> + android:text="@string/global_retry" /> @@ -60,7 +59,7 @@ android:layout_gravity="center_horizontal" android:layout_marginBottom="49dp" android:gravity="center" - android:textColor="#2E2F32" + android:textColor="?riotx_text_primary" android:textSize="15sp" android:textStyle="bold" app:layout_constraintBottom_toTopOf="@+id/emptyImageView" @@ -86,7 +85,7 @@ android:layout_gravity="center" android:layout_marginTop="49dp" android:gravity="center" - android:textColor="#7E899C" + android:textColor="?riotx_text_secondary" android:textSize="14sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/vector/src/main/res/values-v21/theme_black.xml b/vector/src/main/res/values-v21/theme_black.xml index c65d72b9..5ab2ed89 100644 --- a/vector/src/main/res/values-v21/theme_black.xml +++ b/vector/src/main/res/values-v21/theme_black.xml @@ -1,11 +1,14 @@ - + + + + + + + +