Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 469b0c1f authored by Alan Viverette's avatar Alan Viverette
Browse files

Fix button text color, reduce alert dialog padding

Material.Button was inheriting from the default Button style, which
incorrectly set textColor (thus overriding the value from the text
appearance).

BUG: 17047363
BUG: 17111560
Change-Id: I74a8fb865bbb7262afd7eb1328e2173e9b74c175
parent 3b57e1d1
Loading
Loading
Loading
Loading
+35 −37
Original line number Diff line number Diff line
@@ -31,9 +31,9 @@
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical|start"
            android:paddingStart="16dip"
            android:paddingEnd="16dip"
            android:paddingTop="16dip"
            android:paddingStart="@dimen/alert_dialog_padding_material"
            android:paddingEnd="@dimen/alert_dialog_padding_material"
            android:paddingTop="@dimen/alert_dialog_padding_material"
            android:paddingBottom="8dip">
            <ImageView android:id="@+id/icon"
                android:layout_width="32dip"
@@ -66,10 +66,10 @@
                style="?attr/textAppearanceMedium"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingStart="16dip"
                android:paddingEnd="16dip"
                android:paddingTop="16dip"
                android:paddingBottom="16dip" />
                android:paddingStart="@dimen/alert_dialog_padding_material"
                android:paddingEnd="@dimen/alert_dialog_padding_material"
                android:paddingTop="@dimen/alert_dialog_padding_material"
                android:paddingBottom="@dimen/alert_dialog_padding_material" />
        </ScrollView>
    </LinearLayout>

@@ -87,12 +87,11 @@
        style="?attr/buttonBarStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="end">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layoutDirection="locale">
        android:layoutDirection="locale"
        android:orientation="horizontal"
        android:paddingStart="6dp"
        android:paddingEnd="6dp"
        android:paddingBottom="6dp">
        <Button android:id="@+id/button3"
            style="?attr/buttonBarNeutralButtonStyle"
            android:layout_width="wrap_content"
@@ -118,4 +117,3 @@
            android:minHeight="@dimen/alert_dialog_button_bar_height" />
    </LinearLayout>
</LinearLayout>
</LinearLayout>
+2 −0
Original line number Diff line number Diff line
@@ -71,4 +71,6 @@

    <!-- Default alpha value for disabled elements. -->
    <item name="disabled_alpha_material" format="float" type="dimen">0.26</item>

    <dimen name="alert_dialog_padding_material">12dp</dimen>
</resources>
+4 −4
Original line number Diff line number Diff line
@@ -423,12 +423,15 @@ please see styles_device_defaults.xml.
    <style name="Widget.Material" parent="Widget" />

    <!-- Bordered ink button -->
    <style name="Widget.Material.Button" parent="Widget.Button">
    <style name="Widget.Material.Button">
        <item name="background">@drawable/btn_default_material</item>
        <item name="textAppearance">?attr/textAppearanceButton</item>
        <item name="minHeight">48dip</item>
        <item name="minWidth">88dip</item>
        <item name="stateListAnimator">@anim/button_state_list_anim_material</item>
        <item name="focusable">true</item>
        <item name="clickable">true</item>
        <item name="gravity">center_vertical|center_horizontal</item>
    </style>

    <!-- Small bordered ink button -->
@@ -471,9 +474,6 @@ please see styles_device_defaults.xml.

    <style name="Widget.Material.ButtonBar.AlertDialog">
        <item name="background">@null</item>
        <item name="paddingStart">16dp</item>
        <item name="paddingEnd">16dp</item>
        <item name="paddingBottom">16dp</item>
        <item name="minHeight">@dimen/alert_dialog_button_bar_height</item>
    </style>