Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
[theme] [themedark] systemui: improve layout of qs panel
Browse files Browse the repository at this point in the history
* resolved the annoying qs page indicator bug
  • Loading branch information
gabrielelucci committed Aug 10, 2016
1 parent 351cd87 commit 7da7664
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- QS card background -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetTop="8dp">
<shape>
<solid android:color="@color/system_primary_color"/>
<corners android:radius="@dimen/notification_material_rounded_rect_radius"/>
</shape>
</inset>
<!-- QS Background rectangle - we wrap it in a layer-list to give it some top margin -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="@dimen/qs_top_inset">
<shape android:shape="rectangle" >
<solid android:color="@color/system_primary_color"/>
<corners android:radius="@dimen/notification_material_rounded_rect_radius"/>
</shape>
</item>
</layer-list>
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@
<color name="notification_guts_text_color">#b2FFFFFF</color>
<color name="notification_guts_btn_color">#FFFFFFFF</color>


</resources>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Macros -->
<dimen name="qs_top_inset">8dp</dimen>

<!-- Notifications-->
<dimen name="notification_side_padding">8dp</dimen>
Expand All @@ -8,7 +10,6 @@
<dimen name="notification_material_rounded_rect_radius">2dp</dimen>
<!-- radius of the corners of the material rounded rect background but negative-->
<dimen name="notification_material_rounded_rect_radius_negative">-2dp</dimen>

<!-- Volume panel -->
<dimen name="volume_panel_z">8dp</dimen>
<dimen name="volume_offset_top">4dp</dimen>
Expand All @@ -22,14 +23,19 @@
<dimen name="status_bar_expanded_header_elevation">4dp</dimen>

<!-- QS Panel -->
<dimen name="qs_brightness_padding_top">4dp</dimen> <!-- 6dp -->
<dimen name="qs_peek_height">0dp</dimen> <!-- 8dp -->
<dimen name="qs_brightness_padding_top">@dimen/qs_top_inset</dimen>
<dimen name="qs_peek_height">0dp</dimen>
<dimen name="qs_tile_height">96dp</dimen>
<dimen name="qs_dual_tile_height">96dp</dimen>
<dimen name="qs_dual_tile_padding_vertical">0dp</dimen>
<dimen name="qs_tile_padding_below_icon">12dp</dimen>

<!--
<!-- UNUSUED
<dimen name="qs_tile_height">88dp</dimen>
<dimen name="qs_tile_icon_size">24dp</dimen>
<dimen name="qs_tile_text_size">12sp</dimen>
<dimen name="qs_tile_divider_height">1dp</dimen>
<dimen name="qs_panel_padding">16dp</dimen>
<dimen name="qs_dual_tile_height">112dp</dimen>
<dimen name="qs_dual_tile_padding_vertical">8dp</dimen>
<dimen name="qs_dual_tile_padding_horizontal">6dp</dimen>
Expand All @@ -38,8 +44,6 @@
<dimen name="qs_tile_padding_below_icon">12dp</dimen>
<dimen name="qs_tile_padding_bottom">16dp</dimen>
<dimen name="qs_tile_spacing">4dp</dimen>
<dimen name="qs_panel_padding">16dp</dimen>
<dimen name="qs_panel_padding_bottom">8dp</dimen>
-->

</resources>
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="28dp"
android:height="28dp" android:viewportWidth="24" android:viewportHeight="24">
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="28dp"
android:height="28dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path android:fillColor="@color/system_primary_color" android:strokeColor="@*common:color/icons"
android:strokeWidth="2" android:pathData="M5.53249,9.31787 C6.61604,6.69788,9.16861,4.9978,12,4.9978
<path
android:fillColor="@color/system_primary_color"
android:strokeColor="@*common:color/icons"
android:strokeWidth="2"
android:pathData="M5.53249,9.31787 C6.61604,6.69788,9.16861,4.9978,12,4.9978
C14.8314,4.9978,17.384,6.70776,18.4675,9.31787
C19.551,11.9379,18.9521,14.9479,16.9498,16.9479 L11.9999,21.8978
L7.05007,16.9479 C5.04779,14.9479,4.4488,11.9379,5.53236,9.31787 Z" />
<path android:fillColor="@*common:color/icons" android:pathData="M11.9352,8.005 C14.1058,8.005,15.8654,9.79358,15.8654,12
<path
android:fillColor="@*common:color/icons"
android:pathData="M11.9352,8.005 C14.1058,8.005,15.8654,9.79358,15.8654,12
C15.8654,14.2064,14.1058,15.995,11.9352,15.995
C9.76462,15.995,8.005,14.2064,8.005,12
C8.005,9.79358,9.76462,8.005,11.9352,8.005 Z" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp"
android:height="24dp" android:viewportHeight="24" android:viewportWidth="24">
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">

<path android:pathData="M4.22494,13.375 L11.9999,5.66602 L19.7751,13.3752"
android:strokeColor="@*common:color/icons" android:strokeWidth="1.99999988" />
<path android:pathData="M4.22494,19.0319 L11.9999,11.3229 L19.7751,19.0321"
android:strokeColor="@*common:color/icons" android:strokeWidth="1.99999988" />
<path
android:pathData="M4.22494,13.375 L11.9999,5.66602 L19.7751,13.3752"
android:strokeColor="@*common:color/icons"
android:strokeWidth="1.99999988" />
<path
android:pathData="M4.22494,19.0319 L11.9999,11.3229 L19.7751,19.0321"
android:strokeColor="@*common:color/icons"
android:strokeWidth="1.99999988" />
</vector>
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!-- QS card background -->
<inset xmlns:android="http://schemas.android.com/apk/res/android" android:insetTop="8dp">
<shape>
<solid android:color="@color/system_primary_color" />
<corners android:radius="@dimen/notification_material_rounded_rect_radius" />
</shape>
</inset>
<?xml version="1.0" encoding="utf-8"?>
<!-- QS Background rectangle - we wrap it in a layer-list to give it some top margin -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="@dimen/qs_top_inset">
<shape android:shape="rectangle" >
<solid android:color="@color/system_primary_color"/>
<corners android:radius="@dimen/notification_material_rounded_rect_radius"/>
</shape>
</item>
</layer-list>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2015, The CyanogenMod Project
**
Expand All @@ -15,6 +16,8 @@
** limitations under the License.
*/
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@*common:color/material_color_500" />
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@*common:color/material_color_500" />
</shape>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<solid android:color="@color/volume_panel_background_color" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
<color name="notification_material_background_color">@*common:color/cards</color>
<color name="notification_material_background_dimmed_color">#ddffffff</color>
<color name="notification_material_background_low_priority_color">#ddffffff</color>
<color name="notification_material_background_media_default_color">@color/system_primary_color
</color>
<color name="notification_material_background_media_default_color">@color/system_primary_color</color>
<color name="notification_icon_color">@*common:color/accent</color>
<color name="notification_ripple_untinted_color">#28000000</color>
<color name="notification_ripple_color_low_priority">#30000000</color>
Expand All @@ -54,4 +53,5 @@
<color name="notification_guts_text_color">#b2FFFFFF</color>
<color name="notification_guts_btn_color">#FFFFFFFF</color>


</resources>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Macros -->
<dimen name="qs_top_inset">8dp</dimen>

<!-- Notifications-->
<dimen name="notification_side_padding">8dp</dimen>
Expand All @@ -8,7 +10,6 @@
<dimen name="notification_material_rounded_rect_radius">2dp</dimen>
<!-- radius of the corners of the material rounded rect background but negative-->
<dimen name="notification_material_rounded_rect_radius_negative">-2dp</dimen>

<!-- Volume panel -->
<dimen name="volume_panel_z">8dp</dimen>
<dimen name="volume_offset_top">4dp</dimen>
Expand All @@ -22,14 +23,19 @@
<dimen name="status_bar_expanded_header_elevation">4dp</dimen>

<!-- QS Panel -->
<dimen name="qs_brightness_padding_top">4dp</dimen> <!-- 6dp -->
<dimen name="qs_peek_height">0dp</dimen> <!-- 8dp -->
<dimen name="qs_brightness_padding_top">@dimen/qs_top_inset</dimen>
<dimen name="qs_peek_height">0dp</dimen>
<dimen name="qs_tile_height">96dp</dimen>
<dimen name="qs_dual_tile_height">96dp</dimen>
<dimen name="qs_dual_tile_padding_vertical">0dp</dimen>
<dimen name="qs_tile_padding_below_icon">12dp</dimen>

<!--
<!-- UNUSUED
<dimen name="qs_tile_height">88dp</dimen>
<dimen name="qs_tile_icon_size">24dp</dimen>
<dimen name="qs_tile_text_size">12sp</dimen>
<dimen name="qs_tile_divider_height">1dp</dimen>
<dimen name="qs_panel_padding">16dp</dimen>
<dimen name="qs_dual_tile_height">112dp</dimen>
<dimen name="qs_dual_tile_padding_vertical">8dp</dimen>
<dimen name="qs_dual_tile_padding_horizontal">6dp</dimen>
Expand All @@ -38,8 +44,6 @@
<dimen name="qs_tile_padding_below_icon">12dp</dimen>
<dimen name="qs_tile_padding_bottom">16dp</dimen>
<dimen name="qs_tile_spacing">4dp</dimen>
<dimen name="qs_panel_padding">16dp</dimen>
<dimen name="qs_panel_padding_bottom">8dp</dimen>
-->

</resources>

0 comments on commit 7da7664

Please sign in to comment.