2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Update some icons.

This commit is contained in:
John Preston
2022-02-25 16:11:49 +03:00
parent aa012b6d0b
commit 1710863231
668 changed files with 180 additions and 272 deletions

View File

@@ -582,7 +582,7 @@ rightsCheckbox: Checkbox(defaultCheckbox) {
rightsToggle: Toggle(defaultToggle) {
toggledFg: windowBgActive;
untoggledFg: attentionButtonFg;
lockIcon: icon {{ "info_rights_lock", windowBgActive }};
lockIcon: icon {{ "info/info_rights_lock", windowBgActive }};
xsize: 8px;
vsize: 5px;
vshift: 1px;
@@ -776,7 +776,7 @@ createPollOptionRemove: CrossButton {
cross: CrossAnimation {
size: 22px;
skip: 6px;
stroke: 1px;
stroke: 1.;
minScale: 0.3;
}
crossFg: boxTitleCloseFg;

View File

@@ -928,8 +928,8 @@ void SessionsContent::Inner::setupContent() {
CreateButton(
terminateInner,
tr::lng_sessions_terminate_all(),
st::sessionsTerminateAll,
{ .icon = &st::sessionsTerminateAllIcon }));
st::infoBlockButton,
{ .icon = &st::infoIconBlock }));
AddSkip(terminateInner);
AddDividerText(terminateInner, tr::lng_sessions_terminate_all_about());

View File

@@ -753,7 +753,7 @@ groupCallAddMember: SettingsButton(defaultSettingsButton) {
ripple: groupCallRipple;
}
groupCallAddMemberIcon: icon {{ "info_add_member", groupCallMemberInactiveIcon, point(0px, 3px) }};
groupCallAddMemberIcon: icon {{ "info/info_add_member", groupCallMemberInactiveIcon, point(0px, 3px) }};
groupCallSubtitleLabel: FlatLabel(defaultFlatLabel) {
maxHeight: 18px;
textFg: groupCallMemberNotJoinedStatus;
@@ -785,7 +785,7 @@ groupCallMenuToggle: IconButton {
icon: icon {{ "info/edit/dotsmini", groupCallMemberInactiveIcon }};
iconOver: icon {{ "info/edit/dotsmini", groupCallMemberInactiveIcon }};
iconPosition: point(6px, 6px);
iconPosition: point(2px, 2px);
rippleAreaPosition: point(3px, 3px);
rippleAreaSize: 30px;

View File

@@ -41,8 +41,8 @@ stickersRemove: IconButton(defaultIconButton) {
width: 40px;
height: 40px;
icon: icon {{ "info_media_delete", menuIconFg }};
iconOver: icon {{ "info_media_delete", menuIconFgOver }};
icon: icon {{ "info/info_media_delete", menuIconFg }};
iconOver: icon {{ "info/info_media_delete", menuIconFgOver }};
rippleAreaSize: 40px;
rippleAreaPosition: point(0px, 0px);
@@ -88,14 +88,14 @@ stickersReorderFg: windowSubTextFg;
stickersRowDisabledOpacity: 0.4;
stickersRowDuration: 200;
stickersSettings: icon {{ "emoji_settings", emojiIconFg }};
stickersTrending: icon {{ "stickers_add", emojiIconFg }};
stickersSettings: icon {{ "emoji/emoji_settings", emojiIconFg }};
stickersTrending: icon {{ "emoji/stickers_add", emojiIconFg }};
stickersTrendingUnread: icon {
{ "stickers_add_unread", emojiIconFg },
{ "stickers_add_dot", dialogsUnreadBg }
{ "emoji/stickers_add_unread", emojiIconFg },
{ "emoji/stickers_add_dot", dialogsUnreadBg }
};
stickersRecent: icon {{ "stickers_recent", emojiIconFg }};
stickersSearch: icon {{ "stickers_search", emojiIconFg, point(0px, 1px) }};
stickersRecent: icon {{ "emoji/stickers_recent", emojiIconFg }};
stickersSearch: icon {{ "emoji/stickers_search", emojiIconFg }};
stickersSettingsUnreadSize: 6px;
stickersSettingsUnreadPosition: point(6px, 10px);
@@ -112,22 +112,22 @@ emojiTabs: SettingsSlider(defaultTabsSlider) {
labelTop: 19px;
}
emojiScroll: defaultSolidScroll;
emojiRecent: icon {{ "emoji_recent", emojiIconFg }};
emojiRecentActive: icon {{ "emoji_recent", emojiIconFgActive }};
emojiPeople: icon {{ "emoji_people", emojiIconFg }};
emojiPeopleActive: icon {{ "emoji_people", emojiIconFgActive }};
emojiNature: icon {{ "emoji_nature", emojiIconFg }};
emojiNatureActive: icon {{ "emoji_nature", emojiIconFgActive }};
emojiFood: icon {{ "emoji_food", emojiIconFg }};
emojiFoodActive: icon {{ "emoji_food", emojiIconFgActive }};
emojiActivity: icon {{ "emoji_activity", emojiIconFg }};
emojiActivityActive: icon {{ "emoji_activity", emojiIconFgActive }};
emojiTravel: icon {{ "emoji_travel", emojiIconFg }};
emojiTravelActive: icon {{ "emoji_travel", emojiIconFgActive }};
emojiObjects: icon {{ "emoji_objects", emojiIconFg }};
emojiObjectsActive: icon {{ "emoji_objects", emojiIconFgActive }};
emojiSymbols: icon {{ "emoji_symbols", emojiIconFg }};
emojiSymbolsActive: icon {{ "emoji_symbols", emojiIconFgActive }};
emojiRecent: icon {{ "emoji/emoji_recent", emojiIconFg }};
emojiRecentActive: icon {{ "emoji/emoji_recent", emojiIconFgActive }};
emojiPeople: icon {{ "emoji/emoji_people", emojiIconFg }};
emojiPeopleActive: icon {{ "emoji/emoji_people", emojiIconFgActive }};
emojiNature: icon {{ "emoji/emoji_nature", emojiIconFg }};
emojiNatureActive: icon {{ "emoji/emoji_nature", emojiIconFgActive }};
emojiFood: icon {{ "emoji/emoji_food", emojiIconFg }};
emojiFoodActive: icon {{ "emoji/emoji_food", emojiIconFgActive }};
emojiActivity: icon {{ "emoji/emoji_activity", emojiIconFg }};
emojiActivityActive: icon {{ "emoji/emoji_activity", emojiIconFgActive }};
emojiTravel: icon {{ "emoji/emoji_travel", emojiIconFg }};
emojiTravelActive: icon {{ "emoji/emoji_travel", emojiIconFgActive }};
emojiObjects: icon {{ "emoji/emoji_objects", emojiIconFg }};
emojiObjectsActive: icon {{ "emoji/emoji_objects", emojiIconFgActive }};
emojiSymbols: icon {{ "emoji/emoji_symbols", emojiIconFg }};
emojiSymbolsActive: icon {{ "emoji/emoji_symbols", emojiIconFgActive }};
emojiFooterHeight: 46px;
emojiCategorySkip: 4px;
@@ -135,7 +135,7 @@ emojiCategory: IconButton {
width: 42px;
height: emojiFooterHeight;
iconPosition: point(-1px, 9px);
iconPosition: point(-1px, 6px);
}
emojiCategoryRecent: IconButton(emojiCategory) { icon: emojiRecent; }
emojiCategoryPeople: IconButton(emojiCategory) { icon: emojiPeople; }
@@ -175,8 +175,8 @@ emojiColorsSepColor: shadowFg;
emojiSwitchSkip: 27px;
emojiSwitchImgSkip: 21px;
emojiSwitchColor: windowActiveTextFg;
emojiSwitchStickers: icon {{ "emoji_switch", emojiSwitchColor }};
emojiSwitchEmoji: icon {{ "emoji_switch-flip_horizontal", emojiSwitchColor }};
emojiSwitchStickers: icon {{ "emoji/emoji_switch", emojiSwitchColor }};
emojiSwitchEmoji: icon {{ "emoji/emoji_switch-flip_horizontal", emojiSwitchColor }};
hashtagClose: IconButton {
width: 30px;
@@ -196,8 +196,8 @@ hashtagClose: IconButton {
stickerPanWidthMin: 64px;
stickerPanSize: size(stickerPanWidthMin, stickerPanWidthMin);
stickerPanPadding: 11px;
stickerPanDeleteIconBg: icon {{ "emoji_delete_bg", stickerPanDeleteBg }};
stickerPanDeleteIconFg: icon {{ "emoji_delete", stickerPanDeleteFg }};
stickerPanDeleteIconBg: icon {{ "emoji/emoji_delete_bg", stickerPanDeleteBg }};
stickerPanDeleteIconFg: icon {{ "emoji/emoji_delete", stickerPanDeleteFg }};
stickerPanDeleteOpacityBg: 0.3;
stickerPanDeleteOpacityBgOver: 0.5;
stickerPanDeleteOpacityFg: 0.8;

View File

@@ -167,7 +167,7 @@ dialogsCancelSearch: CrossButton {
cross: CrossAnimation {
size: 32px;
skip: 10px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
crossFg: dialogsMenuIconFg;

View File

@@ -739,6 +739,7 @@ void SettingsWidget::refreshButtons(
st::defaultBoxButton)
: nullptr;
if (start) {
start->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
start->show();
_startClicks = start->clicks() | rpl::to_empty;
@@ -754,6 +755,7 @@ void SettingsWidget::refreshButtons(
container.get(),
tr::lng_cancel(),
st::defaultBoxButton);
cancel->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
cancel->show();
_cancelClicks = cancel->clicks() | rpl::to_empty;

View File

@@ -63,7 +63,7 @@ infoLayerMediaSearch: SearchFieldRow(infoMediaSearch) {
cross: CrossAnimation {
size: 38px;
skip: 12px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
crossPosition: point(3px, 4px);
@@ -79,7 +79,7 @@ infoTopBarSearchRow: SearchFieldRow(infoLayerMediaSearch) {
cross: CrossAnimation {
size: 42px;
skip: 14px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
crossPosition: point(1px, 6px);
@@ -88,8 +88,8 @@ infoTopBarSearchRow: SearchFieldRow(infoLayerMediaSearch) {
infoSlideDuration: 0;
infoTopBarBackIcon: icon {{ "info_back", boxTitleCloseFg }};
infoTopBarBackIconOver: icon {{ "info_back", boxTitleCloseFgOver }};
infoTopBarBackIcon: icon {{ "info/info_back", boxTitleCloseFg }};
infoTopBarBackIconOver: icon {{ "info/info_back", boxTitleCloseFgOver }};
infoTopBarHeight: 54px;
infoTopBarBack: IconButton(defaultIconButton) {
width: 70px;
@@ -116,8 +116,8 @@ infoTopBarTitle: FlatLabel(defaultFlatLabel) {
}
infoTopBarMediaCancel: IconButton(infoTopBarBack) {
width: infoTopBarHeight;
icon: icon {{ "info_close", boxTitleCloseFg }};
iconOver: icon {{ "info_close", boxTitleCloseFgOver }};
icon: icon {{ "info/info_close", boxTitleCloseFg }};
iconOver: icon {{ "info/info_close", boxTitleCloseFgOver }};
}
infoTopBarClose: IconButton(infoTopBarMediaCancel) {
width: 48px;
@@ -145,14 +145,14 @@ infoTopBarCall: IconButton(infoTopBarMenu) {
}
infoTopBarForward: IconButton(infoTopBarBack) {
width: 46px;
icon: icon {{ "info_media_forward", boxTitleCloseFg }};
iconOver: icon {{ "info_media_forward", boxTitleCloseFgOver }};
icon: icon {{ "info/info_media_forward", boxTitleCloseFg }};
iconOver: icon {{ "info/info_media_forward", boxTitleCloseFgOver }};
iconPosition: point(10px, -1px);
rippleAreaPosition: point(1px, 6px);
}
infoTopBarDelete: IconButton(infoTopBarForward) {
icon: icon {{ "info_media_delete", boxTitleCloseFg }};
iconOver: icon {{ "info_media_delete", boxTitleCloseFgOver }};
icon: icon {{ "info/info_media_delete", boxTitleCloseFg }};
iconOver: icon {{ "info/info_media_delete", boxTitleCloseFgOver }};
}
infoTopBar: InfoTopBar {
height: infoTopBarHeight;
@@ -176,8 +176,8 @@ infoTopBarDuration: 150;
infoLayerTopMinimal: 20px;
infoLayerTopMaximal: 40px;
infoLayerTopBarHeight: 56px;
infoLayerTopBarBackIcon: icon {{ "info_back", boxTitleCloseFg }};
infoLayerTopBarBackIconOver: icon {{ "info_back", boxTitleCloseFgOver }};
infoLayerTopBarBackIcon: icon {{ "info/info_back", boxTitleCloseFg }};
infoLayerTopBarBackIconOver: icon {{ "info/info_back", boxTitleCloseFgOver }};
infoLayerTopBarBack: IconButton(infoTopBarBack) {
width: 48px;
height: infoLayerTopBarHeight;
@@ -189,8 +189,8 @@ infoLayerTopBarBack: IconButton(infoTopBarBack) {
rippleAreaPosition: point(6px, 8px);
}
infoLayerTopBarMediaCancel: IconButton(infoLayerTopBarBack) {
icon: icon {{ "info_close", boxTitleCloseFg }};
iconOver: icon {{ "info_close", boxTitleCloseFgOver }};
icon: icon {{ "info/info_close", boxTitleCloseFg }};
iconOver: icon {{ "info/info_close", boxTitleCloseFgOver }};
}
infoLayerTopBarClose: IconButton(infoLayerTopBarMediaCancel) {
iconPosition: point(4px, -1px);
@@ -209,14 +209,14 @@ infoLayerTopBarCall: IconButton(infoLayerTopBarMenu) {
}
infoLayerTopBarForward: IconButton(infoLayerTopBarBack) {
width: 45px;
icon: icon {{ "info_media_forward", boxTitleCloseFg }};
iconOver: icon {{ "info_media_forward", boxTitleCloseFgOver }};
icon: icon {{ "info/info_media_forward", boxTitleCloseFg }};
iconOver: icon {{ "info/info_media_forward", boxTitleCloseFgOver }};
iconPosition: point(11px, -1px);
rippleAreaPosition: point(3px, 4px);
}
infoLayerTopBarDelete: IconButton(infoLayerTopBarForward) {
icon: icon {{ "info_media_delete", boxTitleCloseFg }};
iconOver: icon {{ "info_media_delete", boxTitleCloseFgOver }};
icon: icon {{ "info/info_media_delete", boxTitleCloseFg }};
iconOver: icon {{ "info/info_media_delete", boxTitleCloseFgOver }};
}
infoLayerTopBar: InfoTopBar(infoTopBar) {
height: infoLayerTopBarHeight;
@@ -304,7 +304,7 @@ infoVerifiedCheck: icon {
{ "profile_verified_check", profileVerifiedCheckFg, point(4px, 4px) }
};
infoProfileSkip: 12px;
infoProfileSkip: 7px;
infoProfileLabeledPadding: margins(79px, 9px, 30px, 7px);
infoProfileSeparatorPadding: margins(
@@ -313,33 +313,39 @@ infoProfileSeparatorPadding: margins(
0px,
infoProfileSkip);
infoIconFg: menuIconFg;
infoIconInformation: icon {{ "info_information", infoIconFg }};
infoIconMembers: icon {{ "info/edit/group_manage_members", infoIconFg, point(-2px, 0px) }};
infoIconRequests: icon {{ "info_add_member", infoIconFg, point(0px, 2px) }};
infoIconNotifications: icon {{ "info_notifications", infoIconFg }};
infoIconActions: icon {{ "info_actions", infoIconFg }};
infoIconMediaPhoto: icon {{ "info_media_photo", infoIconFg }};
infoIconMediaVideo: icon {{ "info_media_video", infoIconFg }};
infoIconMediaGif: icon {{ "info_media_gif", infoIconFg }};
infoIconMediaFile: icon {{ "info_media_file", infoIconFg }};
infoIconMediaAudio: icon {{ "info_media_audio", infoIconFg }};
infoIconMediaLink: icon {{ "info_media_link", infoIconFg }};
infoIconMediaGroup: icon {{ "info_common_groups", infoIconFg }};
infoIconMediaVoice: icon {{ "info_media_voice", infoIconFg }};
infoIconMediaRound: icon {{ "info_media_round", infoIconFg }};
infoIconFg: windowBoldFg;
infoIconInformation: icon {{ "info/info_information", infoIconFg }};
//infoIconMembers: icon {{ "info/edit/group_manage_members", infoIconFg, point(-2px, 0px) }};
infoIconRequests: icon {{ "info/info_add_member", infoIconFg, point(0px, 2px) }};
infoIconNotifications: icon {{ "info/info_notifications", infoIconFg }};
infoIconMediaPhoto: icon {{ "info/info_media_photo", infoIconFg }};
infoIconMediaVideo: icon {{ "info/info_media_video", infoIconFg }};
infoIconMediaGif: icon {{ "info/info_media_gif", infoIconFg }};
infoIconMediaFile: icon {{ "info/info_media_file", infoIconFg }};
infoIconMediaAudio: icon {{ "info/info_media_audio", infoIconFg }};
infoIconMediaLink: icon {{ "info/info_media_link", infoIconFg }};
infoIconMediaGroup: icon {{ "info/info_common_groups", infoIconFg }};
infoIconMediaVoice: icon {{ "info/info_media_voice", infoIconFg }};
infoIconMediaRound: icon {{ "info/info_media_round", infoIconFg }};
infoIconRecentActions: icon {{ "info/edit/group_manage_actions", infoIconFg, point(-2px, -1px) }};
infoIconAdministrators: icon {{ "info/edit/group_manage_admins", infoIconFg, point(-3px, 0px) }};
infoIconBlacklist: icon {{ "info_blacklist", infoIconFg, point(-2px, -2px) }};
infoIconBlacklist: icon {{ "info/info_blacklist", infoIconFg, point(-2px, -2px) }};
infoIconPermissions: icon {{ "info/edit/group_manage_permissions", infoIconFg, point(0px, -2px) }};
infoIconInviteLinks: icon {{ "info/edit/group_manage_links", infoIconFg, point(-2px, 0px) }};
infoIconReactions: icon {{ "info/edit/group_manage_reactions", infoIconFg }};
infoIconShare: icon {{ "info/info_share", infoIconFg }};
infoIconEdit: icon {{ "info/info_edit", infoIconFg }};
infoIconDelete: icon {{ "info/info_delete", infoIconFg }};
infoIconReport: icon {{ "info/info_report", attentionButtonFg }};
infoIconLeave: icon {{ "info/info_leave", infoIconFg }};
infoIconBlock: icon {{ "info/info_block", attentionButtonFg }};
infoIconMembers: icon {{ "info/info_members", infoIconFg }};
infoInformationIconPosition: point(25px, 12px);
infoNotificationsIconPosition: point(20px, 5px);
infoSharedMediaIconPosition: point(20px, 24px);
infoSharedMediaButtonIconPosition: point(20px, 3px);
infoIconPosition: point(20px, 15px);
infoChannelMembersIconPosition: point(20px, 24px);
infoGroupMembersIconPosition: point(20px, 10px);
infoChannelMembersIconPosition: point(20px, 19px);
infoLabeledOneLine: FlatLabel(defaultFlatLabel) {
maxHeight: 20px;
style: TextStyle(defaultTextStyle) {
@@ -364,7 +370,7 @@ infoBlockHeaderLabel: FlatLabel(infoProfileStatusLabel) {
linkFontOver: semiboldFont;
}
}
infoBlockHeaderPosition: point(79px, 22px);
infoBlockHeaderPosition: point(79px, 17px);
infoProfileToggle: Toggle(defaultToggle) {
untoggledFg: menuIconFg;
@@ -427,38 +433,13 @@ infoMembersButton: IconButton(defaultIconButton) {
ripple: defaultRippleAnimation;
}
infoMembersAddMember: IconButton(infoMembersButton) {
icon: icon {{ "info_add_member", menuIconFg }};
iconOver: icon {{ "info_add_member", menuIconFgOver }};
icon: icon {{ "info/info_add_member", windowBoldFg }};
iconOver: icon {{ "info/info_add_member", windowBoldFg }};
}
infoMembersSearch: IconButton(infoMembersButton) {
icon: icon {{
"top_bar_search",
menuIconFg,
infoMembersButtonIconPosition
}};
iconOver: icon {{
"top_bar_search",
menuIconFgOver,
infoMembersButtonIconPosition
}};
iconPosition: point(0px, 0px);
icon: icon {{ "info/info_search", windowBoldFg }};
iconOver: icon {{ "info/info_search", windowBoldFg }};
}
infoMembersSearchActive: icon {
{ size(44px, 44px), windowBg },
{
"top_bar_search",
menuIconFgOver,
infoMembersButtonIconPosition
}
};
infoMembersSearchActiveLayer: icon {
{ size(44px, 44px), boxBg },
{
"top_bar_search",
menuIconFgOver,
infoMembersButtonIconPosition
}
};
infoMembersSearchField: InputField(defaultMultiSelectSearchField) {
}
infoMembersCancelSearch: CrossButton {
@@ -468,7 +449,7 @@ infoMembersCancelSearch: CrossButton {
cross: CrossAnimation {
size: 44px;
skip: 16px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
crossFg: menuIconFg;
@@ -598,12 +579,12 @@ editPeerSkip: 7px;
editPeerHistoryVisibilityMargins: margins(15px, 0px, 20px, 16px);
infoEmptyFg: windowSubTextFg;
infoEmptyPhoto: icon {{ "info_media_photo_empty", infoEmptyFg }};
infoEmptyVideo: icon {{ "info_media_video_empty", infoEmptyFg }};
infoEmptyAudio: icon {{ "info_media_audio_empty", infoEmptyFg }};
infoEmptyFile: icon {{ "info_media_file_empty", infoEmptyFg }};
infoEmptyVoice: icon {{ "info_media_voice_empty", infoEmptyFg }};
infoEmptyLink: icon {{ "info_media_link_empty", infoEmptyFg }};
infoEmptyPhoto: icon {{ "info/info_media_photo_empty", infoEmptyFg }};
infoEmptyVideo: icon {{ "info/info_media_video_empty", infoEmptyFg }};
infoEmptyAudio: icon {{ "info/info_media_audio_empty", infoEmptyFg }};
infoEmptyFile: icon {{ "info/info_media_file_empty", infoEmptyFg }};
infoEmptyVoice: icon {{ "info/info_media_voice_empty", infoEmptyFg }};
infoEmptyLink: icon {{ "info/info_media_link_empty", infoEmptyFg }};
infoEmptyIconTop: 120px;
infoEmptyLabelTop: 40px;
infoEmptyLabelSkip: 20px;
@@ -712,8 +693,8 @@ topBarSearch: IconButton {
}
topBarCloseChoose: IconButton(topBarSearch) {
width: 56px;
icon: icon {{ "info_close", boxTitleCloseFg }};
iconOver: icon {{ "info_close", boxTitleCloseFgOver }};
icon: icon {{ "info/info_close", boxTitleCloseFg }};
iconOver: icon {{ "info/info_close", boxTitleCloseFgOver }};
iconPosition: point(10px, -1px);
rippleAreaPosition: point(7px, 7px);
}
@@ -735,7 +716,7 @@ topBarCall: IconButton(topBarSearch) {
topBarGroupCall: IconButton(topBarSearch) {
icon: icon {{ "top_bar_group_call", menuIconFg }};
iconOver: icon {{ "top_bar_group_call", menuIconFgOver }};
iconPosition: point(8px, 16px);
iconPosition: point(4px, 12px);
}
topBarInfo: IconButton(topBarSearch) {
icon: icon {{ "top_bar_profile", menuIconFg }};

View File

@@ -325,7 +325,7 @@ rpl::producer<bool> Controller::searchEnabledByContent() const {
rpl::producer<QString> Controller::mediaSourceQueryValue() const {
return _searchController
? _searchController->currentQueryValue()
: rpl::never<QString>(); AssertIsDebug() // #TODO downloads
: rpl::never<QString>(); // #TODO downloads
}
rpl::producer<SparseIdsMergedSlice> Controller::mediaSource(

View File

@@ -80,6 +80,7 @@ auto AddActionButton(
Text &&text,
ToggleOn &&toggleOn,
Callback &&callback,
const style::icon *icon,
const style::SettingsButton &st
= st::infoSharedMediaButton) {
auto result = parent->add(object_ptr<Ui::SlideWrap<Ui::SettingsButton>>(
@@ -95,6 +96,12 @@ auto AddActionButton(
std::move(toggleOn)
)->entity()->addClickHandler(std::move(callback));
result->finishAnimating();
if (icon) {
object_ptr<Profile::FloatingIcon>(
result,
*icon,
st::infoSharedMediaButtonIconPosition);
}
return result;
};
@@ -110,6 +117,7 @@ auto AddMainButton(
std::move(text) | Ui::Text::ToUpper(),
std::move(toggleOn),
std::move(callback),
nullptr,
st::infoMainButton));
}
@@ -164,8 +172,6 @@ private:
void addShareContactAction(not_null<UserData*> user);
void addEditContactAction(not_null<UserData*> user);
void addDeleteContactAction(not_null<UserData*> user);
void addClearHistoryAction(not_null<UserData*> user);
void addDeleteConversationAction(not_null<UserData*> user);
void addBotCommandActions(not_null<UserData*> user);
void addReportAction();
void addBlockAction(not_null<UserData*> user);
@@ -505,7 +511,8 @@ void ActionsFiller::addInviteToGroupAction(
_wrap,
tr::lng_profile_invite_to_group(),
CanInviteBotToGroupValue(user),
[=] { AddBotToGroupBoxController::Start(user); });
[=] { AddBotToGroupBoxController::Start(user); },
&st::infoIconRequests);
}
void ActionsFiller::addShareContactAction(not_null<UserData*> user) {
@@ -514,7 +521,8 @@ void ActionsFiller::addShareContactAction(not_null<UserData*> user) {
_wrap,
tr::lng_info_share_contact(),
CanShareContactValue(user),
[=] { Window::PeerMenuShareContactBox(controller, user); });
[=] { Window::PeerMenuShareContactBox(controller, user); },
&st::infoIconShare);
}
void ActionsFiller::addEditContactAction(not_null<UserData*> user) {
@@ -523,7 +531,8 @@ void ActionsFiller::addEditContactAction(not_null<UserData*> user) {
_wrap,
tr::lng_info_edit_contact(),
IsContactValue(user),
[=] { controller->window().show(Box(EditContactBox, controller, user)); });
[=] { controller->window().show(Box(EditContactBox, controller, user)); },
&st::infoIconEdit);
}
void ActionsFiller::addDeleteContactAction(
@@ -532,24 +541,8 @@ void ActionsFiller::addDeleteContactAction(
_wrap,
tr::lng_info_delete_contact(),
IsContactValue(user),
[user] { Window::PeerMenuDeleteContact(user); });
}
void ActionsFiller::addClearHistoryAction(not_null<UserData*> user) {
AddActionButton(
_wrap,
tr::lng_profile_clear_history(),
rpl::single(true),
Window::ClearHistoryHandler(user));
}
void ActionsFiller::addDeleteConversationAction(
not_null<UserData*> user) {
AddActionButton(
_wrap,
tr::lng_profile_delete_conversation(),
rpl::single(true),
Window::DeleteAndLeaveHandler(user));
[user] { Window::PeerMenuDeleteContact(user); },
&st::infoIconDelete);
}
void ActionsFiller::addBotCommandActions(not_null<UserData*> user) {
@@ -591,14 +584,19 @@ void ActionsFiller::addBotCommandActions(not_null<UserData*> user) {
};
auto addBotCommand = [=](
rpl::producer<QString> text,
const QString &command) {
const QString &command,
const style::icon *icon = nullptr) {
AddActionButton(
_wrap,
std::move(text),
hasBotCommandValue(command),
[=] { sendBotCommand(command); });
[=] { sendBotCommand(command); },
icon);
};
addBotCommand(tr::lng_profile_bot_help(), qsl("help"));
addBotCommand(
tr::lng_profile_bot_help(),
qsl("help"),
&st::infoIconInformation);
addBotCommand(tr::lng_profile_bot_settings(), qsl("settings"));
addBotCommand(tr::lng_profile_bot_privacy(), qsl("privacy"));
}
@@ -614,6 +612,7 @@ void ActionsFiller::addReportAction() {
tr::lng_profile_report(),
rpl::single(true),
report,
&st::infoIconReport,
st::infoBlockButton);
}
@@ -665,6 +664,7 @@ void ActionsFiller::addBlockAction(not_null<UserData*> user) {
rpl::duplicate(text),
std::move(toggleOn),
std::move(callback),
&st::infoIconBlock,
st::infoBlockButton);
}
@@ -674,7 +674,8 @@ void ActionsFiller::addLeaveChannelAction(
_wrap,
tr::lng_profile_leave_channel(),
AmInChannelValue(channel),
Window::DeleteAndLeaveHandler(channel));
Window::DeleteAndLeaveHandler(channel),
&st::infoIconLeave);
}
void ActionsFiller::addJoinChannelAction(
@@ -687,7 +688,8 @@ void ActionsFiller::addJoinChannelAction(
_wrap,
tr::lng_profile_join_channel(),
rpl::duplicate(joinVisible),
[=] { channel->session().api().joinChannel(channel); });
[=] { channel->session().api().joinChannel(channel); },
&st::infoIconRequests);
_wrap->add(object_ptr<Ui::SlideWrap<Ui::FixedHeightWidget>>(
_wrap,
CreateSkipWidget(
@@ -709,8 +711,6 @@ void ActionsFiller::fillUserActions(not_null<UserData*> user) {
addEditContactAction(user);
addDeleteContactAction(user);
}
addClearHistoryAction(user);
addDeleteConversationAction(user);
if (!user->isSelf() && !user->isSupport()) {
if (user->isBot()) {
addBotCommandActions(user);
@@ -742,10 +742,6 @@ object_ptr<Ui::RpWidget> ActionsFiller::fill() {
_wrap->add(CreateSkipWidget(_wrap));
callback();
_wrap->add(CreateSkipWidget(_wrap));
object_ptr<FloatingIcon>(
_wrap,
st::infoIconActions,
st::infoIconPosition);
return std::move(_wrap);
};
if (auto user = _peer->asUser()) {
@@ -845,7 +841,8 @@ object_ptr<Ui::RpWidget> SetupChannelMembers(
members,
std::move(membersText),
rpl::single(true),
std::move(membersCallback))->entity();
std::move(membersCallback),
nullptr)->entity();
SetupAddChannelMember(controller, button, channel);

View File

@@ -489,44 +489,5 @@ void Cover::refreshStatusGeometry(int newWidth) {
newWidth);
}
QMargins SharedMediaCover::getMargins() const {
return QMargins(0, 0, 0, st::infoSharedMediaBottomSkip);
}
SharedMediaCover::SharedMediaCover(QWidget *parent)
: SectionWithToggle(parent, st::infoSharedMediaCoverHeight) {
createLabel();
}
SharedMediaCover *SharedMediaCover::setToggleShown(rpl::producer<bool> &&shown) {
return static_cast<SharedMediaCover*>(
SectionWithToggle::setToggleShown(std::move(shown)));
}
void SharedMediaCover::createLabel() {
using namespace rpl::mappers;
auto label = object_ptr<Ui::FlatLabel>(
this,
tr::lng_profile_shared_media() | Ui::Text::ToUpper(),
st::infoBlockHeaderLabel);
label->setAttribute(Qt::WA_TransparentForMouseEvents);
rpl::combine(
toggleShownValue(),
widthValue(),
_2
) | rpl::start_with_next([this, weak = label.data()](int newWidth) {
auto availableWidth = newWidth
- st::infoBlockHeaderPosition.x()
- st::infoSharedMediaButton.padding.right()
- toggleSkip();
weak->resizeToWidth(availableWidth);
weak->moveToLeft(
st::infoBlockHeaderPosition.x(),
st::infoBlockHeaderPosition.y(),
newWidth);
}, label->lifetime());
}
} // namespace Profile
} // namespace Info

View File

@@ -105,18 +105,5 @@ private:
};
class SharedMediaCover : public SectionWithToggle {
public:
SharedMediaCover(QWidget *parent);
SharedMediaCover *setToggleShown(rpl::producer<bool> &&shown);
QMargins getMargins() const override;
private:
void createLabel();
};
} // namespace Profile
} // namespace Info

View File

@@ -130,7 +130,7 @@ void Members::setupHeader() {
object_ptr<FloatingIcon>(
parent,
st::infoIconMembers,
st::infoIconPosition);
st::infoGroupMembersIconPosition);
_titleWrap = Ui::CreateChild<Ui::RpWidget>(parent);
_title = setupTitle();
@@ -257,7 +257,7 @@ int Members::resizeGetHeight(int newWidth) {
//}
void Members::updateHeaderControlsGeometry(int newWidth) {
_openMembers->setGeometry(0, st::infoProfileSkip, newWidth, st::infoMembersHeader - st::infoProfileSkip - st::infoMembersHeaderPaddingBottom);
_openMembers->setGeometry(0, st::infoProfileSkip, newWidth, st::infoMembersButton.height);
auto availableWidth = newWidth
- st::infoMembersButtonPosition.x();

View File

@@ -1196,12 +1196,12 @@ Image *MainWidget::newBackgroundThumb() {
void MainWidget::setInnerFocus() {
if (_hider || !_history->peer()) {
Assert(_dialogs != nullptr);
if (!_hider && _mainSection) {
_mainSection->setInnerFocus();
} else if (!_hider && _thirdSection) {
_thirdSection->setInnerFocus();
} else {
Assert(_dialogs != nullptr);
_dialogs->setInnerFocus();
}
} else if (_mainSection) {

View File

@@ -248,6 +248,8 @@ void PanelNoPassword::refreshBottom() {
container,
tr::lng_cancel(),
st::defaultBoxButton);
cancel->setTextTransform(
Ui::RoundButton::TextTransform::NoTransform);
cancel->addClickHandler([=] {
_controller->cancelPasswordSubmit();
});
@@ -255,6 +257,8 @@ void PanelNoPassword::refreshBottom() {
container,
tr::lng_passport_email_validate(),
st::defaultBoxButton);
validate->setTextTransform(
Ui::RoundButton::TextTransform::NoTransform);
validate->addClickHandler([=] {
_controller->validateRecoveryEmail();
});

View File

@@ -167,10 +167,13 @@ void FormSummary::setupControls() {
setupContent(_layout.get());
if (_submit) {
_submit->setTextTransform(
Ui::RoundButton::TextTransform::NoTransform);
_submit->addClickHandler([=] {
_delegate->panelSubmit();
});
}
_cancel->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
_cancel->addClickHandler([=] {
_delegate->panelRequestClose();
});

View File

@@ -272,15 +272,6 @@ dictionariesSectionButton: SettingsButton(settingsUpdateToggle) {
sessionsScroll: boxScroll;
sessionsHeight: 350px;
sessionsTerminateAll: SettingsButton(defaultSettingsButton) {
textFg: attentionButtonFg;
textFgOver: attentionButtonFgOver;
font: font(boxFontSize semibold);
height: 20px;
padding: margins(77px, 12px, 22px, 10px);
iconLeft: 30px;
}
sessionsTerminateAllIcon: icon {{ "settings/devices/terminate_all", attentionButtonFg }};
sessionLocationTop: 54px;
sessionCurrentSkip: 8px;
sessionSubtitleSkip: 14px;
@@ -351,8 +342,8 @@ sessionListItem: PeerListItem(defaultPeerListItem) {
nameStyle: TextStyle(defaultTextStyle) {
font: msgNameFont;
}
namePosition: point(77px, 11px);
statusPosition: point(77px, 32px);
namePosition: point(78px, 11px);
statusPosition: point(78px, 32px);
photoSize: 42px;
statusFg: boxTextFg;
statusFgOver: boxTextFg;
@@ -361,9 +352,6 @@ sessionList: PeerList(defaultPeerList) {
item: sessionListItem;
padding: margins(0px, 4px, 0px, 0px);
}
sessionListThreeDotsIcon: icon {{ "info/edit/dotsmini", dialogsMenuIconFg }};
sessionListThreeDotsIconOver: icon {{ "info/edit/dotsmini", dialogsMenuIconFgOver }};
sessionListThreeDotsSkip: 12px;
settingsPhotoLeft: 22px;
settingsPhotoTop: 8px;

View File

@@ -753,6 +753,7 @@ void Advanced::setupContent(not_null<Window::SessionController*> controller) {
SetupSystemIntegration(controller, content, [=](Type type) {
_showOther.fire_copy(type);
});
empty = false;
AddDivider(content);
AddSkip(content);

View File

@@ -634,11 +634,21 @@ void SetupNotificationsContent(
tr::lng_settings_desktop_notify(),
{ &st::settingsIconNotifications, kIconRed },
desktopToggles->events_starting_with(settings.desktopNotify()));
const auto name = addSlidingCheckbox(
tr::lng_settings_show_name(),
{ &st::settingsIconUser, kIconLightOrange },
rpl::single(settings.notifyView() <= NotifyView::ShowName));
const auto preview = addSlidingCheckbox(
tr::lng_settings_show_preview(),
{ &st::settingsIconAskQuestion, kIconGreen },
rpl::single(settings.notifyView() <= NotifyView::ShowPreview));
const auto soundToggles = container->lifetime(
).make_state<rpl::event_stream<bool>>();
const auto sound = addCheckbox(
tr::lng_settings_sound_notify(),
{ &st::settingsIconSound, kIconLightOrange },
{ &st::settingsIconSound, kIconLightBlue },
soundToggles->events_starting_with(settings.soundNotify()));
const auto flashbounceToggles = container->lifetime(
).make_state<rpl::event_stream<bool>>();
@@ -648,19 +658,10 @@ void SetupNotificationsContent(
: Platform::IsMac()
? tr::lng_settings_alert_mac
: tr::lng_settings_alert_linux)(),
{ &st::settingsIconDock, kIconLightBlue },
{ &st::settingsIconDock, kIconDarkBlue },
flashbounceToggles->events_starting_with(
settings.flashBounceNotify()));
const auto name = addSlidingCheckbox(
tr::lng_settings_show_name(),
{},
rpl::single(settings.notifyView() <= NotifyView::ShowName));
const auto preview = addSlidingCheckbox(
tr::lng_settings_show_preview(),
{},
rpl::single(settings.notifyView() <= NotifyView::ShowPreview));
AddSkip(container);
AddDivider(container);
AddSkip(container);

View File

@@ -226,6 +226,7 @@ void SetupLocalPasscode(
AddSkip(container);
AddDivider(container);
AddSkip(container);
AddSubsectionTitle(container, tr::lng_settings_passcode_title());
auto has = rpl::single(
rpl::empty_value()
@@ -318,6 +319,7 @@ void SetupCloudPassword(
AddSkip(container);
AddDivider(container);
AddSkip(container);
AddSubsectionTitle(container, tr::lng_settings_password_title());
const auto session = &controller->session();
auto has = rpl::single(

View File

@@ -326,7 +326,7 @@ historyEmojiCircle: size(20px, 20px);
historyEmojiCirclePeriod: 1500;
historyEmojiCircleDuration: 500;
historyEmojiCircleTop: 13px;
historyEmojiCircleLine: 2px;
historyEmojiCircleLine: 1.5;
historyEmojiCircleFg: historyComposeIconFg;
historyEmojiCircleFgOver: historyComposeIconFgOver;
historyEmojiCirclePart: 3.5;
@@ -410,8 +410,8 @@ historyRecordLockArrow: icon {{ "voice_lock/voice_arrow", historyToDownFg }};
historyRecordLockRippleMargin: margins(6px, 6px, 6px, 6px);
historyRecordDelete: IconButton(historyAttach) {
icon: icon {{ "info_media_delete", historyComposeIconFg }};
iconOver: icon {{ "info_media_delete", historyComposeIconFgOver }};
icon: icon {{ "info/info_media_delete", historyComposeIconFg }};
iconOver: icon {{ "info/info_media_delete", historyComposeIconFgOver }};
iconPosition: point(10px, 11px);
}
historyRecordWaveformRightSkip: 10px;
@@ -428,14 +428,8 @@ historySilentToggle: IconButton(historyBotKeyboardShow) {
icon: icon {{ "chat/input_silent", historyComposeIconFg }};
iconOver: icon {{ "chat/input_silent", historyComposeIconFgOver }};
}
historySilentToggleCrossLine: CrossLineAnimation {
fg: historyComposeIconFg;
icon: icon {{ "chat/input_silent", historyComposeIconFg }};
startPosition: point(13px, 11px);
endPosition: point(29px, 26px);
stroke: 2px;
}
historySilentToggleOn: icon {{ "chat/input_silent_on", historyComposeIconFg }};
historySilentToggleOnOver: icon {{ "chat/input_silent_on", historyComposeIconFgOver }};
historyReplySkip: 51px;
historyReplyNameFg: windowActiveTextFg;
@@ -663,7 +657,7 @@ historyAdminLogCancelSearch: CrossButton {
cross: CrossAnimation {
size: 32px;
skip: 10px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
crossFg: menuIconFg;
@@ -965,7 +959,7 @@ sendAsButton: SendAsButton {
cross: CrossAnimation {
size: 28px;
skip: 10px;
stroke: 2px;
stroke: 1.5;
minScale: 0.3;
}
duration: 150;

View File

@@ -58,15 +58,12 @@ void EmojiButton::paintEvent(QPaintEvent *e) {
: (over
? st::historyEmojiCircleFgOver
: st::historyEmojiCircleFg));
const auto line = style::ConvertScaleExact(st::historyEmojiCircleLine);
if (anim::Disabled() && _loading && _loading->animating()) {
anim::DrawStaticLoading(
p,
inner,
st::historyEmojiCircleLine,
color);
anim::DrawStaticLoading(p, inner, line, color);
} else {
auto pen = color->p;
pen.setWidth(st::historyEmojiCircleLine);
pen.setWidthF(line);
pen.setCapStyle(Qt::RoundCap);
p.setPen(pen);
p.setBrush(Qt::NoBrush);

View File

@@ -737,34 +737,26 @@ rpl::producer<> UserpicButton::uploadPhotoRequests() const {
SilentToggle::SilentToggle(QWidget *parent, not_null<ChannelData*> channel)
: RippleButton(parent, st::historySilentToggle.ripple)
, _st(st::historySilentToggle)
, _colorOver(st::historyComposeIconFgOver->c)
, _channel(channel)
, _checked(channel->owner().notifySilentPosts(_channel))
, _crossLine(st::historySilentToggleCrossLine) {
, _checked(channel->owner().notifySilentPosts(_channel)) {
Expects(!channel->owner().notifySilentPostsUnknown(_channel));
resize(_st.width, _st.height);
style::PaletteChanged(
) | rpl::start_with_next([=] {
_crossLine.invalidate();
}, lifetime());
paintRequest(
) | rpl::start_with_next([=](const QRect &clip) {
Painter p(this);
paintRipple(p, _st.rippleAreaPosition, nullptr);
_crossLine.paint(
p,
(width() - _st.icon.width()) / 2,
(height() - _st.icon.height()) / 2,
_crossLineAnimation.value(_checked ? 1. : 0.),
// Since buttons of the compose controls have no duration
// for the over animation, we can skip this animation here.
isOver()
? std::make_optional<QColor>(_colorOver)
: std::nullopt);
//const auto checked = _crossLineAnimation.value(_checked ? 1. : 0.);
const auto over = isOver();
(_checked
? (over
? st::historySilentToggleOnOver
: st::historySilentToggleOn)
: (over
? st::historySilentToggle.iconOver
: st::historySilentToggle.icon)).paintInCenter(p, rect());
}, lifetime());
setMouseTracking(true);

View File

@@ -194,12 +194,10 @@ protected:
private:
const style::IconButton &_st;
const QColor &_colorOver;
not_null<ChannelData*> _channel;
bool _checked = false;
Ui::CrossLineAnimation _crossLine;
Ui::Animations::Simple _crossLineAnimation;
};

View File

@@ -566,7 +566,7 @@ void Generator::paintComposeArea() {
emojiIcon.paint(*_p, attachEmojiLeft + emojiIconLeft, controlsTop + emojiIconTop, _rect.width());
auto pen = st::historyEmojiCircleFg[_palette]->p;
pen.setWidth(st::historyEmojiCircleLine);
pen.setWidthF(style::ConvertScaleExact(st::historyEmojiCircleLine));
pen.setCapStyle(Qt::RoundCap);
_p->setPen(pen);
_p->setBrush(Qt::NoBrush);

View File

@@ -219,8 +219,8 @@ windowOutdatedSkip: 6px;
windowOutdatedClose: IconButton(defaultIconButton) {
width: 60px;
height: 60px;
icon: icon {{ "info_close", outdatedFg }};
iconOver: icon {{ "info_close", outdatedFg }};
icon: icon {{ "info/info_close", outdatedFg }};
iconOver: icon {{ "info/info_close", outdatedFg }};
iconPosition: point(-1px, -1px);
}