mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix cancel search style in emoji panel.
This commit is contained in:
parent
88e7f4b662
commit
f19e343025
3 changed files with 26 additions and 1 deletions
|
@ -230,7 +230,24 @@ defaultTabbedSearch: TabbedSearch {
|
|||
iconPosition: point(7px, -1px);
|
||||
ripple: emptyRippleAnimation;
|
||||
}
|
||||
cancel: defaultMultiSelectSearchCancel;
|
||||
cancel: CrossButton {
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
|
||||
cross: CrossAnimation {
|
||||
size: 27px;
|
||||
skip: 8px;
|
||||
stroke: 1.;
|
||||
minScale: 0.3;
|
||||
}
|
||||
crossFg: menuIconFg;
|
||||
crossFgOver: menuIconFg;
|
||||
crossPosition: point(1px, 3px);
|
||||
|
||||
duration: 150;
|
||||
loadingPeriod: 1000;
|
||||
ripple: emptyRippleAnimation;
|
||||
}
|
||||
defaultFieldWidth: 101px;
|
||||
groupWidth: 30px;
|
||||
height: 33px;
|
||||
|
|
|
@ -228,6 +228,7 @@ SearchWithGroups::SearchWithGroups(
|
|||
initField();
|
||||
initGroups();
|
||||
initEdges();
|
||||
initButtons();
|
||||
}
|
||||
|
||||
anim::type SearchWithGroups::animated() const {
|
||||
|
@ -334,6 +335,12 @@ void SearchWithGroups::initEdges() {
|
|||
}, lifetime());
|
||||
}
|
||||
|
||||
void SearchWithGroups::initButtons() {
|
||||
_cancel->setClickedCallback([=] {
|
||||
_field->setText(QString());
|
||||
});
|
||||
}
|
||||
|
||||
void SearchWithGroups::ensureRounding(int size, float64 ratio) {
|
||||
const auto rounded = qRound(size * ratio);
|
||||
const auto full = QSize(rounded + 4, rounded);
|
||||
|
|
|
@ -59,6 +59,7 @@ private:
|
|||
void initField();
|
||||
void initGroups();
|
||||
void initEdges();
|
||||
void initButtons();
|
||||
|
||||
void ensureRounding(int size, float64 rounding);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue