Skip to content

Commit

Permalink
[Dialog] Update DialogWhenLarge theme to have correct parent theme
Browse files Browse the repository at this point in the history
Resolves #3402

Resolves #3400

Co-authored-by: imhappi
GIT_ORIGIN_REV_ID=8aee44c6a45954096083b06540e5aa1058eff34b
PiperOrigin-RevId: 534921469
  • Loading branch information
mtotschnig authored and dsn5ft committed May 30, 2023
1 parent 1fcde2c commit dae89b7
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,14 @@
<public name="Theme.Material3.Light.Dialog" type="style"/>
<public name="Theme.Material3.Light.Dialog.Alert" type="style"/>
<public name="Theme.Material3.Light.Dialog.MinWidth" type="style"/>
<public name="Theme.Material3.Light.DialogWhenLarge" type="style"/>

<public name="Theme.Material3.Dark.Dialog" type="style"/>
<public name="Theme.Material3.Dark.Dialog.Alert" type="style"/>
<public name="Theme.Material3.Dark.Dialog.MinWidth" type="style"/>
<public name="Theme.Material3.Dark.DialogWhenLarge" type="style"/>

<public name="Theme.Material3.DayNight.Dialog" type="style"/>
<public name="Theme.Material3.DayNight.Dialog.Alert" type="style"/>
<public name="Theme.Material3.DayNight.Dialog.MinWidth" type="style"/>
<public name="Theme.Material3.DayNight.DialogWhenLarge" type="style"/>

<public name="ThemeOverlay.Material3.Dialog" type="style"/>
<public name="ThemeOverlay.Material3.Dialog.Alert" type="style"/>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<!-- Material 3 themes (day/night versions) for dialogs. -->
<style name="Theme.Material3.DayNight.Dialog" parent="Theme.Material3.Dark.Dialog"/>
<style name="Theme.Material3.DayNight.Dialog.Alert" parent="Theme.Material3.Dark.Dialog.Alert"/>
<style name="Theme.Material3.DayNight.DialogWhenLarge" parent="Theme.Material3.Dark.DialogWhenLarge"/>
<style name="Theme.Material3.DayNight.Dialog.MinWidth" parent="Theme.Material3.Dark.Dialog.MinWidth"/>

<!-- Material themes (day/night versions) for dialogs. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
"Base.Theme" theme.
-->

<style name="Theme.Material3.Light.DialogWhenLarge" parent="Base.Theme.Material3.Light.Dialog"/>
<style name="Theme.Material3.Dark.DialogWhenLarge" parent="Base.Theme.Material3.Dark.Dialog"/>
<style name="Theme.Material3.Light.Dialog" parent="Base.Theme.Material3.Light.Dialog"/>
<style name="Theme.Material3.Dark.Dialog" parent="Base.Theme.Material3.Dark.Dialog"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,20 @@
<style name="Base.Theme.Material3.Light.Dialog" parent="Base.V14.Theme.Material3.Light.Dialog"/>
<style name="Base.Theme.Material3.Dark.Dialog" parent="Base.V14.Theme.Material3.Dark.Dialog"/>

<style name="Base.Theme.Material3.Light.Dialog.FixedSize">
<item name="windowFixedWidthMajor">@dimen/abc_dialog_fixed_width_major</item>
<item name="windowFixedWidthMinor">@dimen/abc_dialog_fixed_width_minor</item>
<item name="windowFixedHeightMajor">@dimen/abc_dialog_fixed_height_major</item>
<item name="windowFixedHeightMinor">@dimen/abc_dialog_fixed_height_minor</item>
</style>

<style name="Base.Theme.Material3.Dark.Dialog.FixedSize">
<item name="windowFixedWidthMajor">@dimen/abc_dialog_fixed_width_major</item>
<item name="windowFixedWidthMinor">@dimen/abc_dialog_fixed_width_minor</item>
<item name="windowFixedHeightMajor">@dimen/abc_dialog_fixed_height_major</item>
<item name="windowFixedHeightMinor">@dimen/abc_dialog_fixed_height_minor</item>
</style>

<style name="Base.V14.Theme.MaterialComponents.Dialog" parent="Base.V14.Theme.MaterialComponents.Dialog.Bridge">
<item name="viewInflaterClass">com.google.android.material.theme.MaterialComponentsViewInflater</item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<!-- Material 3 themes (day/night versions) for dialogs. -->
<style name="Theme.Material3.DayNight.Dialog" parent="Theme.Material3.Light.Dialog"/>
<style name="Theme.Material3.DayNight.Dialog.Alert" parent="Theme.Material3.Light.Dialog.Alert"/>
<style name="Theme.Material3.DayNight.DialogWhenLarge" parent="Theme.Material3.Light.DialogWhenLarge"/>
<style name="Theme.Material3.DayNight.Dialog.MinWidth" parent="Theme.Material3.Light.Dialog.MinWidth"/>

<!-- Material themes (day/night versions) for dialogs. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<public name="Theme.Material3.DynamicColors.Light" type="style"/>
<public name="Theme.Material3.DynamicColors.Dark" type="style"/>
<public name="Theme.Material3.DynamicColors.DayNight" type="style"/>
<public name="Theme.Material3.Light.DialogWhenLarge" type="style"/>
<public name="Theme.Material3.Dark.DialogWhenLarge" type="style"/>
<public name="Theme.Material3.DayNight.DialogWhenLarge" type="style"/>

<public name="ThemeOverlay.Material3" type="style"/>
<public name="ThemeOverlay.Material3.Light" type="style"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
-->
<resources>

<style name="Base.Theme.Material3.Light.DialogWhenLarge"
parent="Base.Theme.Material3.Light.Dialog.FixedSize"/>

<style name="Base.Theme.Material3.Dark.DialogWhenLarge"
parent="Base.Theme.Material3.Dark.Dialog.FixedSize"/>

<style name="Base.Theme.MaterialComponents.DialogWhenLarge"
parent="Base.Theme.MaterialComponents.Dialog.FixedSize"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<style name="Theme.Material3.DayNight" parent="Theme.Material3.Dark"/>
<style name="Theme.Material3.DayNight.NoActionBar" parent="Theme.Material3.Dark.NoActionBar"/>
<style name="Theme.Material3.DynamicColors.DayNight" parent="Theme.Material3.DynamicColors.Dark"/>
<style name="Theme.Material3.DayNight.DialogWhenLarge" parent="Theme.Material3.Dark.DialogWhenLarge"/>

<!-- Material themes (day/night versions) for activities. -->
<style name="Theme.MaterialComponents.DayNight" parent="Theme.MaterialComponents"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@

<style name="Theme.Material3.DynamicColors.Dark" parent="Theme.Material3.Dark"/>

<style name="Theme.Material3.Light.DialogWhenLarge" parent="Base.Theme.Material3.Light.DialogWhenLarge"/>

<style name="Theme.Material3.Dark.DialogWhenLarge" parent="Base.Theme.Material3.Dark.DialogWhenLarge"/>

<!--
Themes in the "Theme.MaterialComponents" family will contain a default full color scheme.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@
<style name="Base.Theme.Material3.Light" parent="Base.V14.Theme.Material3.Light"/>
<style name="Base.Theme.Material3.Dark" parent="Base.V14.Theme.Material3.Dark"/>

<!-- We're not large, so redirect to Base.Theme.Material3 -->
<style name="Base.Theme.Material3.Light.DialogWhenLarge" parent="Base.Theme.Material3.Light"/>
<style name="Base.Theme.Material3.Dark.DialogWhenLarge" parent="Base.Theme.Material3.Dark"/>

<style name="Base.V14.Theme.MaterialComponents" parent="Base.V14.Theme.MaterialComponents.Bridge">
<item name="viewInflaterClass">com.google.android.material.theme.MaterialComponentsViewInflater</item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<style name="Theme.Material3.DayNight" parent="Theme.Material3.Light"/>
<style name="Theme.Material3.DayNight.NoActionBar" parent="Theme.Material3.Light.NoActionBar"/>
<style name="Theme.Material3.DynamicColors.DayNight" parent="Theme.Material3.DynamicColors.Light"/>
<style name="Theme.Material3.DayNight.DialogWhenLarge" parent="Theme.Material3.Light.DialogWhenLarge"/>

<!-- Material themes (day/night versions) for activities. -->
<style name="Theme.MaterialComponents.DayNight" parent="Theme.MaterialComponents.Light"/>
Expand Down

0 comments on commit dae89b7

Please sign in to comment.