mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 15:04:57 +00:00
Improve layout of channel story controls.
This commit is contained in:
@@ -359,8 +359,7 @@ void RecentViews::setupViewsReactions() {
|
||||
}) | rpl::on_next([=] {
|
||||
auto p = QPainter(_viewsWrap.get());
|
||||
const auto &icon = st::storiesViewsIcon;
|
||||
const auto top = (_viewsWrap->height() - icon.height()) / 2;
|
||||
icon.paint(p, 0, top, _viewsWrap->width());
|
||||
icon.paint(p, 0, st::storiesViewsIconTop, _viewsWrap->width());
|
||||
}, _viewsWrap->lifetime());
|
||||
|
||||
_likeIcon->move(0, 0);
|
||||
@@ -406,7 +405,7 @@ void RecentViews::updatePartsGeometry() {
|
||||
const auto skip = st::storiesRecentViewsSkip;
|
||||
const auto full = _userpicsWidth + skip + _text.maxWidth();
|
||||
const auto add = (_data.type == RecentViewsType::Channel)
|
||||
? st::storiesViewsTextPosition.y()
|
||||
? st::storiesChannelReactionsTextTop
|
||||
: 0;
|
||||
const auto use = std::min(full, _outer.width());
|
||||
const auto ux = _outer.x() + (_outer.width() - use) / 2;
|
||||
|
||||
@@ -1103,10 +1103,12 @@ storiesStealthStyle: StealthBoxStyle {
|
||||
|
||||
storiesViewsPosition: point(4px, 29px);
|
||||
storiesViewsIcon: icon{{ "mediaview/views", storiesComposeGrayText }};
|
||||
storiesViewsIconTop: 11px;
|
||||
storiesViewsText: FlatLabel(defaultFlatLabel) {
|
||||
textFg: storiesComposeGrayText;
|
||||
}
|
||||
storiesViewsTextPosition: point(26px, 14px);
|
||||
storiesChannelReactionsTextTop: 16px;
|
||||
|
||||
storiesLikesPosition: point(0px, 29px);
|
||||
storiesLikesIcon: icon {{ "chat/input_like", storiesComposeWhiteText }};
|
||||
|
||||
Reference in New Issue
Block a user