2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Closed beta 10019008: Some more ripple animations added.

This commit is contained in:
John Preston
2016-11-16 19:04:25 +03:00
parent cdef9fa14f
commit 07689476a6
66 changed files with 845 additions and 680 deletions

View File

@@ -56,10 +56,10 @@ TopBarWidget::TopBarWidget(MainWidget *w) : TWidget(w)
subscribe(w->searchInPeerChanged(), [this](PeerData *peer) {
_searchInPeer = peer;
auto historyPeer = App::main() ? App::main()->historyPeer() : nullptr;
_search->setActiveState(historyPeer && historyPeer == _searchInPeer);
_search->setForceRippled(historyPeer && historyPeer == _searchInPeer);
});
subscribe(w->historyPeerChanged(), [this](PeerData *peer) {
_search->setActiveState(peer && peer == _searchInPeer, Ui::IconButton::SetStateWay::SkipAnimation);
_search->setForceRippled(peer && peer == _searchInPeer, Ui::IconButton::SetForceRippledWay::SkipAnimation);
update();
});
@@ -115,17 +115,17 @@ void TopBarWidget::showMenu() {
data->menu->deleteLater();
if (data->that && _menu == data->menu) {
_menu = nullptr;
_menuToggle->setActiveState(false);
_menuToggle->setForceRippled(false);
}
});
_menu->setShowStartCallback([this, data] {
if (data->that && _menu == data->menu) {
_menuToggle->setActiveState(true);
_menuToggle->setForceRippled(true);
}
});
_menu->setHideStartCallback([this, data] {
if (data->that && _menu == data->menu) {
_menuToggle->setActiveState(false);
_menuToggle->setForceRippled(false);
}
});
_menuToggle->installEventFilter(_menu);

View File

@@ -47,7 +47,6 @@ notifyClose: IconButton {
iconOver: simpleCloseIconOver;
iconPosition: point(10px, 10px);
iconPositionDown: point(10px, 11px);
}
notifyItemTop: 12px;
notifyTextLeft: 12px;
@@ -77,7 +76,6 @@ notifySendReply: IconButton {
icon: icon {{ "notification_send", lightButtonFg, point(3px, 9px) }};
iconPosition: point(0px, 0px);
iconPositionDown: point(0px, 1px);
}
titleUnreadCounterTop: 5px;
@@ -96,6 +94,8 @@ mainMenuCoverNameTop: 88px;
mainMenuCoverStatusTop: 106px;
mainMenuSkip: 13px;
mainMenu: Menu(defaultMenu) {
itemFg: windowBoldFg;
itemFgOver: windowBoldFgOver;
itemFont: semiboldFont;
itemIconPosition: point(28px, 11px);
itemPadding: margins(76px, 14px, 28px, 14px);
@@ -144,9 +144,7 @@ titleButtonMinimize: IconButton {
{ size(24px, 21px), titleButtonBgOver },
{ "title_button_minimize", titleButtonFgOver, point(4px, 4px) },
};
iconPosition: point(0px, 0px);
iconPositionDown: point(0px, 0px);
}
titleButtonMaximize: IconButton(titleButtonMinimize) {
icon: icon {{ "title_button_maximize", titleButtonFg, point(4px, 4px) }};
@@ -195,7 +193,6 @@ topBarButton: RoundButton {
padding: margins(0px, 14px, 12px, 12px);
textTop: 6px;
downTextTop: 6px;
font: font(fsize);
@@ -212,9 +209,7 @@ topBarSearch: IconButton {
icon: icon {{ "title_search", menuIconFg }};
iconOver: icon {{ "title_search", menuIconFgOver }};
iconPosition: point(15px, 18px);
iconPositionDown: point(15px, 18px);
rippleAreaPosition: point(4px, 7px);
rippleAreaSize: 40px;
@@ -225,9 +220,7 @@ topBarSearch: IconButton {
topBarMenuToggle: IconButton(topBarSearch) {
icon: icon {{ "title_menu_dots", menuIconFg }};
iconOver: icon {{ "title_menu_dots", menuIconFgOver }};
iconPosition: point(16px, 17px);
iconPositionDown: point(16px, 17px);
rippleAreaPosition: point(0px, 7px);
}

View File

@@ -80,6 +80,7 @@ void MainMenu::checkSelf() {
_userpicButton->setClickedCallback([] {
App::wnd()->showSettings();
});
_userpicButton->show();
updateControlsGeometry();
if (_showFinished) {
_userpicButton->showFinished();