unify buttons (#2007)

* use standard button style for block/accept

* make existing buttons a little bit nicer

* make 'login' button more outstanding, esp. in dark-mode, where colors are tuned down for now
This commit is contained in:
bjoern
2021-08-02 10:38:14 +02:00
committed by GitHub
parent 099f76a90b
commit 0995930636
7 changed files with 25 additions and 37 deletions
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO - Consolidate using attr if we move away from API 19 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#3b3b3b"/>
<solid android:color="@color/gray78"/>
<corners android:radius="8dp"/>
</shape>
</shape>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO - Consolidate using attr if we move away from API 19 -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#e9e9e9"/>
<solid android:color="@color/delta_primary_lite"/>
<corners android:radius="8dp"/>
</shape>
</shape>
+9 -5
View File
@@ -18,11 +18,13 @@
<Button
android:id="@+id/message_request_block"
style="@style/Signal.MessageRequest.Button.Deny"
style="@style/ButtonPrimary"
android:text="@string/block"
android:layout_marginEnd="8dp"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:layout_marginRight="8dp"
android:layout_marginRight="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/message_request_accept"
app:layout_constraintHorizontal_bias="0.5"
@@ -30,10 +32,12 @@
<Button
android:id="@+id/message_request_accept"
style="@style/Signal.MessageRequest.Button.Accept"
style="@style/ButtonPrimary"
android:text="@string/accept"
android:layout_width="0dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="@id/message_request_block"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/message_request_block"
app:layout_constraintTop_toTopOf="@id/message_request_block" />
</merge>
</merge>
+9 -2
View File
@@ -37,19 +37,26 @@
android:gravity="center"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="24dp"
android:paddingBottom="16dp"
android:text="@string/welcome_intro1_message"
android:textSize="18sp"/>
<androidx.legacy.widget.Space
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp"/>
<Button
style="@style/ButtonPrimary"
android:id="@+id/login_button"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:text="@string/login_header" />
<androidx.legacy.widget.Space
android:layout_weight="5"
android:layout_weight="4"
android:layout_width="match_parent"
android:layout_height="0dp"/>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="accept_button">@color/document_icon_text</color>
</resources>
-2
View File
@@ -70,6 +70,4 @@
<!-- unknown_sender fits in dark mode and lite mode (also other chat/contact colors fit in both modes);
unknown_sender is used for the sender-name/quote-bar if the sender is unknown -->
<color name="unknown_sender">#ff999999</color>
<color name="accept_button">@color/core_ultramarine</color>
</resources>
+3 -20
View File
@@ -83,10 +83,10 @@
</style>
<style name="ButtonPrimary">
<item name="android:background">@color/delta_primary_lite</item>
<item name="android:textColor">@color/white</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:background">@drawable/button_background</item>
</style>
<style name="PreferenceThemeOverlay.Fix" parent="PreferenceThemeOverlay.v14.Material">
@@ -105,21 +105,4 @@
<item name="colorControlActivated">#ff2090ea</item>
</style>
<style name="Button.Borderless" parent="Base.Widget.AppCompat.Button.Borderless">
<item name="android:textColor">?attr/colorAccent</item>
</style>
<style name="Signal.MessageRequest.Button" parent="Button.Borderless">
<item name="android:textAllCaps">false</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">48dp</item>
<item name="android:background">@drawable/message_request_button_background</item>
</style>
<style name="Signal.MessageRequest.Button.Deny">
<item name="android:textColor">@color/core_red</item>
</style>
<style name="Signal.MessageRequest.Button.Accept">
<item name="android:textColor">@color/accept_button</item>
</style>
</resources>