Improve scroll style for limited reaction selector.

This commit is contained in:
John Preston 2024-05-13 10:55:52 +04:00
parent 74db2167f9
commit c3fab28e1c
2 changed files with 9 additions and 1 deletions

View File

@ -785,6 +785,12 @@ emojiScroll: ScrollArea(defaultSolidScroll) {
reactPanelScroll: ScrollArea(emojiScroll) {
deltab: 7px;
}
reactPanelScrollRounded: ScrollArea(emojiScroll) {
width: 8px;
deltax: 3px;
deltat: 14px;
deltab: 14px;
}
choosePeerGroupIcon: icon {{ "info/edit/create_group", lightButtonFg }};
choosePeerChannelIcon: icon {{ "info/edit/create_channel", lightButtonFg }};

View File

@ -924,7 +924,9 @@ void Selector::createList() {
&_show->session(),
_strip ? _reactions.recent : std::vector<Data::Reaction>(),
_strip.get());
_scroll = Ui::CreateChild<Ui::ScrollArea>(this, st::reactPanelScroll);
_scroll = Ui::CreateChild<Ui::ScrollArea>(this, _reactions.customAllowed
? st::reactPanelScroll
: st::reactPanelScrollRounded);
_scroll->hide();
const auto st = lifetime().make_state<style::EmojiPan>(_st);