Skip to content

Commit

Permalink
Reset/delete buttons are now red
Browse files Browse the repository at this point in the history
  • Loading branch information
dgudim committed Jan 6, 2024
1 parent 7c1e3fb commit 7b3aa32
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<Button
android:id="@+id/resetBgButton"
style="@style/DefaultButtonStyle"
style="@style/DangerButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_reset_bg"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layouts/dialogs/layout/debug_menu_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dialog_menu_padding_left_right"
android:paddingEnd="@dimen/dialog_menu_padding_left_right">
android:layout_height="wrap_content">

<TextView
android:id="@+id/textView11"
Expand All @@ -25,6 +23,7 @@
android:id="@+id/imageView2"
android:layout_width="@dimen/compound_icon_size"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dialog_menu_padding_left_right"
app:layout_constraintBottom_toBottomOf="@+id/textView22"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView11"
Expand Down Expand Up @@ -58,6 +57,8 @@
android:id="@+id/debug_logging_switch"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dialog_menu_padding_left_right"
android:layout_marginEnd="@dimen/dialog_menu_padding_left_right"
android:text="@string/debug_logging"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layouts/dialogs/layout/entry_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@

<Button
android:id="@+id/settings_reset_button"
style="@style/DefaultButtonStyle"
style="@style/DangerButtonStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
Expand Down
14 changes: 6 additions & 8 deletions app/src/main/res/layouts/partials/layout/navigation_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<ImageButton
android:id="@+id/logo"
style="@style/DefaultImageButton"
android:layout_width="@dimen/logo_size"
android:layout_height="@dimen/logo_size"
android:layout_width="@dimen/nav_menu_logo_size"
android:layout_height="@dimen/nav_menu_logo_size"
android:layout_marginTop="@dimen/nav_menu_padding_top"
android:layout_marginEnd="@dimen/dialog_menu_padding_left_right"
android:scaleType="center"
Expand All @@ -31,14 +31,13 @@
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />

<View
<com.google.android.material.divider.MaterialDivider
android:id="@+id/top_divider"
android:layout_width="0dp"
android:layout_height="3dp"
android:layout_height="@dimen/nav_menu_divider_height"
android:layout_marginStart="@dimen/dialog_menu_padding_left_right"
android:layout_marginTop="8dp"
android:layout_marginEnd="@dimen/dialog_menu_padding_left_right"
android:background="@color/light_gray_bg_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo" />
Expand Down Expand Up @@ -404,14 +403,13 @@

</ScrollView>

<View
<com.google.android.material.divider.MaterialDivider
android:id="@+id/bottom_divider"
android:layout_width="0dp"
android:layout_height="3dp"
android:layout_height="@dimen/nav_menu_divider_height"
android:layout_marginStart="@dimen/dialog_menu_padding_left_right"
android:layout_marginEnd="@dimen/dialog_menu_padding_left_right"
android:layout_marginBottom="8dp"
android:background="@color/light_gray_bg_tint"
app:layout_constraintBottom_toTopOf="@+id/textView4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@color/light_gray_bg_tint"
tools:ignore="Overdraw">

<ImageView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Button xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/resetSettingsButton"
style="@style/DefaultButtonStyle"
style="@style/DangerButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/settings_entries_margin_left_right"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="transparent">#00000000</color>
<color name="white">#FFF</color>
<color name="light_gray_bg_tint">#55555555</color>

<!-- harmonized at runtime -->
<color name="gray_harmonized">#808080</color>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

<dimen name="slider_title_padding_left">3dp</dimen>

<dimen name="nav_menu_divider_height">3dp</dimen>
<dimen name="nav_menu_padding_top">8dp</dimen>
<dimen name="logo_size">56dp</dimen>
<dimen name="nav_menu_logo_size">56dp</dimen>
<dimen name="compound_icon_size">45dp</dimen>
<dimen name="icon_to_text_margin">5dp</dimen>
<dimen name="compound_menu_entry_top_margin">8dp</dimen>
Expand Down
16 changes: 12 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@

<!-- secondary button styles -->
<style name="ButtonStyleRound" parent="Widget.Material3.Button">
<item name="backgroundColor">?colorSecondaryContainer</item>
<item name="android:paddingLeft">10dp</item>
<item name="android:paddingRight">10dp</item>
<item name="iconPadding">3dp</item>
Expand All @@ -131,6 +130,10 @@
<item name="materialThemeOverlay">@style/SecondaryButtonThemeOverlay</item>
</style>

<style name="DangerButtonStyle" parent="DefaultButtonStyle">
<item name="materialThemeOverlay">@style/DangerButtonThemeOverlay</item>
</style>

<style name="MaterialImageButtonStyle" parent="SecondaryButtonStyleRoundCompact">
<item name="iconPadding">0dp</item>
<item name="iconGravity">textStart</item>
Expand All @@ -139,14 +142,19 @@
</style>

<!-- overlays -->
<style name="PrimaryButtonThemeOverlay" parent="ThemeOverlay.Material3.Button">
<item name="colorOnContainer">?colorOnPrimaryContainer</item>
<item name="colorContainer">?colorPrimaryContainer</item>
</style>

<style name="SecondaryButtonThemeOverlay" parent="ThemeOverlay.Material3.Button">
<item name="colorOnContainer">?colorOnSecondaryContainer</item>
<item name="colorContainer">?colorSecondaryContainer</item>
</style>

<style name="PrimaryButtonThemeOverlay" parent="ThemeOverlay.Material3.Button">
<item name="colorOnContainer">?colorOnPrimaryContainer</item>
<item name="colorContainer">?colorPrimaryContainer</item>
<style name="DangerButtonThemeOverlay" parent="ThemeOverlay.Material3.Button">
<item name="colorOnContainer">?colorOnErrorContainer</item>
<item name="colorContainer">?colorErrorContainer</item>
</style>
<!-- end -->

Expand Down

0 comments on commit 7b3aa32

Please sign in to comment.