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 98f770cc6..3f3efebd0 100644 Binary files a/Telegram/Resources/icons/contacts_add.png and b/Telegram/Resources/icons/contacts_add.png differ diff --git a/Telegram/Resources/icons/contacts_add@2x.png b/Telegram/Resources/icons/contacts_add@2x.png index 7fc3c170f..0b68e8665 100644 Binary files a/Telegram/Resources/icons/contacts_add@2x.png and b/Telegram/Resources/icons/contacts_add@2x.png differ diff --git a/Telegram/Resources/icons/history_down_circle.png b/Telegram/Resources/icons/history_down_circle.png index f94e8dd7b..001abe2dd 100644 Binary files a/Telegram/Resources/icons/history_down_circle.png and b/Telegram/Resources/icons/history_down_circle.png differ diff --git a/Telegram/Resources/icons/history_down_circle@2x.png b/Telegram/Resources/icons/history_down_circle@2x.png index 94492dada..d5d9bcda7 100644 Binary files a/Telegram/Resources/icons/history_down_circle@2x.png and b/Telegram/Resources/icons/history_down_circle@2x.png differ diff --git a/Telegram/Resources/icons/history_down_shadow.png b/Telegram/Resources/icons/history_down_shadow.png index 8317b07d1..17e6289c2 100644 Binary files a/Telegram/Resources/icons/history_down_shadow.png and b/Telegram/Resources/icons/history_down_shadow.png differ diff --git a/Telegram/Resources/icons/history_down_shadow@2x.png b/Telegram/Resources/icons/history_down_shadow@2x.png index 8127513da..c7a2d5f2d 100644 Binary files a/Telegram/Resources/icons/history_down_shadow@2x.png and b/Telegram/Resources/icons/history_down_shadow@2x.png differ diff --git a/Telegram/Resources/sample.tdesktop-theme b/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