Revert widget changes

This commit is contained in:
M66B
2022-03-05 11:00:33 +01:00
parent c1ebf5a69a
commit ba0809ba2d
7 changed files with 12 additions and 59 deletions

View File

@@ -114,12 +114,12 @@ public class Widget extends AppWidgetProvider {
if (layout == 1)
views.setImageViewResource(R.id.ivMessage, unseen == 0
? R.drawable.widget_new_baseline_mail_outline_widget_24
: R.drawable.widget_new_baseline_mail_widget_24);
? R.drawable.baseline_mail_outline_widget_24
: R.drawable.baseline_mail_widget_24);
else
views.setImageViewResource(R.id.ivMessage, unseen == 0
? R.drawable.widget_old_twotone_mail_outline_24
: R.drawable.widget_old_baseline_mail_24);
? R.drawable.twotone_mail_outline_24
: R.drawable.baseline_mail_24);
views.setTextViewText(R.id.tvCount, unseen < 100 ? nf.format(unseen) : "99+");
views.setViewVisibility(R.id.tvCount, layout == 1 && unseen == 0 ? View.GONE : View.VISIBLE);
@@ -134,10 +134,10 @@ public class Widget extends AppWidgetProvider {
else
views.setInt(android.R.id.background, "setBackgroundColor", background);
//int colorWidgetForeground = context.getResources().getColor(R.color.colorWidgetForeground);
//views.setInt(R.id.ivMessage, "setColorFilter", colorWidgetForeground);
//views.setTextColor(R.id.tvCount, colorWidgetForeground);
//views.setTextColor(R.id.tvAccount, colorWidgetForeground);
int colorWidgetForeground = context.getResources().getColor(R.color.colorWidgetForeground);
views.setInt(R.id.ivMessage, "setColorFilter", colorWidgetForeground);
views.setTextColor(R.id.tvCount, colorWidgetForeground);
views.setTextColor(R.id.tvAccount, colorWidgetForeground);
} else {
float lum = (float) ColorUtils.calculateLuminance(background);