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

Closed beta 10019014: New input fields design and animations.

This commit is contained in:
John Preston
2016-12-09 21:56:01 +03:00
parent 2d48cde27a
commit 90234cb7a0
51 changed files with 1068 additions and 940 deletions

View File

@@ -50,27 +50,23 @@ TextParseOptions _documentNameOptions = {
} // namespace
void ItemBase::clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) {
void ItemBase::clickHandlerActiveChanged(const ClickHandlerPtr &action, bool active) {
App::hoveredLinkItem(active ? _parent : nullptr);
Ui::repaintHistoryItem(_parent);
}
void ItemBase::clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) {
void ItemBase::clickHandlerPressedChanged(const ClickHandlerPtr &action, bool pressed) {
App::pressedLinkItem(pressed ? _parent : nullptr);
Ui::repaintHistoryItem(_parent);
}
void RadialProgressItem::clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) {
if (p == _openl || p == _savel || p == _cancell) {
void RadialProgressItem::clickHandlerActiveChanged(const ClickHandlerPtr &action, bool active) {
ItemBase::clickHandlerActiveChanged(action, active);
if (action == _openl || action == _savel || action == _cancell) {
if (iconAnimated()) {
_a_iconOver.start([this] { Ui::repaintHistoryItem(_parent); }, active ? 0. : 1., active ? 1. : 0., st::msgFileOverDuration);
}
}
ItemBase::clickHandlerActiveChanged(p, active);
}
void RadialProgressItem::clickHandlerPressedChanged(const ClickHandlerPtr &p, bool pressed) {
ItemBase::clickHandlerPressedChanged(p, pressed);
}
void RadialProgressItem::setLinks(ClickHandlerPtr &&openl, ClickHandlerPtr &&savel, ClickHandlerPtr &&cancell) {
@@ -274,12 +270,14 @@ void Photo::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, int x, i
}
void Photo::clickHandlerActiveChanged(const ClickHandlerPtr &action, bool active) {
ItemBase::clickHandlerActiveChanged(action, active);
if (_check) {
_check->setActive(active);
}
}
void Photo::clickHandlerPressedChanged(const ClickHandlerPtr &action, bool pressed) {
ItemBase::clickHandlerPressedChanged(action, pressed);
if (_check) {
_check->setPressed(pressed);
}

View File

@@ -76,8 +76,8 @@ public:
return _parent;
}
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
void clickHandlerPressedChanged(const ClickHandlerPtr &p, bool active) override;
void clickHandlerActiveChanged(const ClickHandlerPtr &action, bool active) override;
void clickHandlerPressedChanged(const ClickHandlerPtr &action, bool pressed) override;
protected:
HistoryItem *_parent;
@@ -90,8 +90,7 @@ public:
}
RadialProgressItem(const RadialProgressItem &other) = delete;
void clickHandlerActiveChanged(const ClickHandlerPtr &p, bool active) override;
void clickHandlerPressedChanged(const ClickHandlerPtr &p, bool active) override;
void clickHandlerActiveChanged(const ClickHandlerPtr &action, bool active) override;
~RadialProgressItem();