mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Fixed display of loading peer list item in choose forum topic box.
This commit is contained in:
parent
8820b9046d
commit
465a33f095
3 changed files with 20 additions and 13 deletions
|
@ -633,10 +633,13 @@ auto ChooseTopicBoxController::Row::generatePaintUserpicCallback(
|
||||||
int y,
|
int y,
|
||||||
int outerWidth,
|
int outerWidth,
|
||||||
int size) {
|
int size) {
|
||||||
|
const auto &st = st::forumTopicRow;
|
||||||
|
x -= st.padding.left();
|
||||||
|
y -= st.padding.top();
|
||||||
auto view = Ui::PeerUserpicView();
|
auto view = Ui::PeerUserpicView();
|
||||||
p.translate(x, y);
|
p.translate(x, y);
|
||||||
_topic->paintUserpic(p, view, {
|
_topic->paintUserpic(p, view, {
|
||||||
.st = &st::forumTopicRow,
|
.st = &st,
|
||||||
.currentBg = st::windowBg,
|
.currentBg = st::windowBg,
|
||||||
.now = crl::now(),
|
.now = crl::now(),
|
||||||
.width = outerWidth,
|
.width = outerWidth,
|
||||||
|
|
|
@ -475,8 +475,8 @@ editTopicMaxHeight: 408px;
|
||||||
|
|
||||||
chooseTopicListItem: PeerListItem(defaultPeerListItem) {
|
chooseTopicListItem: PeerListItem(defaultPeerListItem) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
photoSize: 28px;
|
photoSize: 20px;
|
||||||
photoPosition: point(8px, 5px);
|
photoPosition: point(16px, 12px);
|
||||||
namePosition: point(55px, 11px);
|
namePosition: point(55px, 11px);
|
||||||
nameStyle: TextStyle(defaultTextStyle) {
|
nameStyle: TextStyle(defaultTextStyle) {
|
||||||
font: font(14px semibold);
|
font: font(14px semibold);
|
||||||
|
|
|
@ -7,12 +7,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#include "ui/effects/loading_element.h"
|
#include "ui/effects/loading_element.h"
|
||||||
|
|
||||||
#include "ui/effects/glare.h"
|
|
||||||
|
|
||||||
#include "base/object_ptr.h"
|
#include "base/object_ptr.h"
|
||||||
#include "base/random.h"
|
#include "base/random.h"
|
||||||
#include "styles/palette.h"
|
#include "styles/palette.h"
|
||||||
|
#include "ui/effects/glare.h"
|
||||||
#include "ui/painter.h"
|
#include "ui/painter.h"
|
||||||
|
#include "ui/rect.h"
|
||||||
#include "ui/rp_widget.h"
|
#include "ui/rp_widget.h"
|
||||||
#include "styles/style_basic.h"
|
#include "styles/style_basic.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
|
@ -99,14 +99,18 @@ public:
|
||||||
h1 / 2,
|
h1 / 2,
|
||||||
h1 / 2);
|
h1 / 2);
|
||||||
|
|
||||||
const auto h2 = st::defaultTextStyle.font->ascent;
|
{
|
||||||
p.drawRoundedRect(
|
const auto h2 = st::defaultTextStyle.font->ascent;
|
||||||
_st.statusPosition.x(),
|
const auto radius = h2 / 2;
|
||||||
_st.statusPosition.y() + offset,
|
const auto rect = QRect(
|
||||||
kStatusWidth,
|
_st.statusPosition.x(),
|
||||||
h2,
|
_st.statusPosition.y() + offset,
|
||||||
h2 / 2,
|
kStatusWidth,
|
||||||
h2 / 2);
|
h2);
|
||||||
|
if (rect::bottom(rect) < height()) {
|
||||||
|
p.drawRoundedRect(rect, radius, radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue