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

Commit becf7d49 authored by Sam Saccone's avatar Sam Saccone
Browse files

Fix printer icon button background.

Swap hard-coded color values for dynamic theme values to correctly
handle dark and light mode swaps from the platform.

After - http://screen/4GmeprtHk8s5Sdb
Before - http://screen/6GgzEhBowkTwy3j

Test: Manual - see screenshots
Flag: com.android.printspooler.flags.printer_button_contrast
BUG: 341591022

Change-Id: Ifbf1df449ee4bc6953f51f2c9fc4899a85869469
parent 584dcda0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -18,3 +18,14 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
   name: "printer_button_contrast"
   namespace: "printing"
   description: "Use themed colors instead of hard-coded values for print icon"
   is_fixed_read_only: true
   bug: "341591022"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    android:height="36dp"
    android:viewportWidth="48.0"
    android:viewportHeight="48.0"
    android:tint="@*android:color/accent_device_default_light">
    android:tint="@color/ic_pdf_printer_color">
    <path
        android:pathData="M40,4L16,4c-2.21,0 -4,1.79 -4,4v24c0,2.21 1.79,4 4,4h24c2.21,0 4,-1.79 4,-4L44,8c0,-2.21 -1.79,-4 -4,-4zM23,19c0,1.66 -1.34,3 -3,3h-2v4h-3L15,14h5c1.66,0 3,1.34 3,3v2zM33,23c0,1.66 -1.34,3 -3,3h-5L25,14h5c1.66,0 3,1.34 3,3v6zM41,17h-3v2h3v3h-3v4h-3L35,14h6v3zM18,19h2v-2h-2v2zM8,12L4,12v28c0,2.21 1.79,4 4,4h28v-4L8,40L8,12zM28,23h2v-6h-2v6z"
        android:fillColor="@android:color/black"/>
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@
    android:shape="oval">

    <solid
        android:color="?android:attr/colorAccent">
      android:color="@color/print_button_background"
        >
    </solid>

    <size
+7 −1
Original line number Diff line number Diff line
@@ -14,11 +14,17 @@
     limitations under the License.
-->

<resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">

    <color name="print_preview_scrim_color">#99000000</color>

    <color name="unselected_page_background_color">#C0C0C0</color>

    <color name="material_grey_500">#ffa3a3a3</color>
    <color name="ic_pdf_printer_color" android:featureFlag="!com.android.printspooler.flags.printer_button_contrast">@*android:color/accent_device_default_light</color>
    <color name="ic_pdf_printer_color" android:featureFlag="com.android.printspooler.flags.printer_button_contrast">@androidprv:color/materialColorPrimary</color>

    <color name="print_button_background" android:featureFlag="!com.android.printspooler.flags.printer_button_contrast">?android:attr/colorAccent</color>
    <color name="print_button_background" android:featureFlag="com.android.printspooler.flags.printer_button_contrast">@androidprv:color/materialColorPrimary</color>
</resources>