Expose and theme some upstream colors concerning video conferences
Change-Id: I8ed960c119c2b87a9e8af0bce60bbf60034f5a61
This commit is contained in:
parent
dc2f9f883e
commit
1b8874e8cb
|
@ -7,6 +7,7 @@
|
||||||
<attr name="sc_message_bg_outgoing" format="color" />
|
<attr name="sc_message_bg_outgoing" format="color" />
|
||||||
|
|
||||||
<attr name="colorAccentPale" format="color" />
|
<attr name="colorAccentPale" format="color" />
|
||||||
|
<attr name="backgroundColorLight" format="color" />
|
||||||
|
|
||||||
<attr name="riotx_unread_unimportant_room_badge" format="color" />
|
<attr name="riotx_unread_unimportant_room_badge" format="color" />
|
||||||
|
|
||||||
|
@ -28,6 +29,8 @@
|
||||||
<attr name="user_color_pl_0" format="color" />
|
<attr name="user_color_pl_0" format="color" />
|
||||||
|
|
||||||
<attr name="verification_request_background" format="color" />
|
<attr name="verification_request_background" format="color" />
|
||||||
|
<attr name="conference_animation_from" format="color" />
|
||||||
|
<attr name="conference_animation_to" format="color" />
|
||||||
|
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,9 @@
|
||||||
<item name="user_color_pl_100">@color/user_color_element_pl_100</item>
|
<item name="user_color_pl_100">@color/user_color_element_pl_100</item>
|
||||||
<item name="voice_message_playback_background_color">?vctr_content_quinary</item>
|
<item name="voice_message_playback_background_color">?vctr_content_quinary</item>
|
||||||
<item name="verification_request_background">?vctr_notice_secondary</item>
|
<item name="verification_request_background">?vctr_notice_secondary</item>
|
||||||
|
<item name="backgroundColorLight">@color/element_background_light</item>
|
||||||
|
<item name="conference_animation_from">@color/palette_element_green</item>
|
||||||
|
<item name="conference_animation_to">@color/join_conference_animated_color</item>
|
||||||
|
|
||||||
<item name="android:statusBarColor">@color/android_status_bar_background_dark</item>
|
<item name="android:statusBarColor">@color/android_status_bar_background_dark</item>
|
||||||
<item name="android:navigationBarColor">@color/android_navigation_bar_background_dark</item>
|
<item name="android:navigationBarColor">@color/android_navigation_bar_background_dark</item>
|
||||||
|
|
|
@ -135,6 +135,9 @@
|
||||||
<item name="user_color_pl_100">@color/user_color_element_pl_100</item>
|
<item name="user_color_pl_100">@color/user_color_element_pl_100</item>
|
||||||
<item name="voice_message_playback_background_color">?vctr_content_quinary</item>
|
<item name="voice_message_playback_background_color">?vctr_content_quinary</item>
|
||||||
<item name="verification_request_background">?vctr_notice_secondary</item>
|
<item name="verification_request_background">?vctr_notice_secondary</item>
|
||||||
|
<item name="backgroundColorLight">@color/element_background_light</item>
|
||||||
|
<item name="conference_animation_from">@color/palette_element_green</item>
|
||||||
|
<item name="conference_animation_to">@color/join_conference_animated_color</item>
|
||||||
|
|
||||||
<!-- Use dark color, to have enough contrast with icons color. windowLightStatusBar is only available in API 23+ -->
|
<!-- Use dark color, to have enough contrast with icons color. windowLightStatusBar is only available in API 23+ -->
|
||||||
<item name="android:statusBarColor">@color/android_status_bar_background_dark</item>
|
<item name="android:statusBarColor">@color/android_status_bar_background_dark</item>
|
||||||
|
|
|
@ -97,6 +97,9 @@
|
||||||
<item name="user_color_pl_100">@color/user_color_sc_pl_100</item>
|
<item name="user_color_pl_100">@color/user_color_sc_pl_100</item>
|
||||||
<item name="voice_message_playback_background_color">#1fffffff</item>
|
<item name="voice_message_playback_background_color">#1fffffff</item>
|
||||||
<item name="verification_request_background">?colorBackgroundFloating</item>
|
<item name="verification_request_background">?colorBackgroundFloating</item>
|
||||||
|
<item name="backgroundColorLight">@color/background_sc_light</item>
|
||||||
|
<item name="conference_animation_from">?colorAccent</item>
|
||||||
|
<item name="conference_animation_to">?colorAccentPale</item>
|
||||||
|
|
||||||
<item name="android:statusBarColor">@color/background_black_sc</item>
|
<item name="android:statusBarColor">@color/background_black_sc</item>
|
||||||
<item name="android:navigationBarColor">@color/background_black_sc</item>
|
<item name="android:navigationBarColor">@color/background_black_sc</item>
|
||||||
|
|
|
@ -96,6 +96,9 @@
|
||||||
<item name="user_color_pl_95">@color/user_color_sc_pl_95</item>
|
<item name="user_color_pl_95">@color/user_color_sc_pl_95</item>
|
||||||
<item name="user_color_pl_100">@color/user_color_sc_pl_100</item>
|
<item name="user_color_pl_100">@color/user_color_sc_pl_100</item>
|
||||||
<item name="voice_message_playback_background_color">#1f000000</item>
|
<item name="voice_message_playback_background_color">#1f000000</item>
|
||||||
|
<item name="backgroundColorLight">@color/background_sc_light</item>
|
||||||
|
<item name="conference_animation_from">?colorAccent</item>
|
||||||
|
<item name="conference_animation_to">?colorAccentPale</item>
|
||||||
|
|
||||||
<item name="android:statusBarColor">@color/background_black_sc</item>
|
<item name="android:statusBarColor">@color/background_black_sc</item>
|
||||||
<item name="android:navigationBarColor">@color/background_black_sc</item>
|
<item name="android:navigationBarColor">@color/background_black_sc</item>
|
||||||
|
|
|
@ -11,6 +11,7 @@ require_clean_git
|
||||||
# Color corrections | TODO more?
|
# Color corrections | TODO more?
|
||||||
sed -i 's|"@color/riotx_accent"|"?colorAccent"|g' vector/src/*/res/layout/*
|
sed -i 's|"@color/riotx_accent"|"?colorAccent"|g' vector/src/*/res/layout/*
|
||||||
sed -i 's|"@style/VectorButtonStyle"|"?materialButtonStyle"|g' vector/src/*/res/layout/*
|
sed -i 's|"@style/VectorButtonStyle"|"?materialButtonStyle"|g' vector/src/*/res/layout/*
|
||||||
|
sed -i 's|"@color/element_background_light"|"?backgroundColorLight"|g' vector/src/*/res/layout/*
|
||||||
uncommitted=`git status --porcelain`
|
uncommitted=`git status --porcelain`
|
||||||
if [ -z "$uncommitted" ]; then
|
if [ -z "$uncommitted" ]; then
|
||||||
echo "Seems like colors are still fine :)"
|
echo "Seems like colors are still fine :)"
|
||||||
|
|
|
@ -23,9 +23,9 @@ import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.core.content.ContextCompat
|
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.databinding.ViewJoinConferenceBinding
|
import im.vector.app.databinding.ViewJoinConferenceBinding
|
||||||
|
import im.vector.app.features.themes.ThemeUtils
|
||||||
|
|
||||||
class JoinConferenceView @JvmOverloads constructor(
|
class JoinConferenceView @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
|
@ -46,8 +46,8 @@ class JoinConferenceView @JvmOverloads constructor(
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
views = ViewJoinConferenceBinding.bind(this)
|
views = ViewJoinConferenceBinding.bind(this)
|
||||||
views?.joinConferenceButton?.setOnClickListener { onJoinClicked?.invoke() }
|
views?.joinConferenceButton?.setOnClickListener { onJoinClicked?.invoke() }
|
||||||
val colorFrom = ContextCompat.getColor(context, R.color.palette_element_green)
|
val colorFrom = ThemeUtils.getColor(context, R.attr.conference_animation_from)
|
||||||
val colorTo = ContextCompat.getColor(context, R.color.join_conference_animated_color)
|
val colorTo = ThemeUtils.getColor(context, R.attr.conference_animation_to)
|
||||||
// Animate button color to highlight
|
// Animate button color to highlight
|
||||||
backgroundAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply {
|
backgroundAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply {
|
||||||
repeatMode = ValueAnimator.REVERSE
|
repeatMode = ValueAnimator.REVERSE
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
android:layout_height="@dimen/call_pip_height"
|
android:layout_height="@dimen/call_pip_height"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@color/element_background_light"
|
android:background="?backgroundColorLight"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:foreground="?attr/selectableItemBackground"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardBackgroundColor="@color/bg_call_screen"
|
app:cardBackgroundColor="@color/bg_call_screen"
|
||||||
|
@ -105,14 +105,14 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navigationIcon="@drawable/ic_back_24dp"
|
app:navigationIcon="@drawable/ic_back_24dp"
|
||||||
app:navigationIconTint="@color/element_background_light"
|
app:navigationIconTint="?backgroundColorLight"
|
||||||
app:subtitle="3:10"
|
app:subtitle="3:10"
|
||||||
app:subtitleTextAppearance="@style/TextAppearance.Vector.Caption"
|
app:subtitleTextAppearance="@style/TextAppearance.Vector.Caption"
|
||||||
app:subtitleTextColor="@color/element_background_light"
|
app:subtitleTextColor="?backgroundColorLight"
|
||||||
app:title="Video call"
|
app:title="Video call"
|
||||||
app:titleMarginTop="16dp"
|
app:titleMarginTop="16dp"
|
||||||
app:titleTextAppearance="@style/TextAppearance.Vector.Body.Medium"
|
app:titleTextAppearance="@style/TextAppearance.Vector.Body.Medium"
|
||||||
app:titleTextColor="@color/element_background_light" />
|
app:titleTextColor="?backgroundColorLight" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/otherMemberAvatar"
|
android:id="@+id/otherMemberAvatar"
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
android:textColor="?vctr_content_secondary"
|
android:textColor="?vctr_content_secondary"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
|
app:drawableTint="?vctr_content_secondary"
|
||||||
tools:drawableLeft="@drawable/ic_missed_video_call"
|
tools:drawableLeft="@drawable/ic_missed_video_call"
|
||||||
tools:text="@string/call_tile_video_incoming" />
|
tools:text="@string/call_tile_video_incoming" />
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,6 @@
|
||||||
app:icon="@drawable/ic_call_video_small"
|
app:icon="@drawable/ic_call_video_small"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconTint="@color/element_background_light" />
|
app:iconTint="?backgroundColorLight" />
|
||||||
|
|
||||||
</merge>
|
</merge>
|
Loading…
Reference in New Issue