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

Commit d21590e0 authored by Roy Chou's avatar Roy Chou
Browse files

fix(non linear font scaling): status bar mobile/wifi icons size not correct

The mobile/wifi signal icon sizes are mis-set to 13sp, originally they should match the status_bar_system_icon_size. Therefore, we correct the dimen value so that when default font scaling the icon sizes whould be same as the original size.

Besides, The mobile type/roaming icon sizes are mis-set to same as mobile signal icon size, while originally they're WRAP_CONTENT so should be same as the drawable size. Therefore, We adjust the type/roaming icon sizes to match the corresponding drawable icon size. It's to ensure then the icons is still scalable and the sizes are same as original when default font scaling.

Bug: 291899494
Bug: 293196179
Test: manually - attach video/screenshots
Change-Id: Ia601968173c71687e515b8d81f2e7980e48568ed
parent 9d1274bd
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
        </FrameLayout>
        <ImageView
            android:id="@+id/mobile_type"
            android:layout_height="@dimen/status_bar_mobile_signal_size"
            android:layout_height="@dimen/status_bar_mobile_type_size"
            android:layout_width="wrap_content"
            android:layout_gravity="center_vertical"
            android:adjustViewBounds="true"
@@ -74,13 +74,15 @@
            <com.android.systemui.statusbar.AnimatedImageView
                android:id="@+id/mobile_signal"
                android:layout_height="@dimen/status_bar_mobile_signal_size"
                android:layout_width="@dimen/status_bar_mobile_signal_size"
                android:layout_width="wrap_content"
                android:adjustViewBounds="true"
                systemui:hasOverlappingRendering="false"
                />
            <ImageView
                android:id="@+id/mobile_roaming"
                android:layout_width="@dimen/status_bar_mobile_signal_size"
                android:layout_height="@dimen/status_bar_mobile_signal_size"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/status_bar_mobile_roam_size"
                android:adjustViewBounds="true"
                android:layout_gravity="top|start"
                android:src="@drawable/stat_sys_roaming"
                android:contentDescription="@string/data_connection_roaming"
+12 −4
Original line number Diff line number Diff line
@@ -165,13 +165,21 @@

    <!-- Size of the view displaying the wifi inout icon in the status bar. -->
    <dimen name="status_bar_wifi_inout_container_size">17sp</dimen>
    <!-- Size of the view displaying the wifi signal icon in the status bar. -->
    <dimen name="status_bar_wifi_signal_size">13sp</dimen>
    <!-- Size of the view displaying the wifi signal icon in the status bar. This value should
        match the core/status_bar_system_icon_size and change to sp unit -->
    <dimen name="status_bar_wifi_signal_size">15sp</dimen>

    <!-- Size of the view displaying the mobile inout icon in the status bar. -->
    <dimen name="status_bar_mobile_inout_container_size">17sp</dimen>
    <!-- Size of the view displaying the mobile signal icon in the status bar. -->
    <dimen name="status_bar_mobile_signal_size">13sp</dimen>
    <!-- Size of the view displaying the mobile signal icon in the status bar. This value should
        match the core/status_bar_system_icon_size and change to sp unit -->
    <dimen name="status_bar_mobile_signal_size">15sp</dimen>
    <!-- Size of the view displaying the mobile signal icon in the status bar. This value should
        match the viewport height of mobile signal drawables such as ic_lte_mobiledata -->
    <dimen name="status_bar_mobile_type_size">16sp</dimen>
    <!-- Size of the view displaying the mobile roam icon in the status bar. This value should
        match the viewport size of drawable stat_sys_roaming -->
    <dimen name="status_bar_mobile_roam_size">8sp</dimen>

    <!-- Spacing before the airplane mode icon if there are any icons preceding it. -->
    <dimen name="status_bar_airplane_spacer_width">4sp</dimen>