From 1310b156dc73fd45e539297bf73761cf1f215778 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 10 Nov 2016 21:10:31 +0300 Subject: [PATCH] Closed beta 10019004: new add contact button, various improvements. --- Telegram/Resources/basic.style | 30 +--- Telegram/Resources/colors.palette | 5 +- Telegram/Resources/icons/contacts_add.png | Bin 316 -> 107 bytes Telegram/Resources/icons/contacts_add@2x.png | Bin 590 -> 126 bytes .../Resources/icons/history_down_circle.png | Bin 628 -> 651 bytes .../icons/history_down_circle@2x.png | Bin 1561 -> 1621 bytes .../Resources/icons/history_down_shadow.png | Bin 1458 -> 1508 bytes .../icons/history_down_shadow@2x.png | Bin 3645 -> 3794 bytes Telegram/Resources/sample.tdesktop-theme | 3 + Telegram/Resources/winrc/Telegram.rc | 8 +- Telegram/Resources/winrc/Updater.rc | 8 +- Telegram/SourceFiles/boxes/boxes.style | 38 ++++- Telegram/SourceFiles/boxes/contactsbox.cpp | 131 ++++++++---------- Telegram/SourceFiles/boxes/contactsbox.h | 7 +- Telegram/SourceFiles/boxes/members_box.cpp | 68 ++++----- Telegram/SourceFiles/boxes/members_box.h | 8 +- Telegram/SourceFiles/core/version.h | 2 +- Telegram/SourceFiles/history/history.style | 11 +- Telegram/SourceFiles/historywidget.cpp | 4 +- .../settings/settings_scale_widget.cpp | 3 +- Telegram/SourceFiles/stickers/emoji_pan.cpp | 6 +- Telegram/SourceFiles/stickers/stickers.style | 2 +- .../ui/buttons/history_down_button.cpp | 2 +- .../SourceFiles/ui/widgets/inner_dropdown.cpp | 22 +-- .../SourceFiles/ui/widgets/multi_select.cpp | 2 +- .../SourceFiles/ui/widgets/popup_menu.cpp | 10 +- Telegram/SourceFiles/ui/widgets/widgets.style | 16 +++ Telegram/build/version | 2 +- 28 files changed, 187 insertions(+), 201 deletions(-) diff --git a/Telegram/Resources/basic.style b/Telegram/Resources/basic.style index e06e944ed..1a358f229 100644 --- a/Telegram/Resources/basic.style +++ b/Telegram/Resources/basic.style @@ -173,6 +173,7 @@ defaultInputField: InputField { height: 32px; } +defaultCheckboxIcon: icon {{ "default_checkbox_check", windowActiveFg, point(4px, 7px) }}; defaultCheckbox: Checkbox { textFg: windowTextFg; textBg: windowBg; @@ -188,7 +189,7 @@ defaultCheckbox: Checkbox { textPosition: point(32px, 2px); diameter: 22px; thickness: 2px; - checkIcon: icon {{ "default_checkbox_check", windowActiveFg, point(4px, 7px) }}; + checkIcon: defaultCheckboxIcon; font: normalFont; duration: 120; @@ -752,33 +753,6 @@ layerSlideDuration: 200; layerHideDuration: 200; layerPadding: margins(10px, 10px, 10px, 10px); -contactPadding: margins(49px, 22px, 0px, 6px); -contactSkip: 13px; -contactPhoneSkip: 30px; - -contactsPhotoSize: 42px; -contactsPadding: margins(16px, 7px, 16px, 7px); -contactsNameTop: 2px; -contactsNameFont: semiboldFont; -contactsStatusTop: 23px; -contactsStatusFont: font(fsize); -contactsStatusFg: #999999; -contactsStatusFgOver: #7c99b2; -contactsStatusFgOnline: #3b8dcc; -contactsCheckPosition: point(8px, 16px); -contactsAboutBg: #f7f7f7; -contactsAboutShadow: #0000001F; -contactsAdminCheckbox: Checkbox(defaultBoxCheckbox) { - font: semiboldFont; - textBg: #f7f7f7; - textPosition: point(34px, 1px); -} -contactsAboutHeight: 42px; -contactsAboutTop: 9px; -contactsScroll: flatScroll(boxScroll) { - deltab: 0px; -} - simpleCloseIcon: icon {{ "simple_close", #c7c7c7 }}; simpleCloseIconOver: icon {{ "simple_close", #a3a3a3 }}; dialogsForwardCancelIcon: icon {{ "simple_close", dialogsForwardFg }}; diff --git a/Telegram/Resources/colors.palette b/Telegram/Resources/colors.palette index c7431da64..80a2b9a87 100644 --- a/Telegram/Resources/colors.palette +++ b/Telegram/Resources/colors.palette @@ -97,6 +97,9 @@ membersAboutLimitFg: windowSubTextFg; contactsBg: windowBg; contactsBgOver: windowOverBg; contactsNameFg: boxTextFg; +contactsStatusFg: windowSubTextFg; +contactsStatusFgOver: contactsStatusFg; +contactsStatusFgOnline: #3b8dcc; photoCropFadeBg: #0000007f; photoCropPointFg: #ffffff7f; @@ -170,7 +173,7 @@ topBarBg: windowBg; emojiPanBg: windowBg; emojiPanCategories: #f7f7f7 | windowBg; -emojiPanHeaderFg: #999999 | windowSubTextFg; +emojiPanHeaderFg: windowSubTextFg; emojiPanHeaderBg: #fffffff2 | emojiPanBg; historyComposeAreaBg: windowBg; diff --git a/Telegram/Resources/icons/contacts_add.png b/Telegram/Resources/icons/contacts_add.png index 98f770cc60fa3ad5e2d14176edf905c8f6cda015..3f3efebd0b11cedb540598fa10d43954c6d84ffa 100644 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`MxHK?Ar`&KDG3Qb&Nnds`OiNw zDJA8|(w0Wf6yCs+%9jEJXVYwb&kW1sti z0Jd$rT+}U?Nyin O00006nLBhKm02{ z7U`Z;@?rDkJtdjCnp%_AnBG1s(YvbD0H_)W8aB`0db)BSBZHW{AXwmstN~-JH1Mv^kfDlB%Qpq%mR(7IMh()+t z?7HiU$xOzVxR3V^1VXqoIk~wrcK`q|&ZX-*Qc96AhQ9Bk@B7FYLrN(ch7oHn$xAGd z5Q3Ca41xfo==FL?2zjqCAp~vPjugFTGMOYP%@3lK3d`PS`Ypn`u5-&Ej3jD01034z zHe@o~u%~o79jS3VBEQIWU8(FMA~ME=GxtbXobvl76yNtjRaL1>T(4Ikgb2m{a{P;; zC{N?${`DK-3a{5|>B+a-t@PM1xWdEXP*pdEC2wU z&u7^0_psS)V7XkvVzB_nabUOGB_jQFH5-P3rfDK$OnOB##?UlPp@aM*5wZV1Xf~TT zo6TO>c%Cz#&#~2N#o9t6g*8n>$8kPf^pWXwiltKNHQ{=_j;GTpaoHQ5=V7DKkQ3H4 z4L#3GP4>p+a*@k)zu!+?_Qqf^h%Kxf4hPKTa{Rp{0glHb#C^Ad_|U{tChW`*#;5Ca c-@-}r6AJc4d6~cMp#T5?07*qoM6N<$f)-m8cmMzZ diff --git a/Telegram/Resources/icons/history_down_circle.png b/Telegram/Resources/icons/history_down_circle.png index f94e8dd7b61b5cdee657cf703e1a7a19af1d6152..001abe2ddcb59c14de938795cf8d940e96cf5e9e 100644 GIT binary patch literal 651 zcmV;60(AX}P)2}Jbo6<>W9!tX9ab1vlMaY9*2N0luGd2p&s$x zUfaZ%9&;b~4}paImO#!q8X$;Jzb<*$FbvA&GL=e&Y&Of|<0F=35s$~&?RKnID?HC* zKA-da{LFATWHcJ__V#uWT7(_jwneMe60Yltu(_@)TCJ9_Z9DXP_Y?f)QmG`m-EL^) zsk+^+D3waL0XLh?t3m&+*=$}9oJys{WHPxKRyLVTL@JfK3|uG_gy(rT$I3j<6NN(I zJaDmC6u$5O7*^){z9<%p;lRmcQmohOAIHizn~g{&lfl56ris~XrVJ~a&1OQ=wC}-< zMnkprP@~cK8l1^wR2x5)$z)E0`~ALZ->3Th{=dQbd|tKfWchsl0M^-8uh+TPj%^ws zVzC&m>tdRwI@K2~mrE?mV!Pd<1Jr7@yTt;SrpeRO6Tk@}GG=F~H-`{Ds+p1kB>vTG7x7)*Y zq<-Kbs!Js9bP<}(X8)sQK2h9AA!=Jyaw4@EC?`_et#Tr@p?&-zI*xNQtm8PRKCtt^ za;|+S)9dwacPMi_*Esenm&>8w3kXfB&&e5WeqYyBiEYg%Y5iTUDv5?+qrS~vTd8{ zy8c?|a5#J!@b8Ah;r~M=NusOO>TSrh)oMj0NqP>dX&Mc~@a@R7Fbt`tY5Ab7R*NP{ z@?*%fBuQwi)p`sn2m+0w=*N+1aU4@Y5dID2IF5Rr#|)X~c^>6B?ml!d7_c_}X)qYv zhRU+c+IE#J%h%A^Y{uGk)oeEV4pmi^wdroEs!{-y06@Rr$ETLsxKgP^gCIbyR%1-M z-G09Z&+{PNZueu608p#d(ChU;Ow(j-$;>oOkY=;V+L2ka*#r?qk+mZ;Q4~RVo@edI zjOTffYPHJRky*7`1xb>Gwd0{k6h*8JnMF|q5{4mbM`pX-4rIICvUX&)-EKi#*JbU< z%ynH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zcN~^MRaJ;zzI@@1!!m4cZbGy#-5JN)+8V@kI?Wx2Wk{#f5LZ`Mx#O@5tE;Q_EfAw9 z-U1N;;N81--0`$LMTa5)ynOkRH5e;UbZ8HBFn}Wi9Wt2=78Vw`<7!zJ78XhscuHfN zo<4ob7Er76?Af!@YkN3jos=EUxU;i^>FH^FJV8;80~Tdq{Y75D`M55EMlz zEjutId}Uh5OdGf^EKdl9b#bS8>{{4~V z_SD20sCsIms;U?tA2&U)R%LvA{8*Vq?CITAQ1kR|*aZlVP*(whVjCVF=FX#OsJlc) zu|=a%?p)Z3Mx&L;tW2mRN%Z2y3+|lQh{xl`mKg%##g<-!o5z@Ia!RxWCtN~J0}18SU5;7{50 zv9U4MCn{7+KA)$tv9abWyS~5K4+b!Pg9LyE1_qk42Grc#91RQ%n3A)pLW?aJ4AP@V zk662cLZLv9A3vsGFlcJ74G~&w9*?K=_@72}2m2rY&3~F zCvoD$2>?JopGPj2!}j(zzJLFY_4Rdp{`?u~bQ+4HV10d^ITPSF2tYu;G6!Js00000 LNkvXXu0mjf0iFvJ diff --git a/Telegram/Resources/icons/history_down_shadow.png b/Telegram/Resources/icons/history_down_shadow.png index 8317b07d1e90900db040d357f80cd17b0a67a78c..17e6289c237f027ecf3f1c7195671dfbcedc0ccd 100644 GIT binary patch literal 1508 zcmVf#t6oy}JT)=W@O(B&nRR+7eBnyN}C3YauMY~G&iPWER|4Jg2WtS~PDD)!|3o4gN zAxpbPw761A++YVVmgX*UsnTEwP)JbJM`Dv1+vmyg*q%A#0YGqz_~)hrm^FWe7M)us zM9unye!m}g@7@K=vIqnMplKQuMS&0k$8peZw_%zl48y?b=_xv$&P=aA6Ct0^2ae+q zjYc7gA|jCpc%H}o`}e^x47^@12qCa-8)s){Xf~T@G#bz}4XUc*%ao128D=_`en0Q@^_aCtl)JbCg2FJ8RB)2C12_xneU#ksJw zv;>ahKv5Lx^*ZYH`pEtx-$Q~R;MuchNTpI>7-pt{P6ER)NTpIx6b1Eq9h#;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/Telegram/Resources/sample.tdesktop-theme index d8e443105..533981196 100644 --- a/Telegram/Resources/sample.tdesktop-theme +++ b/Telegram/Resources/sample.tdesktop-theme @@ -81,6 +81,9 @@ membersAboutLimitFg: windowSubTextFg; contactsBg: windowBg; contactsBgOver: windowOverBg; contactsNameFg: boxTextFg; +contactsStatusFg: windowSubTextFg; +contactsStatusFgOver: contactsStatusFg; +contactsStatusFgOnline: #3b8dcc; photoCropFadeBg: #0000007f; photoCropPointFg: #ffffff7f; notificationsBoxMonitorFg: windowTextFg; diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 3c0a5ec7e..5b1c34e86 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,19,3 - PRODUCTVERSION 0,10,19,3 + FILEVERSION 0,10,19,4 + PRODUCTVERSION 0,10,19,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.10.19.3" + VALUE "FileVersion", "0.10.19.4" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.19.3" + VALUE "ProductVersion", "0.10.19.4" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index e936c8742..a51fcdfcc 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,19,3 - PRODUCTVERSION 0,10,19,3 + FILEVERSION 0,10,19,4 + PRODUCTVERSION 0,10,19,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Updater" - VALUE "FileVersion", "0.10.19.3" + VALUE "FileVersion", "0.10.19.4" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.19.3" + VALUE "ProductVersion", "0.10.19.4" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index de9b5f400..b4a82f04d 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -89,10 +89,40 @@ contactUserIcon: icon {{ "add_contact_user", #999999 }}; contactPhoneIcon: icon {{ "add_contact_phone", #999999 }}; contactIconTop: 10px; -contactsNewItemHeight: 53px; -contactsNewItemIcon: icon {{ "contacts_add", #749fc2, point(29px, 19px) }}; -contactsNewItemTop: 18px; -contactsNewItemFg: #4b82af; +contactsAdd: IconButton { + width: 52px; + height: 52px; + + icon: contactsAddIcon; + iconOver: contactsAddIconOver; +} +contactsAddPosition: point(14px, 8px); + +contactPadding: margins(49px, 22px, 0px, 6px); +contactSkip: 13px; +contactPhoneSkip: 30px; + +contactsPhotoSize: 42px; +contactsPadding: margins(16px, 7px, 16px, 7px); +contactsNameTop: 2px; +contactsNameFont: semiboldFont; +contactsStatusTop: 23px; +contactsStatusFont: font(fsize); +contactsCheckPosition: point(8px, 16px); +contactsAllAdminsTop: 18px; +contactsAboutBg: #f7f7f7; +contactsAboutShadow: #0000001F; +contactsAdminCheckbox: Checkbox(defaultBoxCheckbox) { + font: semiboldFont; + textBg: #f7f7f7; + textPosition: point(34px, 1px); +} +contactsAboutSkip: 53px; +contactsAboutHeight: 42px; +contactsAboutTop: 9px; +contactsScroll: flatScroll(boxScroll) { + deltab: 0px; +} contactsMultiSelect: MultiSelect { bg: boxSearchBg; diff --git a/Telegram/SourceFiles/boxes/contactsbox.cpp b/Telegram/SourceFiles/boxes/contactsbox.cpp index 20c59e3aa..517d9e8f7 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.cpp +++ b/Telegram/SourceFiles/boxes/contactsbox.cpp @@ -31,6 +31,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "mainwindow.h" #include "application.h" #include "ui/buttons/checkbox.h" +#include "ui/buttons/icon_button.h" #include "ui/filedialog.h" #include "ui/widgets/multi_select.h" #include "ui/effects/widget_slide_wrap.h" @@ -108,7 +109,13 @@ void ContactsBox::init() { auto bottomSkip = inviting ? (st::boxButtonPadding.top() + _next->height() + st::boxButtonPadding.bottom()) : st::boxScrollSkip; ItemListBox::init(_inner, bottomSkip, topSkip); - connect(_inner, SIGNAL(addRequested()), App::wnd(), SLOT(onShowAddContact())); + if (_inner->creating() == CreatingGroupNone && !_inner->chat() && !_inner->channel() && !_inner->bot()) { + _add.create(this, st::contactsAdd); + _add->setClickedCallback([] { + App::wnd()->onShowAddContact(); + }); + } + _inner->setPeerSelectedChangedCallback([this](PeerData *peer, bool checked) { onPeerSelectedChanged(peer, checked); }); @@ -336,6 +343,10 @@ void ContactsBox::resizeEvent(QResizeEvent *e) { updateScrollSkips(); + if (_add) { + _add->moveToRight(st::contactsAddPosition.x(), height() - st::contactsAddPosition.y() - _add->height()); + } + _inner->resize(width(), _inner->height()); _next->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _next->height()); _cancel->moveToRight(st::boxButtonPadding.right() + _next->width() + st::boxButtonPadding.left(), _next->y()); @@ -558,7 +569,6 @@ ContactsBox::Inner::ContactData::ContactData(PeerData *peer, base::lambda_wrapcontactsList()) @@ -597,7 +607,7 @@ ContactsBox::Inner::Inner(QWidget *parent, ChatData *chat, MembersFilter members , _addContactLnk(this, lang(lng_add_contact_button)) { initList(); if (membersFilter == MembersFilter::Admins) { - _newItemHeight = st::contactsNewItemHeight + qMax(_aboutAllAdmins.countHeight(_aboutWidth), _aboutAdmins.countHeight(_aboutWidth)) + st::contactsAboutHeight; + _aboutHeight = st::contactsAboutSkip + qMax(_aboutAllAdmins.countHeight(_aboutWidth), _aboutAdmins.countHeight(_aboutWidth)) + st::contactsAboutHeight; if (_contacts->isEmpty()) { App::api()->requestFullPeer(_chat); } @@ -836,7 +846,7 @@ void ContactsBox::Inner::peerUpdated(PeerData *peer) { for_const (auto row, _contacts->all()) { if (row->attached == i.value()) { row->attached = nullptr; - update(0, _newItemHeight + _rowHeight * row->pos(), width(), _rowHeight); + update(0, _aboutHeight + _rowHeight * row->pos(), width(), _rowHeight); } } if (!_filter.isEmpty()) { @@ -863,9 +873,9 @@ void ContactsBox::Inner::loadProfilePhotos(int32 yFrom) { if (_filter.isEmpty()) { if (!_contacts->isEmpty()) { - auto i = _contacts->cfind(yFrom - _newItemHeight, _rowHeight); + auto i = _contacts->cfind(yFrom - _aboutHeight, _rowHeight); for (auto end = _contacts->cend(); i != end; ++i) { - if ((_newItemHeight + (*i)->pos() * _rowHeight) >= yTo) { + if ((_aboutHeight + (*i)->pos() * _rowHeight) >= yTo) { break; } (*i)->history()->peer->loadUserpic(); @@ -1046,24 +1056,17 @@ void ContactsBox::Inner::paintEvent(QPaintEvent *e) { int32 yFrom = r.y(), yTo = r.y() + r.height(); if (_filter.isEmpty()) { if (!_contacts->isEmpty() || !_byUsername.isEmpty()) { - if (_newItemHeight) { - if (_chat) { - p.fillRect(0, 0, width(), _newItemHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg); - p.fillRect(0, _newItemHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowColor); - p.setPen(st::boxTextFg); - p.drawTextLeft(st::contactsPadding.left(), st::contactsNewItemTop, width(), lang(lng_chat_all_members_admins)); - int aboutw = width() - st::contactsPadding.left() - st::contactsPadding.right(); - (_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsNewItemHeight + st::contactsAboutTop, aboutw); - } else { - p.fillRect(0, 0, width(), st::contactsNewItemHeight, _newItemSel ? st::contactsBgOver : st::contactsBg); - p.setFont(st::contactsNameFont); - st::contactsNewItemIcon.paint(p, 0, 0, width()); - p.setPen(st::contactsNewItemFg); - p.drawTextLeft(st::contactsPadding.left() + st::contactsPhotoSize + st::contactsPadding.left(), st::contactsNewItemTop, width(), lang(lng_add_contact_button)); - } - yFrom -= _newItemHeight; - yTo -= _newItemHeight; - p.translate(0, _newItemHeight); + if (_aboutHeight) { + p.fillRect(0, 0, width(), _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg); + p.fillRect(0, _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowColor); + p.setPen(st::boxTextFg); + p.drawTextLeft(st::contactsPadding.left(), st::contactsAllAdminsTop, width(), lang(lng_chat_all_members_admins)); + int aboutw = width() - st::contactsPadding.left() - st::contactsPadding.right(); + (_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsAboutSkip + st::contactsAboutTop, aboutw); + + yFrom -= _aboutHeight; + yTo -= _aboutHeight; + p.translate(0, _aboutHeight); } if (!_contacts->isEmpty()) { auto i = _contacts->cfind(yFrom, _rowHeight); @@ -1103,13 +1106,13 @@ void ContactsBox::Inner::paintEvent(QPaintEvent *e) { text = lang((cDialogsReceived() && !_searching) ? (sharingBotGame() ? lng_bot_no_chats : lng_bot_no_groups) : lng_contacts_loading); } else if (_chat && _membersFilter == MembersFilter::Admins) { text = lang(lng_contacts_loading); - p.fillRect(0, 0, width(), _newItemHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg); - p.fillRect(0, _newItemHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowColor); + p.fillRect(0, 0, width(), _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, st::contactsAboutBg); + p.fillRect(0, _aboutHeight - st::contactsPadding.bottom() - st::lineWidth, width(), st::lineWidth, st::shadowColor); p.setPen(st::boxTextFg); - p.drawTextLeft(st::contactsPadding.left(), st::contactsNewItemTop, width(), lang(lng_chat_all_members_admins)); + p.drawTextLeft(st::contactsPadding.left(), st::contactsAllAdminsTop, width(), lang(lng_chat_all_members_admins)); int aboutw = width() - st::contactsPadding.left() - st::contactsPadding.right(); - (_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsNewItemHeight + st::contactsAboutTop, aboutw); - p.translate(0, _newItemHeight); + (_allAdmins->checked() ? _aboutAllAdmins : _aboutAdmins).draw(p, st::contactsPadding.left(), st::contactsAboutSkip + st::contactsAboutTop, aboutw); + p.translate(0, _aboutHeight); } else if (cContactsReceived() && !_searching) { text = lang(lng_no_contacts); skip = st::noContactsFont->height; @@ -1171,9 +1174,9 @@ void ContactsBox::Inner::enterEvent(QEvent *e) { int ContactsBox::Inner::getSelectedRowTop() const { if (_filter.isEmpty()) { if (_sel) { - return _newItemHeight + (_sel->pos() * _rowHeight); + return _aboutHeight + (_sel->pos() * _rowHeight); } else if (_byUsernameSel >= 0) { - return _newItemHeight + (_contacts->size() * _rowHeight) + st::searchedBarHeight + (_byUsernameSel * _rowHeight); + return _aboutHeight + (_contacts->size() * _rowHeight) + st::searchedBarHeight + (_byUsernameSel * _rowHeight); } } else { if (_filteredSel >= 0) { @@ -1186,13 +1189,9 @@ int ContactsBox::Inner::getSelectedRowTop() const { } void ContactsBox::Inner::updateSelectedRow() { - if (_filter.isEmpty() && _newItemSel) { - update(0, 0, width(), st::contactsNewItemHeight); - } else { - auto rowTop = getSelectedRowTop(); - if (rowTop >= 0) { - updateRowWithTop(rowTop); - } + auto rowTop = getSelectedRowTop(); + if (rowTop >= 0) { + updateRowWithTop(rowTop); } } @@ -1204,12 +1203,12 @@ int ContactsBox::Inner::getRowTopWithPeer(PeerData *peer) const { if (_filter.isEmpty()) { for (auto i = _contacts->cbegin(), end = _contacts->cend(); i != end; ++i) { if ((*i)->history()->peer == peer) { - return _newItemHeight + ((*i)->pos() * _rowHeight); + return _aboutHeight + ((*i)->pos() * _rowHeight); } } for (auto i = 0, count = _byUsername.size(); i != count; ++i) { if (_byUsername[i] == peer) { - return _newItemHeight + (_contacts->size() * _rowHeight) + st::searchedBarHeight + (i * _rowHeight); + return _aboutHeight + (_contacts->size() * _rowHeight) + st::searchedBarHeight + (i * _rowHeight); } } } else { @@ -1237,10 +1236,9 @@ void ContactsBox::Inner::updateRowWithPeer(PeerData *peer) { void ContactsBox::Inner::leaveEvent(QEvent *e) { _mouseSel = false; setMouseTracking(false); - if (_newItemSel || _sel || _filteredSel >= 0 || _byUsernameSel >= 0) { + if (_sel || _filteredSel >= 0 || _byUsernameSel >= 0) { updateSelectedRow(); _sel = 0; - _newItemSel = false; _filteredSel = _byUsernameSel = -1; } } @@ -1316,10 +1314,6 @@ void ContactsBox::Inner::chooseParticipant() { } else { PeerData *peer = 0; if (_filter.isEmpty()) { - if (_newItemSel) { - emit addRequested(); - return; - } if (_byUsernameSel >= 0 && _byUsernameSel < _byUsername.size()) { peer = _byUsername[_byUsernameSel]; } else if (_sel) { @@ -1431,19 +1425,14 @@ void ContactsBox::Inner::updateSelection() { QPoint p(mapFromGlobal(_lastMousePos)); bool in = parentWidget()->rect().contains(parentWidget()->mapFromGlobal(_lastMousePos)); if (_filter.isEmpty()) { - bool newItemSel = false; - if (_newItemHeight) { - if (in && (p.y() >= 0) && (p.y() < _newItemHeight) && !(_chat && _membersFilter == MembersFilter::Admins)) { - newItemSel = true; - } - p.setY(p.y() - _newItemHeight); + if (_aboutHeight) { + p.setY(p.y() - _aboutHeight); } - Dialogs::Row *newSel = (in && !newItemSel && (p.y() >= 0) && (p.y() < _contacts->size() * _rowHeight)) ? _contacts->rowAtY(p.y(), _rowHeight) : nullptr; - int32 byUsernameSel = (in && !newItemSel && p.y() >= _contacts->size() * _rowHeight + st::searchedBarHeight) ? ((p.y() - _contacts->size() * _rowHeight - st::searchedBarHeight) / _rowHeight) : -1; + Dialogs::Row *newSel = (in && (p.y() >= 0) && (p.y() < _contacts->size() * _rowHeight)) ? _contacts->rowAtY(p.y(), _rowHeight) : nullptr; + int32 byUsernameSel = (in && p.y() >= _contacts->size() * _rowHeight + st::searchedBarHeight) ? ((p.y() - _contacts->size() * _rowHeight - st::searchedBarHeight) / _rowHeight) : -1; if (byUsernameSel >= _byUsername.size()) byUsernameSel = -1; - if (newSel != _sel || byUsernameSel != _byUsernameSel || newItemSel != _newItemSel) { + if (newSel != _sel || byUsernameSel != _byUsernameSel) { updateSelectedRow(); - _newItemSel = newItemSel; _sel = newSel; _byUsernameSel = byUsernameSel; updateSelectedRow(); @@ -1678,10 +1667,10 @@ void ContactsBox::Inner::refresh() { } if (!_contacts->isEmpty() || !_byUsername.isEmpty()) { if (!_addContactLnk->isHidden()) _addContactLnk->hide(); - resize(width(), _newItemHeight + (_contacts->size() * _rowHeight) + (_byUsername.isEmpty() ? 0 : (st::searchedBarHeight + _byUsername.size() * _rowHeight))); + resize(width(), _aboutHeight + (_contacts->size() * _rowHeight) + (_byUsername.isEmpty() ? 0 : (st::searchedBarHeight + _byUsername.size() * _rowHeight))); } else if (_chat && _membersFilter == MembersFilter::Admins) { if (!_addContactLnk->isHidden()) _addContactLnk->hide(); - resize(width(), _newItemHeight + st::noContactsHeight); + resize(width(), _aboutHeight + st::noContactsHeight); } else { if (cContactsReceived() && !bot()) { if (_addContactLnk->isHidden()) _addContactLnk->show(); @@ -1740,7 +1729,7 @@ ContactsBox::Inner::~Inner() { void ContactsBox::Inner::resizeEvent(QResizeEvent *e) { _addContactLnk->move((width() - _addContactLnk->width()) / 2, (st::noContactsHeight + st::noContactsFont->height) / 2); - _allAdmins->moveToLeft(st::contactsPadding.left(), st::contactsNewItemTop); + _allAdmins->moveToLeft(st::contactsPadding.left(), st::contactsAllAdminsTop); } void ContactsBox::Inner::selectSkip(int32 dir) { @@ -1752,20 +1741,16 @@ void ContactsBox::Inner::selectSkip(int32 dir) { for (auto i = _contacts->cbegin(); *i != _sel; ++i) { ++cur; } - if (_newItemHeight) ++cur; } else if (_byUsernameSel >= 0) { cur = (_contacts->size() + _byUsernameSel); - if (_newItemHeight) ++cur; - } else if (!_newItemSel) { + } else { cur = -1; } cur += dir; if (cur <= 0) { - _newItemSel = (_chat && _membersFilter == MembersFilter::Admins) ? false : (_newItemHeight ? true : false); - _sel = (!_newItemHeight && !_contacts->isEmpty()) ? *_contacts->cbegin() : nullptr; - _byUsernameSel = (!_newItemHeight && _contacts->isEmpty() && !_byUsername.isEmpty()) ? 0 : -1; - } else if (cur >= _contacts->size() + (_newItemHeight ? 1 : 0)) { - _newItemSel = false; + _sel = (!_contacts->isEmpty()) ? *_contacts->cbegin() : nullptr; + _byUsernameSel = (_contacts->isEmpty() && !_byUsername.isEmpty()) ? 0 : -1; + } else if (cur >= _contacts->size()) { if (_byUsername.isEmpty()) { _sel = _contacts->isEmpty() ? nullptr : *(_contacts->cend() - 1); _byUsernameSel = -1; @@ -1775,8 +1760,6 @@ void ContactsBox::Inner::selectSkip(int32 dir) { if (_byUsernameSel >= _byUsername.size()) _byUsernameSel = _byUsername.size() - 1; } } else { - _newItemSel = false; - if (_newItemHeight) --cur; for (auto i = _contacts->cbegin(); ; ++i) { _sel = *i; if (!cur) { @@ -1809,7 +1792,7 @@ void ContactsBox::Inner::selectSkip(int32 dir) { } if (_byUsernameSel < 0) { if (!_contacts->isEmpty()) { - if (!_newItemSel && !_sel) _sel = *(_contacts->cend() - 1); + if (!_sel) _sel = *(_contacts->cend() - 1); if (_sel) { for (auto i = _contacts->cfind(_sel), b = _contacts->cbegin(); i != b && contactData(*i)->disabledChecked; --i) { _sel = *i; @@ -1821,12 +1804,10 @@ void ContactsBox::Inner::selectSkip(int32 dir) { } } } - if (_newItemSel) { - emit mustScrollTo(0, _newItemHeight); - } else if (_sel) { - emit mustScrollTo(_newItemHeight + _sel->pos() * _rowHeight, _newItemHeight + (_sel->pos() + 1) * _rowHeight); + if (_sel) { + emit mustScrollTo(_aboutHeight + _sel->pos() * _rowHeight, _aboutHeight + (_sel->pos() + 1) * _rowHeight); } else if (_byUsernameSel >= 0) { - emit mustScrollTo(_newItemHeight + (_contacts->size() + _byUsernameSel) * _rowHeight + st::searchedBarHeight, _newItemHeight + (_contacts->size() + _byUsernameSel + 1) * _rowHeight + st::searchedBarHeight); + emit mustScrollTo(_aboutHeight + (_contacts->size() + _byUsernameSel) * _rowHeight + st::searchedBarHeight, _aboutHeight + (_contacts->size() + _byUsernameSel + 1) * _rowHeight + st::searchedBarHeight); } } else { int cur = (_filteredSel >= 0) ? _filteredSel : ((_byUsernameSel >= 0) ? (_filtered.size() + _byUsernameSel) : -1); diff --git a/Telegram/SourceFiles/boxes/contactsbox.h b/Telegram/SourceFiles/boxes/contactsbox.h index d0020347b..93807e328 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.h +++ b/Telegram/SourceFiles/boxes/contactsbox.h @@ -91,6 +91,7 @@ private: class Inner; ChildWidget _inner; ChildWidget> _select; + ChildWidget _add = { nullptr }; ChildWidget _next; ChildWidget _cancel; @@ -187,7 +188,6 @@ signals: void mustScrollTo(int ymin, int ymax); void searchByUsername(); void adminAdded(); - void addRequested(); private slots: void onDialogRowReplaced(Dialogs::Row *oldRow, Dialogs::Row *newRow); @@ -252,9 +252,8 @@ private: base::lambda_unique _peerSelectedChangedCallback; - int32 _rowHeight; - int _newItemHeight = 0; - bool _newItemSel = false; + int _rowHeight; + int _aboutHeight = 0; ChatData *_chat = nullptr; ChannelData *_channel = nullptr; diff --git a/Telegram/SourceFiles/boxes/members_box.cpp b/Telegram/SourceFiles/boxes/members_box.cpp index 00c654e3c..5dbedd23c 100644 --- a/Telegram/SourceFiles/boxes/members_box.cpp +++ b/Telegram/SourceFiles/boxes/members_box.cpp @@ -28,13 +28,17 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "mainwindow.h" #include "boxes/contactsbox.h" #include "boxes/confirmbox.h" +#include "ui/buttons/icon_button.h" #include "observer_peer.h" MembersBox::MembersBox(ChannelData *channel, MembersFilter filter) : ItemListBox(st::boxScroll) , _inner(this, channel, filter) { ItemListBox::init(_inner); - connect(_inner, SIGNAL(addRequested()), this, SLOT(onAdd())); + if (channel->amCreator() && (channel->membersCount() < (channel->isMegagroup() ? Global::MegagroupSizeMax() : Global::ChatSizeMax()) || (!channel->isMegagroup() && !channel->isPublic()) || filter == MembersFilter::Admins)) { + _add.create(this, st::contactsAdd); + _add->setClickedCallback([this] { onAdd(); }); + } connect(scrollArea(), SIGNAL(scrolled()), this, SLOT(onScroll())); connect(_inner, SIGNAL(mustScrollTo(int, int)), scrollArea(), SLOT(scrollToY(int, int))); @@ -69,6 +73,10 @@ void MembersBox::paintEvent(QPaintEvent *e) { void MembersBox::resizeEvent(QResizeEvent *e) { ItemListBox::resizeEvent(e); _inner->resize(width(), _inner->height()); + + if (_add) { + _add->moveToRight(st::contactsAddPosition.x(), height() - st::contactsAddPosition.y() - _add->height()); + } } void MembersBox::onScroll() { @@ -99,8 +107,6 @@ void MembersBox::onAdminAdded() { MembersBox::Inner::Inner(QWidget *parent, ChannelData *channel, MembersFilter filter) : TWidget(parent) , _rowHeight(st::contactsPadding.top() + st::contactsPhotoSize + st::contactsPadding.bottom()) -, _newItemHeight((channel->amCreator() && (channel->membersCount() < (channel->isMegagroup() ? Global::MegagroupSizeMax() : Global::ChatSizeMax()) || (!channel->isMegagroup() && !channel->isPublic()) || filter == MembersFilter::Admins)) ? st::contactsNewItemHeight : 0) -, _newItemSel(false) , _channel(channel) , _filter(filter) , _kickText(lang(lng_profile_kick)) @@ -148,17 +154,6 @@ void MembersBox::Inner::paintEvent(QPaintEvent *e) { p.setPen(st::noContactsColor); p.drawText(QRect(0, 0, width(), st::noContactsHeight), lang(lng_contacts_loading), style::al_center); } else { - if (_newItemHeight) { - p.fillRect(0, 0, width(), _newItemHeight, _newItemSel ? st::contactsBgOver : st::contactsBg); - st::contactsNewItemIcon.paint(p, 0, 0, width()); - p.setFont(st::contactsNameFont); - p.setPen(st::contactsNewItemFg); - p.drawTextLeft(st::contactsPadding.left() + st::contactsPhotoSize + st::contactsPadding.left(), st::contactsNewItemTop, width(), lang(_filter == MembersFilter::Admins ? lng_channel_add_admins : lng_channel_add_members)); - - yFrom -= _newItemHeight; - yTo -= _newItemHeight; - p.translate(0, _newItemHeight); - } int32 from = floorclamp(yFrom, _rowHeight, 0, _rows.size()); int32 to = ceilclamp(yTo, _rowHeight, 0, _rows.size()); p.translate(0, from * _rowHeight); @@ -271,19 +266,16 @@ void MembersBox::Inner::selectSkip(int32 dir) { _mouseSel = false; int cur = -1; - if (_newItemHeight && _newItemSel) { - cur = 0; - } else if (_sel >= 0) { - cur = _sel + (_newItemHeight ? 1 : 0); + if (_sel >= 0) { + cur = _sel; } cur += dir; if (cur <= 0) { - _newItemSel = _newItemHeight ? true : false; - _sel = (_newItemSel || _rows.isEmpty()) ? -1 : 0; - } else if (cur >= _rows.size() + (_newItemHeight ? 1 : 0)) { + _sel = _rows.isEmpty() ? -1 : 0; + } else if (cur >= _rows.size()) { _sel = -1; } else { - _sel = cur - (_newItemHeight ? 1 : 0); + _sel = cur; } if (dir > 0) { if (_sel < 0 || _sel >= _rows.size()) { @@ -291,13 +283,11 @@ void MembersBox::Inner::selectSkip(int32 dir) { } } else { if (!_rows.isEmpty()) { - if (_sel < 0 && !_newItemSel) _sel = _rows.size() - 1; + if (_sel < 0) _sel = _rows.size() - 1; } } - if (_newItemSel) { - emit mustScrollTo(0, _newItemHeight); - } else if (_sel >= 0) { - emit mustScrollTo(_newItemHeight + _sel * _rowHeight, _newItemHeight + (_sel + 1) * _rowHeight); + if (_sel >= 0) { + emit mustScrollTo(_sel * _rowHeight, (_sel + 1) * _rowHeight); } update(); @@ -318,10 +308,10 @@ void MembersBox::Inner::loadProfilePhotos(int32 yFrom) { if (yFrom < 0) yFrom = 0; if (!_rows.isEmpty()) { - int32 from = (yFrom - _newItemHeight) / _rowHeight; + int32 from = yFrom / _rowHeight; if (from < 0) from = 0; if (from < _rows.size()) { - int32 to = ((yTo - _newItemHeight) / _rowHeight) + 1; + int32 to = (yTo / _rowHeight) + 1; if (to > _rows.size()) to = _rows.size(); for (; from < to; ++from) { @@ -332,10 +322,6 @@ void MembersBox::Inner::loadProfilePhotos(int32 yFrom) { } void MembersBox::Inner::chooseParticipant() { - if (_newItemSel) { - emit addRequested(); - return; - } if (_sel < 0 || _sel >= _rows.size()) return; if (PeerData *peer = _rows[_sel]) { Ui::hideLayer(); @@ -353,7 +339,7 @@ void MembersBox::Inner::refresh() { if (_filter != MembersFilter::Recent || (_rows.size() >= _channel->membersCount() && _rows.size() < Global::ChatSizeMax())) { _aboutHeight = 0; } - resize(width(), st::membersPadding.top() + _newItemHeight + _rows.size() * _rowHeight + st::membersPadding.bottom() + _aboutHeight); + resize(width(), st::membersPadding.top() + _rows.size() * _rowHeight + st::membersPadding.bottom() + _aboutHeight); } update(); } @@ -378,7 +364,6 @@ MembersAlreadyIn MembersBox::Inner::already() const { void MembersBox::Inner::clearSel() { updateSelectedRow(); - _newItemSel = false; _sel = _kickSel = _kickDown = -1; _lastMousePos = QCursor::pos(); updateSel(); @@ -425,15 +410,13 @@ void MembersBox::Inner::updateSel() { QPoint p(mapFromGlobal(_lastMousePos)); p.setY(p.y() - st::membersPadding.top()); bool in = parentWidget()->rect().contains(parentWidget()->mapFromGlobal(_lastMousePos)); - bool newItemSel = (in && p.y() >= 0 && p.y() < _newItemHeight); - int32 newSel = (in && !newItemSel && p.y() >= _newItemHeight && p.y() < _newItemHeight + _rows.size() * _rowHeight) ? ((p.y() - _newItemHeight) / _rowHeight) : -1; + int32 newSel = (in && p.y() >= 0 && p.y() < _rows.size() * _rowHeight) ? (p.y() / _rowHeight) : -1; int32 newKickSel = newSel; - if (newSel >= 0 && (!data(newSel)->canKick || !QRect(width() - _kickWidth - st::contactsPadding.right() - st::contactsCheckPosition.x(), _newItemHeight + newSel * _rowHeight + st::contactsPadding.top() + (st::contactsPhotoSize - st::normalFont->height) / 2, _kickWidth, st::normalFont->height).contains(p))) { + if (newSel >= 0 && (!data(newSel)->canKick || !QRect(width() - _kickWidth - st::contactsPadding.right() - st::contactsCheckPosition.x(), newSel * _rowHeight + st::contactsPadding.top() + (st::contactsPhotoSize - st::normalFont->height) / 2, _kickWidth, st::normalFont->height).contains(p))) { newKickSel = -1; } - if (newSel != _sel || newKickSel != _kickSel || newItemSel != _newItemSel) { + if (newSel != _sel || newKickSel != _kickSel) { updateSelectedRow(); - _newItemSel = newItemSel; _sel = newSel; _kickSel = newKickSel; updateSelectedRow(); @@ -446,11 +429,8 @@ void MembersBox::Inner::peerUpdated(PeerData *peer) { } void MembersBox::Inner::updateSelectedRow() { - if (_newItemSel) { - update(0, st::membersPadding.top(), width(), _newItemHeight); - } if (_sel >= 0) { - update(0, st::membersPadding.top() + _newItemHeight + _sel * _rowHeight, width(), _rowHeight); + update(0, st::membersPadding.top() + _sel * _rowHeight, width(), _rowHeight); } } diff --git a/Telegram/SourceFiles/boxes/members_box.h b/Telegram/SourceFiles/boxes/members_box.h index a9639610f..b2bdffbdd 100644 --- a/Telegram/SourceFiles/boxes/members_box.h +++ b/Telegram/SourceFiles/boxes/members_box.h @@ -42,7 +42,6 @@ public: public slots: void onScroll(); - void onAdd(); void onAdminAdded(); protected: @@ -51,8 +50,11 @@ protected: void resizeEvent(QResizeEvent *e) override; private: + void onAdd(); + class Inner; ChildWidget _inner; + ChildWidget _add = { nullptr }; ContactsBox *_addBox = nullptr; @@ -89,7 +91,6 @@ public: signals: void mustScrollTo(int ymin, int ymax); - void addRequested(); void loaded(); public slots: @@ -132,8 +133,7 @@ private: void clear(); - int32 _rowHeight, _newItemHeight; - bool _newItemSel; + int _rowHeight; ChannelData *_channel; MembersFilter _filter; diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 0afb5405b..9b9bba03d 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "core/utils.h" -#define BETA_VERSION_MACRO (10019003ULL) +#define BETA_VERSION_MACRO (10019004ULL) constexpr int AppVersion = 10020; constexpr str_const AppVersionStr = "0.10.20"; diff --git a/Telegram/SourceFiles/history/history.style b/Telegram/SourceFiles/history/history.style index e5c4a6a06..961d89d65 100644 --- a/Telegram/SourceFiles/history/history.style +++ b/Telegram/SourceFiles/history/history.style @@ -24,19 +24,16 @@ using "ui/widgets/widgets.style"; historyPaddingBottom: 10px; -historyToDown: icon { - { "history_down_shadow", #00000040 }, - { "history_down_circle", #ffffff, point(2px, 1px) }, -}; historyToDownPosition: point(12px, 10px); historyToDownArrow: icon { - { "history_down_arrow", #b9b9b9, point(14px, 19px) }, + { "history_down_arrow", #b9b9b9, point(17px, 23px) }, }; historyToDownPaddingTop: 10px; historyToDownBadgeFont: semiboldFont; historyToDownBadgeSize: 22px; historyToDownShownAfter: 480px; +historyToDownDuration: 150; historyEmptyDog: icon {{ "history_empty_dog", #ffffff }}; historyEmptySize: 128px; @@ -177,8 +174,8 @@ historyComposeButton: flatButton { overTextTop: 12px; downTextTop: 13px; - font: font(16px); - overFont: font(16px); + font: semiboldFont; + overFont: semiboldFont; } historyUnblock: flatButton(historyComposeButton) { color: #d15948; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 7d1b2e133..efa04d70d 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4231,7 +4231,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re _canSendMessages = canSendMessages(_peer); if (_peer && _peer->isChannel()) { _peer->asChannel()->updateFull(); - _joinChannel->setText(lang(_peer->isMegagroup() ? lng_group_invite_join : lng_channel_join)); + _joinChannel->setText(lang(_peer->isMegagroup() ? lng_group_invite_join : lng_channel_join).toUpper()); } _unblockRequest = _reportSpamRequest = 0; @@ -4371,7 +4371,7 @@ void HistoryWidget::updateFieldSubmitSettings() { void HistoryWidget::updateNotifySettings() { if (!_peer || !_peer->isChannel()) return; - _muteUnmute->setText(lang(_history->mute() ? lng_channel_unmute : lng_channel_mute)); + _muteUnmute->setText(lang(_history->mute() ? lng_channel_unmute : lng_channel_mute).toUpper()); if (_peer->notify != UnknownNotifySettings) { _silent->setChecked(_peer->notify != EmptyNotifySettings && (_peer->notify->flags & MTPDpeerNotifySettings::Flag::f_silent)); if (_silent->isHidden() && hasSilentToggle()) { diff --git a/Telegram/SourceFiles/settings/settings_scale_widget.cpp b/Telegram/SourceFiles/settings/settings_scale_widget.cpp index a2971788e..63a9674a7 100644 --- a/Telegram/SourceFiles/settings/settings_scale_widget.cpp +++ b/Telegram/SourceFiles/settings/settings_scale_widget.cpp @@ -86,14 +86,13 @@ void ScaleWidget::setScale(DBIScale newScale) { } else if (newScale != dbisAuto && _auto->checked()) { _auto->setChecked(false); } + _newScale = newScale; if (newScale == dbisAuto) newScale = cScreenScale(); if (_scale->activeSection() != newScale - 1) { _scale->setActiveSection(newScale - 1); } if (cEvalScale(newScale) != cEvalScale(cRealScale())) { - _newScale = newScale; - auto box = new ConfirmBox(lang(lng_settings_need_restart), lang(lng_settings_restart_now), st::defaultBoxButton, lang(lng_cancel)); connect(box, SIGNAL(confirmed()), this, SLOT(onRestartNow())); connect(box, SIGNAL(cancelled()), this, SLOT(onCancel())); diff --git a/Telegram/SourceFiles/stickers/emoji_pan.cpp b/Telegram/SourceFiles/stickers/emoji_pan.cpp index 4bb43c4d2..f52735d6b 100644 --- a/Telegram/SourceFiles/stickers/emoji_pan.cpp +++ b/Telegram/SourceFiles/stickers/emoji_pan.cpp @@ -1191,14 +1191,14 @@ void StickerPanInner::mouseReleaseEvent(QMouseEvent *e) { ClickHandlerPtr activated = ClickHandler::unpressed(); - _lastMousePos = e->globalPos(); - updateSelected(); - if (_previewShown) { _previewShown = false; return; } + _lastMousePos = e->globalPos(); + updateSelected(); + if (showingInlineItems()) { if (_selected < 0 || _selected != pressed || !activated) { return; diff --git a/Telegram/SourceFiles/stickers/stickers.style b/Telegram/SourceFiles/stickers/stickers.style index 752abc675..d2616bb60 100644 --- a/Telegram/SourceFiles/stickers/stickers.style +++ b/Telegram/SourceFiles/stickers/stickers.style @@ -51,7 +51,7 @@ stickersFeaturedFont: contactsNameFont; stickersFeaturedPosition: point(16px, 6px); stickersFeaturedBadgeFont: semiboldFont; stickersFeaturedBadgeSize: 21px; -stickersFeaturedPen: contactsNewItemFg; +stickersFeaturedPen: lightButtonFg; stickersFeaturedUnreadBg: msgFileInBg; stickersFeaturedUnreadSize: 5px; stickersFeaturedUnreadSkip: 5px; diff --git a/Telegram/SourceFiles/ui/buttons/history_down_button.cpp b/Telegram/SourceFiles/ui/buttons/history_down_button.cpp index 832f89040..9eab4635d 100644 --- a/Telegram/SourceFiles/ui/buttons/history_down_button.cpp +++ b/Telegram/SourceFiles/ui/buttons/history_down_button.cpp @@ -114,7 +114,7 @@ void HistoryDownButton::hideAnimated() { void HistoryDownButton::toggleAnimated() { _shown = !_shown; float64 from = _shown ? 0. : 1., to = _shown ? 1. : 0.; - _a_show.start([this] { update(); }, from, to, st::historyAttachEmoji.duration); + _a_show.start([this] { update(); }, from, to, st::historyToDownDuration); } void HistoryDownButton::finishAnimation() { diff --git a/Telegram/SourceFiles/ui/widgets/inner_dropdown.cpp b/Telegram/SourceFiles/ui/widgets/inner_dropdown.cpp index 11b614bc3..467d7ce48 100644 --- a/Telegram/SourceFiles/ui/widgets/inner_dropdown.cpp +++ b/Telegram/SourceFiles/ui/widgets/inner_dropdown.cpp @@ -112,24 +112,20 @@ void InnerDropdown::paintEvent(QPaintEvent *e) { if (auto opacity = _a_opacity.current(ms, _hiding ? 0. : 1.)) { p.drawImage(0, 0, _showAnimation->getFrame(_a_show.current(1.), opacity)); } - return; } else if (_a_opacity.animating(ms)) { p.setOpacity(_a_opacity.current(0.)); p.drawPixmap(0, 0, _cache); - return; } else if (_hiding || isHidden()) { hideFinished(); - return; } else if (_showAnimation) { p.drawImage(0, 0, _showAnimation->getFrame(1., 1.)); _showAnimation.reset(); showChildren(); - return; + } else { + auto inner = rect().marginsRemoved(_st.padding); + Shadow::paint(p, inner, width(), _st.shadow); + App::roundRect(p, inner, _st.bg, ImageRoundRadius::Small); } - - auto inner = rect().marginsRemoved(_st.padding); - Shadow::paint(p, inner, width(), _st.shadow); - App::roundRect(p, inner, _st.bg, ImageRoundRadius::Small); } void InnerDropdown::enterEvent(QEvent *e) { @@ -269,9 +265,13 @@ QImage InnerDropdown::grabForPanelAnimation() { void InnerDropdown::opacityAnimationCallback() { update(); - if (_hiding && !_a_opacity.animating()) { - _hiding = false; - hideFinished(); + if (!_a_opacity.animating()) { + if (_hiding) { + _hiding = false; + hideFinished(); + } else { + showChildren(); + } } } diff --git a/Telegram/SourceFiles/ui/widgets/multi_select.cpp b/Telegram/SourceFiles/ui/widgets/multi_select.cpp index d4c7c0364..f803a8c60 100644 --- a/Telegram/SourceFiles/ui/widgets/multi_select.cpp +++ b/Telegram/SourceFiles/ui/widgets/multi_select.cpp @@ -349,7 +349,7 @@ void MultiSelect::Inner::Item::setVisibleAnimated(bool visible) { prepareCache(); auto from = visible ? 0. : 1.; auto to = visible ? 1. : 0.; - auto transition = visible ? anim::bumpy(1.125) : anim::linear; + auto transition = visible ? anim::bumpy(1.0625) : anim::linear; _visibility.start(_updateCallback, from, to, _st.duration, transition); } diff --git a/Telegram/SourceFiles/ui/widgets/popup_menu.cpp b/Telegram/SourceFiles/ui/widgets/popup_menu.cpp index 6f9985e9a..1217c08c5 100644 --- a/Telegram/SourceFiles/ui/widgets/popup_menu.cpp +++ b/Telegram/SourceFiles/ui/widgets/popup_menu.cpp @@ -361,9 +361,13 @@ void PopupMenu::startShowAnimation() { void PopupMenu::opacityAnimationCallback() { update(); - if (_hiding && !_a_opacity.animating()) { - _hiding = false; - hideFinished(); + if (!_a_opacity.animating()) { + if (_hiding) { + _hiding = false; + hideFinished(); + } else { + showChildren(); + } } } diff --git a/Telegram/SourceFiles/ui/widgets/widgets.style b/Telegram/SourceFiles/ui/widgets/widgets.style index db60dba29..85ad525d0 100644 --- a/Telegram/SourceFiles/ui/widgets/widgets.style +++ b/Telegram/SourceFiles/ui/widgets/widgets.style @@ -323,3 +323,19 @@ defaultDropdownMenu: DropdownMenu { } menu: defaultMenu; } + +historyToDown: icon { + { "history_down_shadow", #00000040 }, + { "history_down_circle", #ffffff, point(4px, 4px) }, +}; + +contactsAddIcon: icon { + { "history_down_shadow", #00000020 }, + { "history_down_circle", activeButtonBg, point(4px, 4px) }, + { "contacts_add", activeButtonFg, point(18px, 18px) }, +}; +contactsAddIconOver: icon { + { "history_down_shadow", #00000020 }, + { "history_down_circle", activeButtonBgOver, point(4px, 4px) }, + { "contacts_add", activeButtonFg, point(18px, 18px) }, +}; diff --git a/Telegram/build/version b/Telegram/build/version index 577f8e9c5..eb7121d34 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.10 AppVersionStrSmall 0.10.20 AppVersionStr 0.10.20 AlphaChannel 0 -BetaVersion 10019003 +BetaVersion 10019004