Improve emoji footer over state in status panel.

This commit is contained in:
John Preston 2023-02-01 21:29:50 +04:00
parent 1aeca7b486
commit f55d9fb82b
3 changed files with 7 additions and 6 deletions

View file

@ -45,6 +45,7 @@ EmojiPan {
bg: color; bg: color;
overBg: color; overBg: color;
categoriesBg: color; categoriesBg: color;
categoriesBgOver: color;
fadeLeft: icon; fadeLeft: icon;
fadeRight: icon; fadeRight: icon;
search: TabbedSearch; search: TabbedSearch;
@ -261,6 +262,7 @@ defaultEmojiPan: EmojiPan {
bg: emojiPanBg; bg: emojiPanBg;
overBg: emojiPanHover; overBg: emojiPanHover;
categoriesBg: emojiPanCategories; categoriesBg: emojiPanCategories;
categoriesBgOver: windowBgRipple;
fadeLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }}; fadeLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }};
fadeRight: icon {{ "fade_horizontal", emojiPanCategories }}; fadeRight: icon {{ "fade_horizontal", emojiPanCategories }};
search: defaultTabbedSearch; search: defaultTabbedSearch;
@ -268,6 +270,7 @@ defaultEmojiPan: EmojiPan {
} }
statusEmojiPan: EmojiPan(defaultEmojiPan) { statusEmojiPan: EmojiPan(defaultEmojiPan) {
categoriesBg: windowBg; categoriesBg: windowBg;
categoriesBgOver: windowBgOver;
fadeLeft: icon {{ "fade_horizontal-flip_horizontal", windowBg }}; fadeLeft: icon {{ "fade_horizontal-flip_horizontal", windowBg }};
fadeRight: icon {{ "fade_horizontal", windowBg }}; fadeRight: icon {{ "fade_horizontal", windowBg }};
} }

View file

@ -176,9 +176,7 @@ object_ptr<TabbedSelector::InnerFooter> GifsListWidget::createFooter() {
const auto i = ranges::find(_sections, setId, [](GifSection value) { const auto i = ranges::find(_sections, setId, [](GifSection value) {
return value.document->id; return value.document->id;
}); });
if (i != end(_sections)) { searchForGifs((i != end(_sections)) ? i->emoji->text() : QString());
searchForGifs(i->emoji->text());
}
}, _footer->lifetime()); }, _footer->lifetime());
return result; return result;

View file

@ -295,8 +295,8 @@ StickersListFooter::StickersListFooter(Descriptor &&descriptor)
, _settingsButtonVisible(descriptor.settingsButtonVisible) , _settingsButtonVisible(descriptor.settingsButtonVisible)
, _iconState([=] { update(); }) , _iconState([=] { update(); })
, _subiconState([=] { update(); }) , _subiconState([=] { update(); })
, _selectionBg(st::emojiPanRadius, st::windowBgRipple) , _selectionBg(st::emojiPanRadius, st().categoriesBgOver)
, _subselectionBg(st().iconArea / 2, st::windowBgRipple) { , _subselectionBg(st().iconArea / 2, st().categoriesBgOver) {
setMouseTracking(true); setMouseTracking(true);
_iconsLeft = st().iconSkip _iconsLeft = st().iconSkip
@ -679,7 +679,7 @@ void StickersListFooter::paintSelectionBg(
area / 2, area / 2,
progress); progress);
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.setBrush(st::windowBgRipple); p.setBrush(st().categoriesBgOver);
p.drawRoundedRect(rect, radius, radius); p.drawRoundedRect(rect, radius, radius);
} }
} }