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

Commit 031e8b14 authored by Svetoslav's avatar Svetoslav
Browse files

Fix print icons in settings.

The print icons are in the framework resources and are not tinted
to enable usage from various places such as print spooler and
settings with different tinting. Settings was using not-tinted
print icons which were invisible on the white background. This
change switches settings to user tinted drawables.

bug:16966145

Change-Id: I2cf55d36d90b0192ba23686aac4f1d8e7e23f75a
parent 877fb7fb
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@*android:drawable/ic_print"
    android:tint="@*android:color/material_deep_teal_500" />
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@*android:drawable/ic_print_error"
    android:tint="@*android:color/material_deep_teal_500" />
+2 −2
Original line number Diff line number Diff line
@@ -204,12 +204,12 @@ public class PrintJobSettingsFragment extends SettingsPreferenceFragment {
        switch (info.getState()) {
            case PrintJobInfo.STATE_QUEUED:
            case PrintJobInfo.STATE_STARTED: {
                mPrintJobPreference.setIcon(com.android.internal.R.drawable.ic_print);
                mPrintJobPreference.setIcon(R.drawable.ic_print);
            } break;

            case PrintJobInfo.STATE_FAILED:
            case PrintJobInfo.STATE_BLOCKED: {
                mPrintJobPreference.setIcon(com.android.internal.R.drawable.ic_print_error);
                mPrintJobPreference.setIcon(R.drawable.ic_print_error);
            } break;
        }

+2 −2
Original line number Diff line number Diff line
@@ -423,12 +423,12 @@ public class PrintSettingsFragment extends SettingsPreferenceFragment
                    switch (printJob.getState()) {
                        case PrintJobInfo.STATE_QUEUED:
                        case PrintJobInfo.STATE_STARTED: {
                            preference.setIcon(com.android.internal.R.drawable.ic_print);
                            preference.setIcon(R.drawable.ic_print);
                        } break;

                        case PrintJobInfo.STATE_FAILED:
                        case PrintJobInfo.STATE_BLOCKED: {
                            preference.setIcon(com.android.internal.R.drawable.ic_print_error);
                            preference.setIcon(R.drawable.ic_print_error);
                        } break;
                    }