Merge pull request #4470 from vector-im/feature/bma/clean_style

Clean up styles
This commit is contained in:
Benoit Marty 2021-11-15 17:45:21 +01:00 committed by GitHub
commit 6ce5b19b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 48 additions and 47 deletions

View file

@ -1 +1 @@
Poll Feature - Create Poll Screen Poll Feature - Create Poll Screen (Disabled for now)

View file

@ -129,9 +129,9 @@
<color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color> <color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color>
<color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color> <color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color>
<attr name="vctr_voice_message_toast_background" format="color" /> <attr name="vctr_toast_background" format="color" />
<color name="vctr_voice_message_toast_background_light">@color/palette_black_900</color> <color name="vctr_toast_background_light">@color/palette_black_900</color>
<color name="vctr_voice_message_toast_background_dark">@color/palette_gray_400</color> <color name="vctr_toast_background_dark">@color/palette_gray_400</color>
<!-- Presence Indicator colors --> <!-- Presence Indicator colors -->
<attr name="vctr_presence_indicator_offline" format="color" /> <attr name="vctr_presence_indicator_offline" format="color" />

View file

@ -10,6 +10,11 @@
<item name="lineHeight">24sp</item> <item name="lineHeight">24sp</item>
</style> </style>
<style name="Widget.Vector.Button.CallToAction" parent="Widget.Vector.Button">
<item name="android:backgroundTint">@color/button_background_tint_selector</item>
<item name="android:textColor">@android:color/white</item>
</style>
<style name="Widget.Vector.Button.Destructive"> <style name="Widget.Vector.Button.Destructive">
<item name="android:minWidth">94dp</item> <item name="android:minWidth">94dp</item>
<item name="materialThemeOverlay">@style/VectorMaterialThemeOverlayDestructive</item> <item name="materialThemeOverlay">@style/VectorMaterialThemeOverlayDestructive</item>

View file

@ -1,14 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Default style for TextInputLayout -->
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
<style name="Widget.Vector.TextInputLayout.Password">
<item name="endIconMode">password_toggle</item>
<item name="endIconTint">?vctr_content_secondary</item>
</style>
<style name="Widget.Vector.EditText.Composer" parent="Widget.AppCompat.EditText"> <style name="Widget.Vector.EditText.Composer" parent="Widget.AppCompat.EditText">
<item name="android:background">@android:color/transparent</item> <item name="android:background">@android:color/transparent</item>
<item name="android:inputType">textCapSentences|textMultiLine</item> <item name="android:inputType">textCapSentences|textMultiLine</item>
@ -19,9 +11,4 @@
<item name="android:textColor">?vctr_message_text_color</item> <item name="android:textColor">?vctr_message_text_color</item>
</style> </style>
<style name="Widget.Vector.EditText.Form" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxStrokeColor">@color/form_edit_text_stroke_color_selector</item>
<item name="android:textColorHint">@color/form_edit_text_hint_color_selector</item>
</style>
</resources> </resources>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.Vector.Button.CreatePoll" parent="Widget.Vector.Button">
<item name="android:backgroundTint">@color/button_background_tint_selector</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Button</item>
<item name="android:textColor">@android:color/white</item>
</style>
</resources>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Default style for TextInputLayout -->
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
<style name="Widget.Vector.TextInputLayout.Password">
<item name="endIconMode">password_toggle</item>
<item name="endIconTint">?vctr_content_secondary</item>
</style>
<style name="Widget.Vector.TextInputLayout.Form">
<item name="boxStrokeColor">@color/form_edit_text_stroke_color_selector</item>
<item name="android:textColorHint">@color/form_edit_text_hint_color_selector</item>
</style>
</resources>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.Vector.TextView.Caption.Toast">
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:paddingStart">12dp</item>
<item name="android:paddingEnd">12dp</item>
<item name="android:background">@drawable/bg_round_corner_8dp</item>
<item name="android:backgroundTint">?vctr_toast_background</item>
<item name="android:textColor">@color/palette_white</item>
<item name="android:gravity">center</item>
</style>
</resources>

View file

@ -12,15 +12,4 @@
<item name="direction">rightToLeft</item> <item name="direction">rightToLeft</item>
</style> </style>
<style name="Widget.Vector.TextView.Caption.Toast">
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:paddingStart">12dp</item>
<item name="android:paddingEnd">12dp</item>
<item name="android:background">@drawable/bg_round_corner_8dp</item>
<item name="android:backgroundTint">?vctr_voice_message_toast_background</item>
<item name="android:textColor">@color/palette_white</item>
<item name="android:gravity">center</item>
</style>
</resources> </resources>

View file

@ -140,8 +140,7 @@
<!-- Keywords --> <!-- Keywords -->
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item> <item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
<!-- Voice Message --> <item name="vctr_toast_background">@color/vctr_toast_background_dark</item>
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_dark</item>
</style> </style>
<style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" /> <style name="Theme.Vector.Dark" parent="Base.Theme.Vector.Dark" />

View file

@ -143,8 +143,7 @@
<!-- Keywords --> <!-- Keywords -->
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item> <item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
<!-- Voice Message --> <item name="vctr_toast_background">@color/vctr_toast_background_light</item>
<item name="vctr_voice_message_toast_background">@color/vctr_voice_message_toast_background_light</item>
</style> </style>
<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" /> <style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />

View file

@ -69,11 +69,11 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toTopOf="@id/createPollButton" app:layout_constraintBottom_toTopOf="@id/createPollButton"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
tools:listitem="@layout/item_profile_action" /> tools:listitem="@layout/item_form_text_input_with_delete" />
<Button <Button
android:id="@+id/createPollButton" android:id="@+id/createPollButton"
style="@style/Widget.Vector.Button.CreatePoll" style="@style/Widget.Vector.Button.CallToAction"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="56dp"
android:layout_margin="16dp" android:layout_margin="16dp"
@ -92,7 +92,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:text="@string/voice_message_release_to_send_toast" tools:text="@string/create_poll_empty_question_error"
tools:visibility="visible" /> tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -9,7 +9,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/formTextInputTextInputLayout" android:id="@+id/formTextInputTextInputLayout"
style="@style/Widget.Vector.EditText.Form" style="@style/Widget.Vector.TextInputLayout.Form"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_horizontal_margin" android:layout_marginStart="@dimen/layout_horizontal_margin"

View file

@ -9,7 +9,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/formTextInputTextInputLayout" android:id="@+id/formTextInputTextInputLayout"
style="@style/Widget.Vector.EditText.Form" style="@style/Widget.Vector.TextInputLayout.Form"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_horizontal_margin" android:layout_marginStart="@dimen/layout_horizontal_margin"