mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Improve reaction selector position.
This commit is contained in:
@@ -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());
|
||||
|
||||
|
Reference in New Issue
Block a user