diff --git a/vector/src/main/java/im/vector/app/core/resources/ColorProvider.kt b/vector/src/main/java/im/vector/app/core/resources/ColorProvider.kt index 677c469b7c..e33a89c972 100644 --- a/vector/src/main/java/im/vector/app/core/resources/ColorProvider.kt +++ b/vector/src/main/java/im/vector/app/core/resources/ColorProvider.kt @@ -29,12 +29,15 @@ class ColorProvider @Inject constructor(val context: Context) { @ColorInt fun getColor(@ColorRes colorRes: Int): Int { + return ContextCompat.getColor(context, colorRes) + /* return when(colorRes) { R.color.riotx_accent -> getColorFromAttribute(R.attr.colorAccent) R.color.riotx_positive_accent -> getColorFromAttribute(R.attr.riotx_positive_accent) R.color.riotx_positive_accent_alpha12 -> getColorFromAttribute(R.attr.riotx_positive_accent_alpha12) else -> ContextCompat.getColor(context, colorRes) } + */ } /** diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt index 5067effe84..ff9f86d6bc 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt @@ -648,7 +648,7 @@ abstract class AbsMessageItem : AbsBaseMessageItem private fun removeFooterOverlayStyle(holder: H, density: Float) { holder.bubbleFootView.background = null - tintFooter(holder, ThemeUtils.getColor(holder.bubbleFootView.context, R.attr.riotx_text_secondary)) + tintFooter(holder, ThemeUtils.getColor(holder.bubbleFootView.context, R.attr.vctr_content_secondary)) holder.bubbleFootView.setPaddingRelative( 0, round(4*density).toInt(), diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsEpoxyController.kt b/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsEpoxyController.kt index 0fa91ac332..aea17e907a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsEpoxyController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsEpoxyController.kt @@ -63,7 +63,7 @@ class RoomListQuickActionsEpoxyController @Inject constructor( if (vectorPreferences.labAllowMarkUnread()) { // Mark read/unread - dividerItem { + bottomSheetDividerItem { id("mark_unread_separator") } if (roomSummary.scIsUnread(scSdkPreferences)) { diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt index d7fc324f52..f9c52758a7 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt @@ -110,8 +110,8 @@ class CreateRoomController @Inject constructor( id("alias") enabled(enableFormElement) value(viewState.roomVisibilityType.aliasLocalPart) - suffixText(":" + viewState.homeServerName) - prefixText("#") + //suffixText(":" + viewState.homeServerName) + //prefixText("#") hint(host.stringProvider.getString(R.string.room_alias_address_hint)) errorMessage( host.roomAliasErrorFormatter.format( diff --git a/vector/src/main/java/im/vector/app/features/themes/ThemeUtils.kt b/vector/src/main/java/im/vector/app/features/themes/ThemeUtils.kt index 05b7438636..7f2cab15a5 100644 --- a/vector/src/main/java/im/vector/app/features/themes/ThemeUtils.kt +++ b/vector/src/main/java/im/vector/app/features/themes/ThemeUtils.kt @@ -308,10 +308,8 @@ object ThemeUtils { color.data } catch (e: Exception) { when (colorAttribute) { - android.R.attr.colorAccent -> ContextCompat.getColor(c, R.color.riotx_accent) - R.attr.colorAccent -> ContextCompat.getColor(c, R.color.riotx_accent) - R.attr.riotx_positive_accent -> ContextCompat.getColor(c, R.color.riotx_positive_accent) - R.attr.riotx_positive_accent_alpha12 -> ContextCompat.getColor(c, R.color.riotx_positive_accent_alpha12) + android.R.attr.colorAccent -> ContextCompat.getColor(c, R.color.accent_sc) + R.attr.colorAccent -> ContextCompat.getColor(c, R.color.accent_sc) else -> { Timber.e(e, "Unable to get color") ContextCompat.getColor(c, android.R.color.holo_red_dark) diff --git a/vector/src/main/res/color/button_background_tint_selector.xml b/vector/src/main/res/color/button_background_tint_selector.xml index 57135b1eb9..7b903c3c76 100644 --- a/vector/src/main/res/color/button_background_tint_selector.xml +++ b/vector/src/main/res/color/button_background_tint_selector.xml @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/vector/src/main/res/color/button_background_tint_selector_sc.xml b/vector/src/main/res/color/button_background_tint_selector_sc.xml deleted file mode 100644 index 88d99bc59e..0000000000 --- a/vector/src/main/res/color/button_background_tint_selector_sc.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/vector/src/main/res/layout/fragment_attachments_preview.xml b/vector/src/main/res/layout/fragment_attachments_preview.xml index 894a19ee78..32eca864a7 100644 --- a/vector/src/main/res/layout/fragment_attachments_preview.xml +++ b/vector/src/main/res/layout/fragment_attachments_preview.xml @@ -68,7 +68,7 @@ android:layout_margin="16dp" android:contentDescription="@string/send" android:src="@drawable/ic_send" - app:tint="?attr/riotx_text_primary" + app:tint="?vctr_content_primary" app:layout_constraintBottom_toTopOf="@id/attachmentPreviewerBottomContainer" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@id/attachmentPreviewerBottomContainer" /> diff --git a/vector/src/main/res/layout/fragment_login_server_selection.xml b/vector/src/main/res/layout/fragment_login_server_selection.xml index 45419196ce..2d8da95689 100644 --- a/vector/src/main/res/layout/fragment_login_server_selection.xml +++ b/vector/src/main/res/layout/fragment_login_server_selection.xml @@ -64,7 +64,7 @@ android:gravity="start" android:text="@string/login_connect_using_matrix_id_title_sc" android:textAppearance="@style/TextAppearance.Vector.Login.Text" - android:textColor="?riotx_text_primary" + android:textColor="?vctr_content_primary" android:textSize="16sp" app:layout_constraintBottom_toTopOf="@+id/loginServerIKnowMyIdSubmitText" app:layout_constraintStart_toStartOf="parent" @@ -107,7 +107,7 @@ android:gravity="start" android:text="@string/login_server_other_title_sc" android:textAppearance="@style/TextAppearance.Vector.Login.Text" - android:textColor="?riotx_text_primary" + android:textColor="?vctr_content_primary" android:textSize="16sp" app:layout_constraintBottom_toTopOf="@+id/loginServerChoiceOtherText" app:layout_constraintStart_toStartOf="parent" diff --git a/vector/src/main/res/layout/fragment_prompt_simplified_mode.xml b/vector/src/main/res/layout/fragment_prompt_simplified_mode.xml index 9fea5e73c3..8751eb1f32 100644 --- a/vector/src/main/res/layout/fragment_prompt_simplified_mode.xml +++ b/vector/src/main/res/layout/fragment_prompt_simplified_mode.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?riotx_background"> + android:background="?android:colorBackground"> @@ -65,7 +65,7 @@ android:gravity="start" android:text="@string/prompt_simplified_mode_on" android:textAppearance="@style/TextAppearance.Vector.Login.Text" - android:textColor="?riotx_text_primary" + android:textColor="?vctr_content_primary" android:textSize="16sp" app:layout_constraintBottom_toTopOf="@+id/promptSimplifiedModeOnText" app:layout_constraintStart_toStartOf="parent" @@ -109,7 +109,7 @@ android:gravity="start" android:text="@string/prompt_simplified_mode_off" android:textAppearance="@style/TextAppearance.Vector.Login.Text" - android:textColor="?riotx_text_primary" + android:textColor="?vctr_content_primary" android:textSize="16sp" app:layout_constraintBottom_toTopOf="@+id/promptSimplifiedModeOffText" app:layout_constraintStart_toStartOf="parent" diff --git a/vector/src/main/res/layout/fragment_room_detail.xml b/vector/src/main/res/layout/fragment_room_detail.xml index 705cbd47be..bd8b97fb02 100644 --- a/vector/src/main/res/layout/fragment_room_detail.xml +++ b/vector/src/main/res/layout/fragment_room_detail.xml @@ -227,7 +227,7 @@ android:src="@drawable/ic_expand_more" app:backgroundTint="?android:colorAccent" app:badgeBackgroundColor="?colorAccent" - app:badgeTextColor="@color/white" + app:badgeTextColor="@android:color/white" app:badgeTextPadding="2dp" app:badgeTextSize="10sp" app:layout_constraintBottom_toTopOf="@id/badgeBarrier" diff --git a/vector/src/main/res/layout/item_room.xml b/vector/src/main/res/layout/item_room.xml index e11b8baf45..6cd1b382e3 100644 --- a/vector/src/main/res/layout/item_room.xml +++ b/vector/src/main/res/layout/item_room.xml @@ -83,7 +83,7 @@ app:layout_constraintCircle="@id/roomAvatarContainer" app:layout_constraintCircleAngle="135" app:layout_constraintCircleRadius="28dp" - app:tint="?riotx_text_secondary" + app:tint="?vctr_content_secondary" tools:ignore="MissingConstraints,MissingPrefix" tools:visibility="visible" /> 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 dbb0ffc6e3..cae9710b40 100644 --- a/vector/src/main/res/layout/item_timeline_event_base.xml +++ b/vector/src/main/res/layout/item_timeline_event_base.xml @@ -110,7 +110,7 @@ android:layout_toStartOf="@id/bubbleMessageTimeView" android:ellipsize="end" android:maxLines="1" - android:textColor="?riotx_text_primary" + android:textColor="?vctr_content_primary" android:textSize="15sp" android:textStyle="bold" tools:text="@sample/matrix.json/data/displayName" /> @@ -123,7 +123,7 @@ android:layout_alignEnd="@id/viewStubContainer" android:layout_marginBottom="4dp" android:maxLines="1" - android:textColor="?riotx_text_secondary" + android:textColor="?vctr_content_secondary" android:textSize="12sp" tools:text="@tools:sample/date/hhmm" /> @@ -198,7 +198,7 @@ android:layout_marginStart="8dp" android:layout_marginEnd="0dp" android:maxLines="1" - android:textColor="?riotx_text_secondary" + android:textColor="?vctr_content_secondary" android:textSize="12sp" tools:text="@tools:sample/date/hhmm" /> --> @@ -222,7 +222,7 @@ android:paddingStart="4dp" android:paddingEnd="0dp" android:maxLines="1" - tools:textColor="?riotx_text_secondary" + tools:textColor="?vctr_content_secondary" android:textSize="12sp" android:layout_gravity="bottom" tools:text="@tools:sample/date/hhmm" /> @@ -236,7 +236,7 @@ android:paddingStart="4dp" android:paddingEnd="0dp" android:layout_gravity="bottom" - tools:tint="?riotx_text_secondary" + tools:tint="?vctr_content_secondary" tools:src="@drawable/ic_processing_msg" android:contentDescription="@string/footer_read_receipt_content_description" /> diff --git a/vector/src/main/res/values-v23/theme_sc.xml b/vector/src/main/res/values-v23/theme_sc.xml index 5bf8307c7b..bd2aca8466 100644 --- a/vector/src/main/res/values-v23/theme_sc.xml +++ b/vector/src/main/res/values-v23/theme_sc.xml @@ -18,7 +18,7 @@ diff --git a/vector/src/main/res/values/attrs_sc.xml b/vector/src/main/res/values/attrs_sc.xml index 6e672c8b34..e39c6de7e2 100644 --- a/vector/src/main/res/values/attrs_sc.xml +++ b/vector/src/main/res/values/attrs_sc.xml @@ -7,8 +7,6 @@ - - diff --git a/vector/src/main/res/values/styles_login.xml b/vector/src/main/res/values/styles_login.xml index 8d2e969738..50ca381791 100644 --- a/vector/src/main/res/values/styles_login.xml +++ b/vector/src/main/res/values/styles_login.xml @@ -35,12 +35,12 @@ 32dp - - diff --git a/vector/src/main/res/values/styles_sc.xml b/vector/src/main/res/values/styles_sc.xml index 76acccaab1..71d0272a99 100644 --- a/vector/src/main/res/values/styles_sc.xml +++ b/vector/src/main/res/values/styles_sc.xml @@ -1,24 +1,19 @@ - - - - - - diff --git a/vector/src/main/res/values/theme_dark.xml b/vector/src/main/res/values/theme_dark.xml index c7f71b99b4..2e9aaf2d48 100644 --- a/vector/src/main/res/values/theme_dark.xml +++ b/vector/src/main/res/values/theme_dark.xml @@ -129,10 +129,8 @@ #FF465561 #ff343b47 - @color/riotx_positive_accent - @color/riotx_positive_accent_alpha12 - ?riotx_background - @color/riotx_unread_room_badge_dark + ?android:colorBackground + @color/vctr_unread_room_badge_dark @color/timestamp_overlay_fg @color/timestamp_overlay_bg @color/element_accent_pale diff --git a/vector/src/main/res/values/theme_light.xml b/vector/src/main/res/values/theme_light.xml index be2cf04711..1dce893a68 100644 --- a/vector/src/main/res/values/theme_light.xml +++ b/vector/src/main/res/values/theme_light.xml @@ -17,7 +17,7 @@ @color/vctr_home_drawer_header_background_light - @color/vctr_unread_room_badge_light + ?colorPrimary @color/vctr_fab_label_bg_light @color/vctr_fab_label_stroke_light @color/vctr_fab_label_color_light @@ -129,10 +129,8 @@ #FFEEEEEE #FFDDDDDD - @color/riotx_positive_accent - @color/riotx_positive_accent_alpha12 - ?riotx_background - @color/riotx_unread_room_badge_light + ?android:colorBackground + @color/vctr_unread_room_badge_light @color/timestamp_overlay_fg @color/timestamp_overlay_bg @color/element_accent_pale diff --git a/vector/src/main/res/values/theme_sc.xml b/vector/src/main/res/values/theme_sc.xml index 0b5db039fe..b56e596c96 100644 --- a/vector/src/main/res/values/theme_sc.xml +++ b/vector/src/main/res/values/theme_sc.xml @@ -3,134 +3,82 @@