mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Fix small stories thumbnails in profile / my stories.
This commit is contained in:
@@ -389,11 +389,10 @@ void TopBar::updateStoriesGeometry(int newWidth) {
|
||||
}
|
||||
const auto left = (_back ? _st.back.width : _st.titlePosition.x())
|
||||
- st::dialogsStories.left - st::dialogsStories.photoLeft;
|
||||
const auto top = st::dialogsStories.height
|
||||
- st::dialogsStoriesFull.height
|
||||
+ (_st.height - st::dialogsStories.height) / 2;
|
||||
const auto top = (_st.height - st::dialogsStories.height) / 2;
|
||||
_stories->resizeToWidth(newWidth - left - right);
|
||||
_stories->moveToLeft(left, top, newWidth);
|
||||
_stories->entity()->setLayoutConstraints({ 0, 0 }, style::al_left);
|
||||
}
|
||||
|
||||
void TopBar::paintEvent(QPaintEvent *e) {
|
||||
|
@@ -179,19 +179,17 @@ void InnerWidget::createButtons() {
|
||||
if (content.elements.empty()) {
|
||||
return;
|
||||
}
|
||||
const auto width = st::defaultDialogRow.padding.left()
|
||||
+ st::defaultDialogRow.photoSize
|
||||
+ st::defaultDialogRow.padding.left();
|
||||
const auto &small = st::dialogsStories;
|
||||
const auto count = int(content.elements.size());
|
||||
const auto smallWidth = small.photo + (count - 1) * small.shift;
|
||||
const auto real = smallWidth;
|
||||
const auto top = st::dialogsStories.height
|
||||
- st::dialogsStoriesFull.height
|
||||
+ (size.height() - st::dialogsStories.height) / 2;
|
||||
const auto right = st::settingsButtonRightSkip - (width - real) / 2;
|
||||
thumbs->resizeToWidth(width);
|
||||
thumbs->moveToRight(right, top);
|
||||
const auto height = small.photo + 2 * small.photoTop;
|
||||
const auto top = (size.height() - height) / 2;
|
||||
const auto right = st::settingsButtonRightSkip
|
||||
- small.left
|
||||
- small.photoLeft;
|
||||
const auto left = size.width() - right;
|
||||
thumbs->setLayoutConstraints({ left, top }, style::al_right);
|
||||
}, thumbs->lifetime());
|
||||
thumbs->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
recent->addClickHandler([=] {
|
||||
|
Reference in New Issue
Block a user