|
1 | 1 | <resources> |
2 | | - <!-- Base application theme. Migrated to Material 3. M3 derives the accent/variant |
3 | | - roles from colorPrimary, but this app sets explicit per-theme palettes, so the |
4 | | - key M3 color roles are populated below and per-theme overrides follow in each |
5 | | - Theme.SagerNet.* variant. --> |
| 2 | + <!-- Base application theme. Migrated to Material 3 while keeping the app's |
| 3 | + hand-picked legacy palettes. Components that need legacy behavior get |
| 4 | + explicit SagerNet widget styles instead of relying on generated M3 tones. --> |
6 | 5 | <style name="Theme.SagerNet" parent="Theme.Material3.DayNight.NoActionBar"> |
7 | 6 | <item name="actionBarStyle">@style/Widget.MaterialComponents.ActionBar.Solid</item> |
| 7 | + <item name="bottomAppBarStyle">@style/Widget.SagerNet.BottomAppBar</item> |
| 8 | + <item name="floatingActionButtonStyle">@style/Widget.SagerNet.FloatingActionButton</item> |
8 | 9 | <!-- Protocol/type label color; defaults to accent, Dracula overrides green. --> |
9 | 10 | <item name="protocolColor">?attr/accentOrTextSecondary</item> |
10 | 11 | <!-- Per-theme semantic colors; default to primary text (no visible change), |
|
31 | 32 | <item name="colorPrimary">@color/material_pink_500</item> |
32 | 33 | <item name="colorPrimaryDark">@color/material_pink_700</item> |
33 | 34 | <item name="colorAccent">@color/material_pink_accent_200</item> |
| 35 | + <item name="colorOnPrimary">@color/white</item> |
34 | 36 |
|
35 | 37 | <item name="colorMaterial100">@color/material_pink_100</item> |
36 | 38 | <item name="colorMaterial300">@color/material_pink_300</item> |
|
81 | 83 |
|
82 | 84 | <style name="Theme.SagerNet.Dialog" parent="Theme.Material3.DayNight.Dialog.Alert"> |
83 | 85 | <item name="actionBarStyle">@style/Widget.MaterialComponents.ActionBar.Solid</item> |
| 86 | + <item name="bottomAppBarStyle">@style/Widget.SagerNet.BottomAppBar</item> |
| 87 | + <item name="floatingActionButtonStyle">@style/Widget.SagerNet.FloatingActionButton</item> |
84 | 88 | <item name="protocolColor">?attr/accentOrTextSecondary</item> |
85 | 89 | <item name="profileNameColor">?android:attr/textColorPrimary</item> |
86 | 90 | <item name="statusConnectedColor">?attr/colorOnPrimary</item> |
|
100 | 104 | <item name="colorPrimary">@color/material_pink_500</item> |
101 | 105 | <item name="colorPrimaryDark">@color/material_pink_700</item> |
102 | 106 | <item name="colorAccent">@color/material_pink_accent_200</item> |
| 107 | + <item name="colorOnPrimary">@color/white</item> |
103 | 108 |
|
104 | 109 | <item name="colorMaterial100">@color/material_pink_100</item> |
105 | 110 | <item name="colorMaterial300">@color/material_pink_300</item> |
|
187 | 192 | <item name="rippleColor">@color/chip_ripple_color</item> |
188 | 193 | </style> |
189 | 194 |
|
190 | | - <style name="Widget.SagerNet.CardView" parent="Widget.Material3.CardView.Filled"> |
| 195 | + <style name="Widget.SagerNet.BottomAppBar" parent="Widget.Material3.BottomAppBar"> |
| 196 | + <item name="backgroundTint">?attr/colorPrimary</item> |
| 197 | + <item name="fabAlignmentMode">center</item> |
| 198 | + <item name="fabAlignmentModeEndMargin">@null</item> |
| 199 | + <item name="fabAnchorMode">cradle</item> |
| 200 | + <item name="menuAlignmentMode">auto</item> |
| 201 | + <item name="removeEmbeddedFabElevation">false</item> |
| 202 | + </style> |
| 203 | + |
| 204 | + <style name="Widget.SagerNet.FloatingActionButton" parent="Widget.Material3.FloatingActionButton.Primary"> |
| 205 | + <item name="backgroundTint">?attr/fabColorBackground</item> |
| 206 | + <item name="tint">?attr/colorOnPrimary</item> |
| 207 | + </style> |
| 208 | + |
| 209 | + <!-- Use the Material 3 *Outlined* card as the base so M3's surface-tint elevation |
| 210 | + overlay is not applied; the app sets its own card background/stroke colors and an |
| 211 | + olive tint was bleeding through Filled cards on the custom (non-M3-role) themes. --> |
| 212 | + <style name="Widget.SagerNet.CardView" parent="Widget.Material3.CardView.Outlined"> |
191 | 213 | <item name="cardElevation">0dp</item> |
192 | 214 | <item name="cardCornerRadius">@dimen/card_corner_radius</item> |
193 | 215 | <item name="strokeColor">@color/card_stroke</item> |
|
273 | 295 | <item name="colorPrimary">@color/material_amber_500</item> |
274 | 296 | <item name="colorPrimaryDark">@color/material_amber_700</item> |
275 | 297 | <item name="colorAccent">@color/material_amber_accent_200</item> |
| 298 | + <item name="colorOnPrimary">@color/black</item> |
276 | 299 | <item name="colorMaterial100">@color/material_amber_100</item> |
277 | 300 | <item name="colorMaterial300">@color/material_amber_300</item> |
278 | 301 | <item name="cardElevatedSurfaceColor">@color/card_elevated_amber</item> |
|
381 | 404 | <item name="colorPrimary">@color/material_lime_500</item> |
382 | 405 | <item name="colorPrimaryDark">@color/material_lime_700</item> |
383 | 406 | <item name="colorAccent">@color/material_lime_accent_200</item> |
| 407 | + <item name="colorOnPrimary">@color/black</item> |
384 | 408 | <item name="colorMaterial100">@color/material_lime_100</item> |
385 | 409 | <item name="colorMaterial300">@color/material_lime_300</item> |
386 | 410 | <item name="cardElevatedSurfaceColor">@color/card_elevated_lime</item> |
|
426 | 450 | <item name="colorPrimary">@color/material_yellow_500</item> |
427 | 451 | <item name="colorPrimaryDark">@color/material_yellow_700</item> |
428 | 452 | <item name="colorAccent">@color/material_yellow_accent_200</item> |
| 453 | + <item name="colorOnPrimary">@color/black</item> |
429 | 454 | <item name="colorMaterial100">@color/material_yellow_100</item> |
430 | 455 | <item name="colorMaterial300">@color/material_yellow_300</item> |
431 | 456 | <item name="cardElevatedSurfaceColor">@color/card_elevated_yellow</item> |
|
436 | 461 | <item name="colorPrimary">@color/material_amber_500</item> |
437 | 462 | <item name="colorPrimaryDark">@color/material_amber_700</item> |
438 | 463 | <item name="colorAccent">@color/material_amber_accent_200</item> |
| 464 | + <item name="colorOnPrimary">@color/black</item> |
439 | 465 | <item name="colorMaterial100">@color/material_amber_100</item> |
440 | 466 | <item name="colorMaterial300">@color/material_amber_300</item> |
441 | 467 | <item name="cardElevatedSurfaceColor">@color/card_elevated_amber</item> |
|
544 | 570 | <item name="colorPrimary">@color/material_lime_500</item> |
545 | 571 | <item name="colorPrimaryDark">@color/material_lime_700</item> |
546 | 572 | <item name="colorAccent">@color/material_lime_accent_200</item> |
| 573 | + <item name="colorOnPrimary">@color/black</item> |
547 | 574 | <item name="colorMaterial100">@color/material_lime_100</item> |
548 | 575 | <item name="colorMaterial300">@color/material_lime_300</item> |
549 | 576 | <item name="cardElevatedSurfaceColor">@color/card_elevated_lime</item> |
|
598 | 625 | <item name="colorPrimary">@color/material_yellow_500</item> |
599 | 626 | <item name="colorPrimaryDark">@color/material_yellow_700</item> |
600 | 627 | <item name="colorAccent">@color/material_yellow_accent_200</item> |
| 628 | + <item name="colorOnPrimary">@color/black</item> |
601 | 629 | <item name="colorMaterial100">@color/material_yellow_100</item> |
602 | 630 | <item name="colorMaterial300">@color/material_yellow_300</item> |
603 | 631 | <item name="cardElevatedSurfaceColor">@color/card_elevated_yellow</item> |
|
0 commit comments