Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26c84b13 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Smaller, darker notification icons.

(Still need to attempt to mipmap them but this will do for
now.)

Bug: 4691635
Change-Id: I8793d6a453fcbe0c2ce30b6349e4e5ef3f1a6e56
parent f6df86ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
    <!-- Height of the system bar -->
    <dimen name="system_bar_height">48dip</dimen>
    <!-- Height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">25dip</dimen>
    <dimen name="status_bar_icon_size">24dip</dimen>
    <!-- Size of the giant number (unread count) in the notifications -->
    <dimen name="status_bar_content_number_size">48sp</dimen>
    <!-- Height of notification icons in the system bar -->
+3 −0
Original line number Diff line number Diff line
@@ -64,4 +64,7 @@
    <!-- Where to place the app icon over the thumbnail -->
    <dimen name="status_bar_recents_app_icon_left_margin">13dp</dimen>
    <dimen name="status_bar_recents_app_icon_top_margin">13dp</dimen>

    <!-- size at which Notification icons will be drawn in the status bar -->
    <dimen name="status_bar_icon_drawing_size">24dip</dimen>
</resources>
+9 −1
Original line number Diff line number Diff line
@@ -48,5 +48,13 @@

    <!-- thickness (height) of each notification row, including any separators or padding -->
    <dimen name="notification_height">65dp</dimen>
</resources>

    <!-- Height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>

    <!-- size at which Notification icons will be drawn in the status bar -->
    <dimen name="status_bar_icon_drawing_size">18dip</dimen>

    <!-- opacity at which Notification icons will be drawn in the status bar -->
    <item type="dimen" name="status_bar_icon_drawing_alpha">40%</item>
</resources>
+9 −0
Original line number Diff line number Diff line
@@ -58,6 +58,14 @@ public class StatusBarIconView extends AnimatedImageView {
        mNumberPain.setAntiAlias(true);
        mNotification = notification;
        setContentDescription(notification);

        final int outerBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_size);
        final int imageBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size);
        final float scale = (float)imageBounds / (float)outerBounds;
        setScaleX(scale);
        setScaleY(scale);
        final float alpha = res.getFraction(R.dimen.status_bar_icon_drawing_alpha, 1, 1);
        setAlpha(alpha);
    }

    private static boolean streq(String a, String b) {
@@ -99,6 +107,7 @@ public class StatusBarIconView extends AnimatedImageView {
        if (!levelEquals) {
            setImageLevel(icon.iconLevel);
        }

        if (!numberEquals) {
            if (icon.number > 0 && mContext.getResources().getBoolean(
                        R.bool.config_statusBarShowNumber)) {