Skip to content

Commit

Permalink
ui: haromize bottom sheet radii w/cover radii
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Oct 23, 2024
1 parent bd685f1 commit 97b0a8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PlaybackBottomSheetBehavior<V : View>(context: Context, attributeSet: Attr
shapeAppearanceModel =
ShapeAppearanceModel.builder(
context,
MR.style.ShapeAppearance_Material3_Corner_ExtraLarge,
R.style.ShapeAppearance_Auxio_BottomSheet,
MR.style.ShapeAppearanceOverlay_Material3_Corner_Top)
.build()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class QueueBottomSheetBehavior<V : View>(context: Context, attributeSet: Attribu
shapeAppearanceModel =
ShapeAppearanceModel.builder(
context,
MR.style.ShapeAppearance_Material3_Corner_ExtraLarge,
R.style.ShapeAppearance_Auxio_BottomSheet,
MR.style.ShapeAppearanceOverlay_Material3_Corner_Top)
.build()
}
Expand Down
11 changes: 10 additions & 1 deletion app/src/main/res/values/styles_ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@
<item name="marginRightSystemWindowInsets">false</item>
<item name="paddingBottomSystemWindowInsets">false</item>
<item name="paddingTopSystemWindowInsets">false</item>
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.None</item>
<item name="shapeAppearance">@style/ShapeAppearance.Auxio.BottomSheet</item>
<item name="shouldRemoveExpandedCorners">true</item>
</style>

<style name="ShapeAppearance.Auxio.BottomSheet" parent="ShapeAppearance.Material3.Corner.ExtraLarge">
<!-- This is really badly off-spec, but is needed to nicely harmonize the corner radii in the playback bar -->
<item name="cornerSize">20dp</item>
</style>

<style name="Widget.Auxio.BottomSheet.Modal" parent="Widget.Material3.BottomSheet.Modal">
<item name="marginLeftSystemWindowInsets">false</item>
<item name="marginRightSystemWindowInsets">false</item>
Expand All @@ -63,6 +68,10 @@
<item name="android:paddingBottom">0dp</item>
</style>

<style name="ShapeAppearance.Auxio.PlaybackBarCover" parent="">
<item name="cornerSize">20dp</item>
</style>

<style name="Widget.Auxio.Image.Small" parent="">
<item name="android:layout_width">@dimen/size_touchable_small</item>
<item name="android:layout_height">@dimen/size_touchable_small</item>
Expand Down

0 comments on commit 97b0a8a

Please sign in to comment.