mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 13:24:52 +02:00
Revert widget changes
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="16dp"
|
||||
android:tint="@color/colorWidgetForeground"
|
||||
android:viewportWidth="20.0"
|
||||
android:viewportHeight="16.0">
|
||||
<group
|
||||
android:translateX="-2.0"
|
||||
android:translateY="-4.0">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8l8,5 8,-5v10zM12,11L4,6h16l-8,5z" />
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,15 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="16dp"
|
||||
android:tint="@color/colorWidgetForeground"
|
||||
android:viewportWidth="20.0"
|
||||
android:viewportHeight="16.0">
|
||||
<group
|
||||
android:translateX="-2.0"
|
||||
android:translateY="-4.0">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z" />
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/colorWidgetForeground"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z" />
|
||||
</vector>
|
||||
@@ -1,10 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/colorWidgetForeground"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8l8,5 8,-5v10zM12,11L4,6h16l-8,5z" />
|
||||
</vector>
|
||||
@@ -20,7 +20,8 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="2"
|
||||
android:contentDescription="@string/title_legend_count"
|
||||
android:src="@drawable/widget_old_baseline_mail_24" />
|
||||
android:src="@drawable/baseline_mail_24"
|
||||
app:tint="@color/colorWidgetForeground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCount"
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
android:contentDescription="@string/title_legend_count"
|
||||
android:padding="3dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/widget_new_baseline_mail_widget_24" />
|
||||
android:src="@drawable/baseline_mail_widget_24"
|
||||
app:tint="@color/colorWidgetForeground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCount"
|
||||
|
||||
Reference in New Issue
Block a user