mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Use colours from style guide.
This commit is contained in:
@@ -164,7 +164,7 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
|
||||
nc.setLockscreenVisibility(VISIBILITY_SECRET);
|
||||
nc.enableVibration(true);
|
||||
nc.enableLights(true);
|
||||
nc.setLightColor(getColor(appContext, R.color.briar_green_light));
|
||||
nc.setLightColor(getColor(appContext, R.color.briar_lime_400));
|
||||
notificationManager.createNotificationChannel(nc);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class PendingContactListActivity extends BriarActivity
|
||||
list.showProgressBar();
|
||||
|
||||
offlineSnackbar = new BriarSnackbarBuilder()
|
||||
.setBackgroundColor(R.color.briar_red)
|
||||
.setBackgroundColor(R.color.briar_red_500)
|
||||
.make(list, R.string.offline_state, LENGTH_INDEFINITE);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ class PendingContactViewHolder extends ViewHolder {
|
||||
});
|
||||
|
||||
int color = ContextCompat
|
||||
.getColor(status.getContext(), R.color.briar_green);
|
||||
.getColor(status.getContext(), R.color.briar_lime_600);
|
||||
switch (item.getState()) {
|
||||
case WAITING_FOR_CONNECTION:
|
||||
color = ContextCompat
|
||||
.getColor(status.getContext(), R.color.briar_yellow);
|
||||
color = ContextCompat.getColor(status.getContext(),
|
||||
R.color.briar_orange_500);
|
||||
status.setText(R.string.waiting_for_contact_to_come_online);
|
||||
break;
|
||||
case OFFLINE:
|
||||
@@ -64,7 +64,7 @@ class PendingContactViewHolder extends ViewHolder {
|
||||
break;
|
||||
case FAILED:
|
||||
color = ContextCompat
|
||||
.getColor(status.getContext(), R.color.briar_red);
|
||||
.getColor(status.getContext(), R.color.briar_red_500);
|
||||
status.setText(R.string.adding_contact_failed);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,8 @@ class ConversationMessageViewHolder extends ConversationItemViewHolder {
|
||||
|
||||
// remember original status text color
|
||||
timeColor = time.getCurrentTextColor();
|
||||
timeColorBubble = getColor(v.getContext(), R.color.briar_white);
|
||||
timeColorBubble =
|
||||
getColor(v.getContext(), R.color.msg_status_bubble_foreground);
|
||||
|
||||
// clone constraint sets from layout files
|
||||
textConstraints.clone(v.getContext(),
|
||||
|
||||
@@ -299,7 +299,7 @@ public class ImageActivity extends BriarActivity
|
||||
int stringRes = error ?
|
||||
R.string.save_image_error : R.string.save_image_success;
|
||||
int colorRes = error ?
|
||||
R.color.briar_red : R.color.briar_primary;
|
||||
R.color.briar_red_500 : R.color.briar_primary;
|
||||
new BriarSnackbarBuilder()
|
||||
.setBackgroundColor(colorRes)
|
||||
.make(layout, stringRes, LENGTH_LONG)
|
||||
|
||||
@@ -432,8 +432,8 @@ public class NavDrawerActivity extends BriarActivity implements
|
||||
|
||||
@ColorRes
|
||||
private int getIconColor(State state) {
|
||||
if (state == ACTIVE) return R.color.briar_green_light;
|
||||
else if (state == ENABLING) return R.color.briar_yellow;
|
||||
if (state == ACTIVE) return R.color.briar_lime_400;
|
||||
else if (state == ENABLING) return R.color.briar_orange_500;
|
||||
else return android.R.color.tertiary_text_light;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BriarNotificationBuilder extends NotificationCompat.Builder {
|
||||
// https://issuetracker.google.com/issues/36961721
|
||||
setAutoCancel(true);
|
||||
|
||||
setLights(ContextCompat.getColor(context, R.color.briar_green_light),
|
||||
setLights(ContextCompat.getColor(context, R.color.briar_lime_400),
|
||||
750, 500);
|
||||
if (SDK_INT >= 21) setVisibility(VISIBILITY_PRIVATE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user