Skip to content

Commit

Permalink
feat: change to outline icons
Browse files Browse the repository at this point in the history
  • Loading branch information
NextAlone committed Mar 22, 2022
1 parent ef684c1 commit d9271d0
Show file tree
Hide file tree
Showing 54 changed files with 457 additions and 450 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8109,7 +8109,7 @@ public static void createCommonResources(Context context) {

Resources resources = context.getResources();

avatarDrawables[0] = resources.getDrawable(R.drawable.baseline_bookmark_24);
avatarDrawables[0] = resources.getDrawable(R.drawable.chats_saved);
avatarDrawables[1] = resources.getDrawable(R.drawable.ghost);
avatarDrawables[2] = resources.getDrawable(R.drawable.folders_private);
avatarDrawables[3] = resources.getDrawable(R.drawable.folders_requests);
Expand Down Expand Up @@ -8585,7 +8585,7 @@ public static void createChatResources(Context context, boolean fontsOnly) {
chat_pollCheckDrawable[a] = resources.getDrawable(R.drawable.poll_right).mutate();
chat_pollCrossDrawable[a] = resources.getDrawable(R.drawable.poll_wrong).mutate();
chat_pollHintDrawable[a] = resources.getDrawable(R.drawable.smiles_panel_objects).mutate();
chat_psaHelpDrawable[a] = resources.getDrawable(R.drawable.baseline_help_24).mutate();
chat_psaHelpDrawable[a] = resources.getDrawable(R.drawable.msg_psa).mutate();
}

calllog_msgCallUpRedDrawable = resources.getDrawable(R.drawable.ic_call_made_green_18dp).mutate();
Expand Down Expand Up @@ -8707,8 +8707,8 @@ public static void createChatResources(Context context, boolean fontsOnly) {
chat_photoStatesDrawables[12][0] = resources.getDrawable(R.drawable.doc_big).mutate();
chat_photoStatesDrawables[12][1] = resources.getDrawable(R.drawable.doc_big).mutate();

chat_contactDrawable[0] = createCircleDrawableWithIcon(AndroidUtilities.dp(44), R.drawable.baseline_person_24);
chat_contactDrawable[1] = createCircleDrawableWithIcon(AndroidUtilities.dp(44), R.drawable.baseline_person_24);
chat_contactDrawable[0] = createCircleDrawableWithIcon(AndroidUtilities.dp(44), R.drawable.msg_contact);
chat_contactDrawable[1] = createCircleDrawableWithIcon(AndroidUtilities.dp(44), R.drawable.msg_contact);

chat_locationDrawable[0] = resources.getDrawable(R.drawable.msg_location).mutate();
chat_locationDrawable[1] = resources.getDrawable(R.drawable.msg_location).mutate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ public void onBindViewHolder(int section, int position, RecyclerView.ViewHolder
if (section == 0) {
if (needPhonebook) {
if (position == 0) {
textCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.baseline_person_add_24, false);
textCell.setTextAndIcon(LocaleController.getString("InviteFriends", R.string.InviteFriends), R.drawable.menu_invite, false);
} else if (position == 1) {
textCell.setTextAndIcon(LocaleController.getString("AddPeopleNearby", R.string.AddPeopleNearby), R.drawable.baseline_location_on_24, false);
textCell.setTextAndIcon(LocaleController.getString("AddPeopleNearby", R.string.AddPeopleNearby), R.drawable.menu_location, false);
}
} else if (isAdmin) {
if (isChannel) {
Expand All @@ -453,11 +453,11 @@ public void onBindViewHolder(int section, int position, RecyclerView.ViewHolder
}
} else {
if (position == 0) {
textCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.baseline_group_24, false);
textCell.setTextAndIcon(LocaleController.getString("NewGroup", R.string.NewGroup), R.drawable.menu_groups, false);
} else if (position == 1) {
textCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.baseline_security_24, false);
textCell.setTextAndIcon(LocaleController.getString("NewSecretChat", R.string.NewSecretChat), R.drawable.menu_secret, false);
} else if (position == 2) {
textCell.setTextAndIcon(LocaleController.getString("NewChannel", R.string.NewChannel), R.drawable.baseline_bullhorn_24, false);
textCell.setTextAndIcon(LocaleController.getString("NewChannel", R.string.NewChannel), R.drawable.menu_broadcast, false);
}
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,16 @@ private void resetItems() {
if (!UserConfig.getInstance(UserConfig.selectedAccount).isClientActivated()) {
return;
}
int contactsIcon = R.drawable.baseline_perm_contact_calendar_24;
int savedIcon = R.drawable.baseline_bookmark_24;
int settingsIcon = R.drawable.baseline_settings_24;
int callsIcon = R.drawable.baseline_call_24;
int contactsIcon = R.drawable.menu_contacts;
int savedIcon = R.drawable.menu_saved;
int settingsIcon = R.drawable.menu_settings;
int callsIcon = R.drawable.menu_calls;
items.add(new Item(6, LocaleController.getString("Contacts", R.string.Contacts), contactsIcon));
items.add(new Item(11, LocaleController.getString("SavedMessages", R.string.SavedMessages), savedIcon));
items.add(new Item(8, LocaleController.getString("Settings", R.string.Settings), settingsIcon));
items.add(new Item(10, LocaleController.getString("Calls", R.string.Calls), callsIcon));
if (NekoConfig.useProxyItem.Bool() && (!NekoConfig.hideProxyByDefault.Bool() || SharedConfig.proxyEnabled)) {
items.add(new CheckItem(13, LocaleController.getString("Proxy", R.string.Proxy), R.drawable.baseline_security_24, () -> SharedConfig.proxyEnabled, () -> {
items.add(new CheckItem(13, LocaleController.getString("Proxy", R.string.Proxy), R.drawable.menu_policy, () -> SharedConfig.proxyEnabled, () -> {
SharedConfig.setProxyEnable(!SharedConfig.proxyEnabled);
return true;
}));
Expand All @@ -285,7 +285,7 @@ private void resetItems() {
if (NekoXConfig.keepOnlineStatus) {
message += " (" + LocaleController.getString("Locked", R.string.Locked) + ")";
}
items.add(new CheckItem(14, message, R.drawable.baseline_visibility_24, () -> online, () -> {
items.add(new CheckItem(14, message, R.drawable.msg_views, () -> online, () -> {
MessagesController controller = MessagesController.getInstance(UserConfig.selectedAccount);
controller.updateStatus(!online);
return true;
Expand Down Expand Up @@ -371,4 +371,4 @@ public void bindCheck(DrawerActionCheckCell actionCell) {

}

}
}
10 changes: 5 additions & 5 deletions TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ private void showCopyPopup(String urlFinal) {
builder.addTitle(urlFinal);
builder.addItems(
new String[]{LocaleController.getString("Open", R.string.Open), LocaleController.getString("Copy", R.string.Copy), LocaleController.getString("ShareQRCode", R.string.ShareQRCode)},
new int[]{R.drawable.baseline_open_in_browser_24, R.drawable.baseline_content_copy_24, R.drawable.wallet_qr}, (which, text, cell) -> {
new int[]{R.drawable.msg_openin, R.drawable.msg_copy, R.drawable.wallet_qr}, (which, text, cell) -> {
if (parentActivity == null) return Unit.INSTANCE;
if (which == 0 || which == 2) {
int index;
Expand Down Expand Up @@ -3559,13 +3559,13 @@ public void toggleSubMenu() {
menuButton.setDuplicateParentStateEnabled(false);
menuButton.setClickable(true);
menuButton.setIcon(R.drawable.ic_ab_other);
menuButton.addSubItem(search_item, R.drawable.baseline_search_24, LocaleController.getString("Search", R.string.Search));
menuButton.addSubItem(search_item, R.drawable.msg_search, LocaleController.getString("Search", R.string.Search));

transMenu = menuButton.addSubItem(trans_item, R.drawable.ic_translate, LocaleController.getString("Translate", R.string.Translate));

menuButton.addSubItem(share_item, R.drawable.baseline_share_24, LocaleController.getString("ShareFile", R.string.ShareFile));
menuButton.addSubItem(open_item, R.drawable.baseline_open_in_browser_24, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
menuButton.addSubItem(settings_item, R.drawable.baseline_settings_24, LocaleController.getString("Settings", R.string.Settings));
menuButton.addSubItem(share_item, R.drawable.msg_share, LocaleController.getString("ShareFile", R.string.ShareFile));
menuButton.addSubItem(open_item, R.drawable.msg_openin, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));
menuButton.addSubItem(settings_item, R.drawable.menu_settings, LocaleController.getString("Settings", R.string.Settings));
menuButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.ACTION_BAR_WHITE_SELECTOR_COLOR));
menuButton.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
menuContainer.addView(menuButton, LayoutHelper.createFrame(48, 56));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ protected boolean canDismissWithSwipe() {
private void resetData() {
BottomBuilder builder = new BottomBuilder(getParentActivity());
builder.addTitle(LocaleController.getString("StorageResetInfo", R.string.StorageResetInfo));
builder.addItem(LocaleController.getString("CacheClear", R.string.CacheClear), R.drawable.baseline_delete_sweep_24, true, (i) -> {
builder.addItem(LocaleController.getString("CacheClear", R.string.CacheClear), R.drawable.msg_clear, true, (i) -> {
if (getParentActivity() == null) {
return Unit.INSTANCE;
}
Expand Down Expand Up @@ -604,7 +604,7 @@ private void resetData() {
private void clearDatabase() {
BottomBuilder builder = new BottomBuilder(getParentActivity());
builder.addTitle(LocaleController.getString("LocalDatabaseClearText", R.string.LocalDatabaseClearText));
builder.addItem(LocaleController.getString("CacheClear", R.string.CacheClear), R.drawable.baseline_delete_sweep_24, true, (i) -> {
builder.addItem(LocaleController.getString("CacheClear", R.string.CacheClear), R.drawable.msg_clear, true, (i) -> {
if (getParentActivity() == null) {
return Unit.INSTANCE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public void onItemClick(int id) {
ActionBarMenu menu = actionBar.createMenu();
otherItem = menu.addItem(10, R.drawable.ic_ab_other);
otherItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
otherItem.addSubItem(delete_all_calls, R.drawable.baseline_delete_sweep_24, LocaleController.getString("DeleteAllCalls", R.string.DeleteAllCalls));
otherItem.addSubItem(delete_all_calls, R.drawable.msg_delete, LocaleController.getString("DeleteAllCalls", R.string.DeleteAllCalls));

fragmentView = new FrameLayout(context);
fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
Expand Down Expand Up @@ -695,8 +695,8 @@ private void createActionMode() {
actionMode.addView(selectedDialogsCountTextView, LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f, 72, 0, 0, 0));
selectedDialogsCountTextView.setOnTouchListener((v, event) -> true);

actionModeViews.add(actionMode.addItemWithWidth(delete, R.drawable.baseline_delete_24, AndroidUtilities.dp(54), LocaleController.getString("Delete", R.string.Delete)));
}
actionModeViews.add(actionMode.addItemWithWidth(delete, R.drawable.msg_delete, AndroidUtilities.dp(54), LocaleController.getString("Delete", R.string.Delete)));
}

private boolean addOrRemoveSelectedDialog(ArrayList<TLRPC.Message> messages, CallCell cell) {
if (messages.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public AccountSelectCell(Context context, boolean hasInfo) {
textView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem));

checkImageView = new ImageView(context);
checkImageView.setImageResource(R.drawable.baseline_check_24);
checkImageView.setImageResource(R.drawable.account_check);
checkImageView.setScaleType(ImageView.ScaleType.CENTER);
checkImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_menuItemCheck), PorterDuff.Mode.SRC_IN));
addView(checkImageView, LayoutHelper.createFrame(40, LayoutHelper.MATCH_PARENT, Gravity.RIGHT | Gravity.TOP, 0, 0, 6, 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void setType(int type) {
imageView.setLayoutParams(LayoutHelper.createFrame(44, 44, Gravity.CENTER, 0, 0, 2, 27));
imageView2.setLayoutParams(LayoutHelper.createFrame(44, 44, Gravity.CENTER, 0, 0, 2, 27));
} else {
imageView.setImageResource(R.drawable.baseline_open_in_browser_24);
imageView.setImageResource(R.drawable.msg_openin);
imageView2.setVisibility(GONE);
textView.setText(LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public void setTheme(Theme.ThemeInfo theme, boolean last, boolean first) {
if (themeInfo.info.document != null) {
themeInfo.themeLoaded = false;
placeholderAlpha = 1.0f;
loadingDrawable = getResources().getDrawable(R.drawable.baseline_palette_24).mutate();
loadingDrawable = getResources().getDrawable(R.drawable.msg_theme).mutate();
Theme.setDrawableColor(loadingDrawable, loadingColor = Theme.getColor(Theme.key_windowBackgroundWhiteGrayText7));
if (!fileExists) {
String name = FileLoader.getAttachFileName(themeInfo.info.document);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ public void onClick(View view) {

searchCalendarButton = new ImageView(context);
searchCalendarButton.setScaleType(ImageView.ScaleType.CENTER);
searchCalendarButton.setImageResource(R.drawable.baseline_date_range_24);
searchCalendarButton.setImageResource(R.drawable.msg_calendar);
searchCalendarButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_searchPanelIcons), PorterDuff.Mode.SRC_IN));
searchContainer.addView(searchCalendarButton, LayoutHelper.createFrame(48, 48, Gravity.RIGHT | Gravity.TOP));
searchCalendarButton.setOnClickListener(view -> {
Expand Down Expand Up @@ -2189,7 +2189,7 @@ public void didPressUrl(ChatMessageCell cell, final CharacterStyle url, boolean
builder.addTitle(urlFinal);
builder.addItems(
new String[]{LocaleController.getString("Open", R.string.Open), LocaleController.getString("Copy", R.string.Copy), LocaleController.getString("ShareQRCode", R.string.ShareQRCode)},
new int[]{R.drawable.baseline_open_in_browser_24, R.drawable.baseline_content_copy_24, R.drawable.wallet_qr}, (which, text, __) -> {
new int[]{R.drawable.msg_openin, R.drawable.msg_copy, R.drawable.wallet_qr}, (which, text, __) -> {
if (which == 0 || which == 2) {
if (which == 0) {
Browser.openUrl(getParentActivity(), urlFinal);
Expand Down
Loading

0 comments on commit d9271d0

Please sign in to comment.