Skip to content

Commit

Permalink
fix: replace baseline icon
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Mar 29, 2023
1 parent f487547 commit 66a03eb
Show file tree
Hide file tree
Showing 25 changed files with 70 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ protected void onDraw(Canvas canvas) {
case ACTION_TYPE_CHANGE_PHONE_NUMBER: {
BottomBuilder builder = new BottomBuilder(getParentActivity());
builder.addTitle(LocaleController.getString("PhoneNumberAlert", R.string.PhoneNumberAlert));
builder.addItem(LocaleController.getString("Change", R.string.Change),R.drawable.baseline_check_circle_24, i -> {
builder.addItem(LocaleController.getString("Change", R.string.Change),R.drawable.msg_check, i -> {
presentFragment(new LoginActivity().changePhoneNumber(), true);
return Unit.INSTANCE;
});
Expand Down
70 changes: 41 additions & 29 deletions TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public static Dialog createWebViewPermissionsRequestDialog(Context ctx, Theme.Re
public static BottomBuilder createApkRestrictedDialog(Context ctx, Theme.ResourcesProvider resourcesProvider) {
BottomBuilder builder = new BottomBuilder(ctx);
builder.addTitle(LocaleController.getString("ApkRestricted", R.string.ApkRestricted));
builder.addItem(LocaleController.getString("PermissionOpenSettings", R.string.PermissionOpenSettings), R.drawable.baseline_settings_24, (i) -> {
builder.addItem(LocaleController.getString("PermissionOpenSettings", R.string.PermissionOpenSettings), R.drawable.menu_settings, (i) -> {
try {
ctx.startActivity(new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, Uri.parse("package:" + ctx.getPackageName())));
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ public void onClick(View v) {
attachButton = new ImageView(context);
attachButton.setScaleType(ImageView.ScaleType.CENTER);
attachButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_chat_messagePanelIcons), PorterDuff.Mode.SRC_IN));
attachButton.setImageResource(R.drawable.deproko_baseline_attach_26);
attachButton.setImageResource(R.drawable.input_attach);
if (Build.VERSION.SDK_INT >= 21) {
attachButton.setBackgroundDrawable(Theme.createSelectorDrawable(getThemedColor(Theme.key_listSelector)));
}
Expand Down Expand Up @@ -3699,9 +3699,9 @@ public boolean onTouch(View v, MotionEvent event) {
if (scheduleButtonValue) {
ActionBarMenuSubItem scheduleButton = new ActionBarMenuSubItem(getContext(), true, !sendWithoutSoundButtonValue, resourcesProvider);
if (self) {
scheduleButton.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
scheduleButton.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_calendar);
} else {
scheduleButton.setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.baseline_date_range_24);
scheduleButton.setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_calendar);
}
scheduleButton.setMinimumWidth(AndroidUtilities.dp(196));
scheduleButton.setOnClickListener(v -> {
Expand Down Expand Up @@ -8583,7 +8583,7 @@ private void updateBotButton(boolean animated) {
} else {
if (!canShowBotsMenu && !NaConfig.INSTANCE.getHideBotButtonInInputField().Bool()) {
createBotButton();
botButtonDrawable.setIcon(R.drawable.deproko_baseline_bots_command_26, true);
botButtonDrawable.setIcon(R.drawable.input_bot1, true);
botButton.setContentDescription(LocaleController.getString("AccDescrBotCommands", R.string.AccDescrBotCommands));
botButton.setVisibility(VISIBLE);
} else if (botButton != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2492,9 +2492,9 @@ public boolean onTouch(View v, MotionEvent event) {
itemCells[a].setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
} else if (num == 1) {
if (UserObject.isUserSelf(user)) {
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_calendar);
} else {
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_calendar);
}
} else if (num == 2) {
itemCells[a].setTextAndIcon(LocaleController.getString("SendWithoutSound", R.string.SendWithoutSound), R.drawable.input_notify_off);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ void onShow(ChatAttachAlert.AttachAlertLayout previousLayout) {
if (activity.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
BottomBuilder builder = new BottomBuilder(activity);
builder.addTitle(LocaleController.getString("PermissionNoLocation", R.string.PermissionNoLocation), true);
builder.addItem(LocaleController.getString("Ok", R.string.OK),R.drawable.baseline_check_circle_24, __ -> {
builder.addItem(LocaleController.getString("Ok", R.string.OK),R.drawable.msg_check, __ -> {
activity.requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, 2);
return Unit.INSTANCE;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void run() {
}
if (delegate.canSchedule()) {
items.add(LocaleController.getString("Schedule", R.string.Schedule));
icons.add(R.drawable.baseline_timer_24);
icons.add(R.drawable.msg_timer);
actions.add(3);
}
if (currentStickerSet != null && delegate.needOpen()) {
Expand Down Expand Up @@ -519,7 +519,7 @@ public void dismiss() {
}
if (delegate.canSchedule()) {
items.add(LocaleController.getString("Schedule", R.string.Schedule));
icons.add(R.drawable.baseline_timer_24);
icons.add(R.drawable.msg_timer);
actions.add(3);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ public void onOpenInPressed() {

} else {

writeButton.setImageResource(R.drawable.baseline_check_circle_24);
writeButton.setImageResource(R.drawable.msg_check);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ public boolean onTouch(View v, MotionEvent event) {
itemCells[a].setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
} else if (num == 1) {
if (UserObject.isUserSelf(user)) {
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_calendar);
} else {
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_calendar);
}
} else if (num == 2) {
itemCells[a].setTextAndIcon(LocaleController.getString("SendWithoutSound", R.string.SendWithoutSound), R.drawable.input_notify_off);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,9 @@ public boolean onTouch(View v, MotionEvent event) {
itemCells[a].setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
} else if (num == 1) {
if (UserObject.isUserSelf(user)) {
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_calendar);
} else {
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.baseline_date_range_24);
itemCells[a].setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_calendar);
}
} else if (num == 2) {
itemCells[a].setTextAndIcon(LocaleController.getString("SendWithoutSound", R.string.SendWithoutSound), R.drawable.input_notify_off);
Expand Down
4 changes: 2 additions & 2 deletions TMessagesProj/src/main/java/org/telegram/ui/PhotoViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5812,9 +5812,9 @@ public void setAlpha(float alpha) {
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(parentActivity, a == 0, a == 3, resourcesProvider);
if (a == 0) {
if (UserObject.isUserSelf(user)) {
cell.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_timer_24);
cell.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_timer);
} else {
cell.setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.baseline_timer_24);
cell.setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_timer);
}
} else if (a == 1) {
cell.setTextAndIcon(LocaleController.getString("SendWithoutSound", R.string.SendWithoutSound), R.drawable.input_notify_off);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,15 +719,15 @@ public void startDocumentSelectActivity() {
} else if (id == menu_delete_all) {
AlertUtil.showConfirm(getParentActivity(),
LocaleController.getString("DeleteAllServer", R.string.DeleteAllServer),
R.drawable.baseline_delete_24, LocaleController.getString("Delete", R.string.Delete),
R.drawable.msg_delete, LocaleController.getString("Delete", R.string.Delete),
true, () -> {
SharedConfig.deleteAllProxy();
updateRows(true);
});
} else if (id == menu_delete_unavailable) {
AlertUtil.showConfirm(getParentActivity(),
LocaleController.getString("DeleteUnavailableServer", R.string.DeleteUnavailableServer),
R.drawable.baseline_delete_24, LocaleController.getString("Delete", R.string.Delete),
R.drawable.msg_delete, LocaleController.getString("Delete", R.string.Delete),
true, () -> {
deleteUnavailableProxy();
});
Expand Down Expand Up @@ -921,11 +921,11 @@ protected void dispatchDraw(Canvas canvas) {
}, new int[]{

R.drawable.group_edit,
R.drawable.baseline_share_24,
R.drawable.msg_share,
R.drawable.wallet_qr,
R.drawable.baseline_link_24,
R.drawable.baseline_delete_24,
R.drawable.baseline_cancel_24
R.drawable.msg_link,
R.drawable.msg_delete,
R.drawable.msg_cancel

}, (i, text, cell) -> {

Expand Down Expand Up @@ -958,7 +958,7 @@ protected void dispatchDraw(Canvas canvas) {
} else if (i == 4) {
AlertUtil.showConfirm(getParentActivity(),
LocaleController.getString("DeleteProxy", R.string.DeleteProxy),
R.drawable.baseline_delete_24, LocaleController.getString("Delete", R.string.Delete),
R.drawable.msg_delete, LocaleController.getString("Delete", R.string.Delete),
true, () -> {

SharedConfig.deleteProxy(info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ public void onSearchFilterCleared(FiltersView.MediaFilterData filterData) {
}
other = menu.addItem(0, R.drawable.ic_ab_other, themeDelegate);
other.addSubItem(toggle_id, R.drawable.baseline_forum_24, LocaleController.getString("TopicViewAsMessages", R.string.TopicViewAsMessages));
addMemberSubMenu = other.addSubItem(add_member_id, R.drawable.baseline_person_add_24, LocaleController.getString("AddMember", R.string.AddMember));
createTopicSubmenu = other.addSubItem(create_topic_id, R.drawable.baseline_group_add_24, LocaleController.getString("CreateTopic", R.string.CreateTopic));
deleteChatSubmenu = other.addSubItem(delete_chat_id, R.drawable.baseline_exit_to_app_24, LocaleController.getString("LeaveMegaMenu", R.string.LeaveMegaMenu), themeDelegate);
addMemberSubMenu = other.addSubItem(add_member_id, R.drawable.menu_invite, LocaleController.getString("AddMember", R.string.AddMember));
createTopicSubmenu = other.addSubItem(create_topic_id, R.drawable.groups_create, LocaleController.getString("CreateTopic", R.string.CreateTopic));
deleteChatSubmenu = other.addSubItem(delete_chat_id, R.drawable.menu_newphone, LocaleController.getString("LeaveMegaMenu", R.string.LeaveMegaMenu), themeDelegate);

avatarContainer = new ChatAvatarContainer(context, this, false);
avatarContainer.getAvatarImageView().setRoundRadius(AndroidUtilities.dp(16));
Expand Down Expand Up @@ -1897,7 +1897,7 @@ public void toggleMute() {

if (ChatObject.canDeleteTopic(currentAccount, getCurrentChat(), topic)) {
ActionBarMenuSubItem deleteItem = new ActionBarMenuSubItem(getParentActivity(), false, true);
deleteItem.setTextAndIcon(LocaleController.getPluralString("DeleteTopics", 1), R.drawable.baseline_delete_24);
deleteItem.setTextAndIcon(LocaleController.getPluralString("DeleteTopics", 1), R.drawable.msg_delete);
deleteItem.setIconColor(getThemedColor(Theme.key_dialogRedIcon));
deleteItem.setTextColor(getThemedColor(Theme.key_dialogTextRed));
deleteItem.setMinimumWidth(160);
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 66a03eb

Please sign in to comment.