Compare commits

..

4 Commits

Author SHA1 Message Date
Jean-Baptiste
537776a883 [android] Reduce top margin on layer bottomsheet on tablet
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-11 19:51:41 +01:00
Jean-Baptiste
13fbe72b55 [android] Fix missing elevation on custom dialogs
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-11 19:30:01 +01:00
Jean-Baptiste
b4abd476db [android] Add support of dark mode for how to edit oh html file
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-11 17:37:03 +01:00
Jean-Baptiste
649d947eac [android] Improve colors of buttons in alert dialogs
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2026-01-11 14:41:42 +01:00
10 changed files with 53 additions and 13 deletions

View File

@@ -3,12 +3,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.Material3.CardView.Filled"
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/margin_half"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
app:cardCornerRadius="28dp"
app:cardElevation="@dimen/m3_sys_elevation_level3">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"

View File

@@ -41,5 +41,5 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="bottom|start"
android:background="?appBackground"/>
android:background="?colorSurfaceContainerLow"/>
</FrameLayout>

View File

@@ -5,9 +5,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.Material3.CardView.Filled"
style="@style/Widget.Material3.CardView.Elevated"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
app:cardCornerRadius="28dp"
app:cardElevation="@dimen/m3_sys_elevation_level3">
<LinearLayout
android:orientation="vertical"
android:minWidth="@dimen/bookmark_purchase_img_width"

View File

@@ -2,14 +2,15 @@
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/Widget.Material3.CardView.Filled"
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_double_and_half"
android:minWidth="@dimen/dialog_min_width"
android:minHeight="@dimen/dialog_min_height"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
app:cardCornerRadius="28dp"
app:cardElevation="@dimen/m3_sys_elevation_level3">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -3,12 +3,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.Material3.CardView.Filled"
style="@style/Widget.Material3.CardView.Elevated"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/margin_half"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="28dp">
app:cardCornerRadius="28dp"
app:cardElevation="@dimen/m3_sys_elevation_level3">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"

View File

@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/margin_direction_big"
android:layout_marginTop="@dimen/margin_base_plus_quarter"
android:orientation="vertical">
<FrameLayout

View File

@@ -40,5 +40,5 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="bottom|center"
android:background="?appBackground"/>
android:background="?colorSurfaceContainerLow"/>
</FrameLayout>

View File

@@ -287,13 +287,13 @@
</style>
<style name="MwmWidget.BottomSheetDialog" parent="Widget.Material3.BottomSheet.Modal">
<item name="backgroundTint">?appBackground</item>
<item name="backgroundTint">?colorSurfaceContainerLow</item>
<item name="elevationOverlayEnabled">false</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.LargeComponent</item>
</style>
<style name="MwmWidget.BottomSheet" parent="MwmWidget.BottomSheetDialog">
<item name="android:background">?appBackground</item>
<item name="android:background">?colorSurfaceContainerLow</item>
<item name="behavior_hideable">false</item>
</style>

View File

@@ -288,5 +288,15 @@
<item name="cornerFamily">rounded</item>
<item name="android:colorBackground">?attr/colorSurfaceContainerHigh</item>
<item name="android:layout">@layout/m3_alert_dialog</item>
<item name="buttonBarPositiveButtonStyle">@style/MwmTheme.M3.AlertDialog.Button</item>
<item name="buttonBarNegativeButtonStyle">@style/MwmTheme.M3.AlertDialog.Button</item>
<item name="buttonBarNeutralButtonStyle">@style/MwmTheme.M3.AlertDialog.Button.Neutral</item>
</style>
<style name="MwmTheme.M3.AlertDialog.Button" parent="@style/Widget.Material3.Button.TextButton.Dialog">
<item name="android:textColor">?colorSecondary</item>
</style>
<style name="MwmTheme.M3.AlertDialog.Button.Neutral" parent="@style/Widget.Material3.Button.TextButton.Dialog.Flush">
<item name="android:textColor">?colorSecondary</item>
</style>
</resources>

View File

@@ -2,12 +2,38 @@
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<style>
/* All langs are invisible by default. */
[lang] {
display: none;
}
/* Dark mode support. */
:root {
color-scheme: light dark;
--primary-color: black;
--secondary-color: #555555;
--link-color: #37653F;
--background-color: white;
--separator-color: #0e0e0e;
}
@media screen and (prefers-color-scheme: dark) {
:root {
--primary-color: #b5b5b5;
--secondary-color: #858585;
--link-color: #659464;
--background-color: black;
--separator-color: #0a0a0a;
}
}
html {
color: var(--secondary-color);
background-color: var(--background-color);
}
.example {
font-weight: bold;
font-family: monospace;