mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-21 16:47:07 +02:00
Improve reaction selector position.
This commit is contained in:
parent
d4ba01bad0
commit
a43a5ce6c5
2 changed files with 9 additions and 1 deletions
|
@ -686,6 +686,8 @@ void Reactions::Panel::create() {
|
|||
_controller->layoutValue(),
|
||||
_shownValue.value()
|
||||
) | rpl::start_with_next([=](const Layout &layout, float64 shown) {
|
||||
const auto story = _controller->story();
|
||||
const auto viewsReactionsMode = story && story->peer()->isChannel();
|
||||
const auto width = margins.left()
|
||||
+ _selector->countAppearedWidth(shown)
|
||||
+ margins.right();
|
||||
|
@ -693,6 +695,8 @@ void Reactions::Panel::create() {
|
|||
const auto shift = (width / 2);
|
||||
const auto right = (mode == Mode::Message)
|
||||
? (layout.reactions.x() + layout.reactions.width() / 2 + shift)
|
||||
: viewsReactionsMode
|
||||
? (layout.content.x() + layout.content.width())
|
||||
: (layout.controlsBottomPosition.x()
|
||||
+ layout.controlsWidth
|
||||
- st::storiesLikeReactionsPosition.x());
|
||||
|
|
|
@ -286,7 +286,11 @@ void RecentViews::setupViewsReactions() {
|
|||
|
||||
_controller->layoutValue(
|
||||
) | rpl::start_with_next([=](const Layout &layout) {
|
||||
_outer = layout.views;
|
||||
_outer = QRect(
|
||||
layout.content.x(),
|
||||
layout.views.y(),
|
||||
layout.content.width(),
|
||||
layout.views.height());
|
||||
updateViewsReactionsGeometry();
|
||||
}, _likeWrap->lifetime());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue