mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Fix cancel search style in emoji panel.
This commit is contained in:
@@ -230,7 +230,24 @@ defaultTabbedSearch: TabbedSearch {
|
|||||||
iconPosition: point(7px, -1px);
|
iconPosition: point(7px, -1px);
|
||||||
ripple: emptyRippleAnimation;
|
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;
|
defaultFieldWidth: 101px;
|
||||||
groupWidth: 30px;
|
groupWidth: 30px;
|
||||||
height: 33px;
|
height: 33px;
|
||||||
|
@@ -228,6 +228,7 @@ SearchWithGroups::SearchWithGroups(
|
|||||||
initField();
|
initField();
|
||||||
initGroups();
|
initGroups();
|
||||||
initEdges();
|
initEdges();
|
||||||
|
initButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
anim::type SearchWithGroups::animated() const {
|
anim::type SearchWithGroups::animated() const {
|
||||||
@@ -334,6 +335,12 @@ void SearchWithGroups::initEdges() {
|
|||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SearchWithGroups::initButtons() {
|
||||||
|
_cancel->setClickedCallback([=] {
|
||||||
|
_field->setText(QString());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void SearchWithGroups::ensureRounding(int size, float64 ratio) {
|
void SearchWithGroups::ensureRounding(int size, float64 ratio) {
|
||||||
const auto rounded = qRound(size * ratio);
|
const auto rounded = qRound(size * ratio);
|
||||||
const auto full = QSize(rounded + 4, rounded);
|
const auto full = QSize(rounded + 4, rounded);
|
||||||
|
@@ -59,6 +59,7 @@ private:
|
|||||||
void initField();
|
void initField();
|
||||||
void initGroups();
|
void initGroups();
|
||||||
void initEdges();
|
void initEdges();
|
||||||
|
void initButtons();
|
||||||
|
|
||||||
void ensureRounding(int size, float64 rounding);
|
void ensureRounding(int size, float64 rounding);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user