use proper alpha for dark themed icons

This commit is contained in:
Daniel Gultsch 2017-06-04 00:05:02 +02:00
parent 51badfa721
commit 012f60be56
27 changed files with 21 additions and 17 deletions

View file

@ -560,10 +560,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
} }
} }
int ic_notifications = getThemeResource(R.attr.icon_notifications, R.drawable.ic_notifications_black54_24dp); int ic_notifications = getThemeResource(R.attr.icon_notifications, R.drawable.ic_notifications_black_24dp);
int ic_notifications_off = getThemeResource(R.attr.icon_notifications_off, R.drawable.ic_notifications_off_black54_24dp); int ic_notifications_off = getThemeResource(R.attr.icon_notifications_off, R.drawable.ic_notifications_off_black_24dp);
int ic_notifications_paused = getThemeResource(R.attr.icon_notifications_paused, R.drawable.ic_notifications_paused_black54_24dp); int ic_notifications_paused = getThemeResource(R.attr.icon_notifications_paused, R.drawable.ic_notifications_paused_black_24dp);
int ic_notifications_none = getThemeResource(R.attr.icon_notifications_none, R.drawable.ic_notifications_none_black54_24dp); int ic_notifications_none = getThemeResource(R.attr.icon_notifications_none, R.drawable.ic_notifications_none_black_24dp);
long mutedTill = mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL,0); long mutedTill = mConversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL,0);
if (mutedTill == Long.MAX_VALUE) { if (mutedTill == Long.MAX_VALUE) {

View file

@ -1515,7 +1515,9 @@ public class ConversationActivity extends XmppActivity
} }
}); });
} }
builder.create().show(); AlertDialog dialog = builder.create();
dialog.setCanceledOnTouchOutside(false);
dialog.show();
} }
} }

View file

@ -126,17 +126,17 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
long muted_till = conversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL,0); long muted_till = conversation.getLongAttribute(Conversation.ATTRIBUTE_MUTED_TILL,0);
if (muted_till == Long.MAX_VALUE) { if (muted_till == Long.MAX_VALUE) {
notificationStatus.setVisibility(View.VISIBLE); notificationStatus.setVisibility(View.VISIBLE);
int ic_notifications_off = activity.getThemeResource(R.attr.icon_notifications_off, R.drawable.ic_notifications_off_black54_24dp); int ic_notifications_off = activity.getThemeResource(R.attr.icon_notifications_off, R.drawable.ic_notifications_off_black_24dp);
notificationStatus.setImageResource(ic_notifications_off); notificationStatus.setImageResource(ic_notifications_off);
} else if (muted_till >= System.currentTimeMillis()) { } else if (muted_till >= System.currentTimeMillis()) {
notificationStatus.setVisibility(View.VISIBLE); notificationStatus.setVisibility(View.VISIBLE);
int ic_notifications_paused = activity.getThemeResource(R.attr.icon_notifications_paused, R.drawable.ic_notifications_paused_black54_24dp); int ic_notifications_paused = activity.getThemeResource(R.attr.icon_notifications_paused, R.drawable.ic_notifications_paused_black_24dp);
notificationStatus.setImageResource(ic_notifications_paused); notificationStatus.setImageResource(ic_notifications_paused);
} else if (conversation.alwaysNotify()) { } else if (conversation.alwaysNotify()) {
notificationStatus.setVisibility(View.GONE); notificationStatus.setVisibility(View.GONE);
} else { } else {
notificationStatus.setVisibility(View.VISIBLE); notificationStatus.setVisibility(View.VISIBLE);
int ic_notifications_none = activity.getThemeResource(R.attr.icon_notifications_none, R.drawable.ic_notifications_none_black54_24dp); int ic_notifications_none = activity.getThemeResource(R.attr.icon_notifications_none, R.drawable.ic_notifications_none_black_24dp);
notificationStatus.setImageResource(ic_notifications_none); notificationStatus.setImageResource(ic_notifications_none);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,015 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -134,6 +134,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="?android:selectableItemBackground" android:background="?android:selectableItemBackground"
android:padding="@dimen/image_button_padding" android:padding="@dimen/image_button_padding"
android:alpha="?attr/icon_alpha"
android:src="?attr/icon_notifications"/> android:src="?attr/icon_notifications"/>
</RelativeLayout> </RelativeLayout>

View file

@ -109,6 +109,7 @@
android:layout_alignWithParentIfMissing="true" android:layout_alignWithParentIfMissing="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:alpha="?attr/icon_alpha"
android:src="?attr/icon_notifications" android:src="?attr/icon_notifications"
/> />
<eu.siacs.conversations.ui.widget.UnreadCountCustomView <eu.siacs.conversations.ui.widget.UnreadCountCustomView

View file

@ -73,10 +73,10 @@
<item name="attr/icon_share">@drawable/ic_share_white_24dp</item> <item name="attr/icon_share">@drawable/ic_share_white_24dp</item>
<item name="attr/icon_scan_qr_code">@drawable/ic_camera_alt_white_24dp</item> <item name="attr/icon_scan_qr_code">@drawable/ic_camera_alt_white_24dp</item>
<item name="attr/icon_notifications">@drawable/ic_notifications_black54_24dp</item> <item name="attr/icon_notifications">@drawable/ic_notifications_black_24dp</item>
<item name="attr/icon_notifications_off">@drawable/ic_notifications_off_black54_24dp</item> <item name="attr/icon_notifications_off">@drawable/ic_notifications_off_black_24dp</item>
<item name="attr/icon_notifications_paused">@drawable/ic_notifications_paused_black54_24dp</item> <item name="attr/icon_notifications_paused">@drawable/ic_notifications_paused_black_24dp</item>
<item name="attr/icon_notifications_none">@drawable/ic_notifications_none_black54_24dp</item> <item name="attr/icon_notifications_none">@drawable/ic_notifications_none_black_24dp</item>
</style> </style>
<style name="ConversationsTheme.Dark" parent="android:Theme.Material"> <style name="ConversationsTheme.Dark" parent="android:Theme.Material">
@ -123,7 +123,7 @@
<item name="attr/conversations_overview_background">@color/primary900</item> <item name="attr/conversations_overview_background">@color/primary900</item>
<item name="attr/icon_alpha">1.0</item> <item name="attr/icon_alpha">0.7</item>
<item name="attr/dialog_horizontal_padding">24dp</item> <item name="attr/dialog_horizontal_padding">24dp</item>
<item name="attr/dialog_vertical_padding">16dp</item> <item name="attr/dialog_vertical_padding">16dp</item>

View file

@ -70,10 +70,10 @@
<item name="attr/icon_share">@drawable/ic_action_share</item> <item name="attr/icon_share">@drawable/ic_action_share</item>
<item name="attr/icon_scan_qr_code">@drawable/ic_action_camera</item> <item name="attr/icon_scan_qr_code">@drawable/ic_action_camera</item>
<item name="attr/icon_notifications">@drawable/ic_notifications_black54_24dp</item> <item name="attr/icon_notifications">@drawable/ic_notifications_black_24dp</item>
<item name="attr/icon_notifications_off">@drawable/ic_notifications_off_black54_24dp</item> <item name="attr/icon_notifications_off">@drawable/ic_notifications_off_black_24dp</item>
<item name="attr/icon_notifications_paused">@drawable/ic_notifications_paused_black54_24dp</item> <item name="attr/icon_notifications_paused">@drawable/ic_notifications_paused_black_24dp</item>
<item name="attr/icon_notifications_none">@drawable/ic_notifications_none_black54_24dp</item> <item name="attr/icon_notifications_none">@drawable/ic_notifications_none_black_24dp</item>
</style> </style>
<style name="ConversationsTheme.Dark" parent="@android:style/Theme.Holo"> <style name="ConversationsTheme.Dark" parent="@android:style/Theme.Holo">