Skip to content

Commit

Permalink
fix: improve button sizing on now playing screen for various device s…
Browse files Browse the repository at this point in the history
…izes
  • Loading branch information
Ben Sandee committed Nov 4, 2022
1 parent 14fca4e commit 3e4b857
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
9 changes: 9 additions & 0 deletions app/src/main/res/values-sw380dp/dimens.xml
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2022 The OpenSqueeze Authors. All Rights Reserved.
~ Use of this source code is governed by the GPLv3 license that can be found in the LICENSE file.
-->

<resources>
<dimen name="control_button_size">52dp</dimen>
<dimen name="large_control_button_size">72dp</dimen>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values-sw400dp/dimens.xml
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2022 The OpenSqueeze Authors. All Rights Reserved.
~ Use of this source code is governed by the GPLv3 license that can be found in the LICENSE file.
-->

<resources>
<dimen name="control_button_size">56dp</dimen>
<dimen name="large_control_button_size">72dp</dimen>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-sw600dp/dimens.xml
Expand Up @@ -7,4 +7,6 @@
<resources>
<dimen name="control_button_padding">16dp</dimen>
<dimen name="control_button_padding_compact">8dp</dimen>
<dimen name="control_button_size">72dp</dimen>
<dimen name="large_control_button_size">96dp</dimen>
</resources>
1 change: 0 additions & 1 deletion app/src/main/res/values-w600dp/dimens.xml
Expand Up @@ -5,6 +5,5 @@
-->

<resources>
<dimen name="notification_button_size">48dp</dimen>
<dimen name="popup_list_window_width">400dp</dimen>
</resources>
5 changes: 3 additions & 2 deletions app/src/main/res/values/dimens.xml
Expand Up @@ -27,9 +27,7 @@
<dimen name="serverlist_popup_list_width">240dp</dimen>
<dimen name="popup_list_window_width">320dp</dimen>

<dimen name="notification_large_bitmap_size">64dp</dimen>
<dimen name="notification_bigpicture_bitmap_size">256dp</dimen>
<dimen name="notification_button_size">40dp</dimen>

<dimen name="player_switch_padding">8dp</dimen>

Expand All @@ -49,4 +47,7 @@
<dimen name="autosize_granularity">2sp</dimen>
<dimen name="actionitem_icon_padding">8dp</dimen>
<dimen name="sib_shadow_size">0.5dp</dimen>

<dimen name="control_button_size">44dp</dimen>
<dimen name="large_control_button_size">56dp</dimen>
</resources>
8 changes: 4 additions & 4 deletions app/src/main/res/values/styles.xml
Expand Up @@ -157,8 +157,8 @@

<style name="Button.Control">
<item name="android:padding">?attr/controlButtonPadding</item>
<item name="android:layout_width">52dp</item>
<item name="android:layout_height">52dp</item>
<item name="android:layout_width">@dimen/control_button_size</item>
<item name="android:layout_height">@dimen/control_button_size</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:scaleType">centerCrop</item>
<item name="android:tag">control</item>
Expand All @@ -169,8 +169,8 @@
</style>

<style name="Button.Control.Tinted.Large">
<item name="android:layout_width">72dp</item>
<item name="android:layout_height">72dp</item>
<item name="android:layout_width">@dimen/large_control_button_size</item>
<item name="android:layout_height">@dimen/large_control_button_size</item>
</style>

<style name="Button.AppWidgetControl">
Expand Down

0 comments on commit 3e4b857

Please sign in to comment.