mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 15:17:07 +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
Telegram/SourceFiles
|
@ -633,10 +633,13 @@ auto ChooseTopicBoxController::Row::generatePaintUserpicCallback(
|
|||
int y,
|
||||
int outerWidth,
|
||||
int size) {
|
||||
const auto &st = st::forumTopicRow;
|
||||
x -= st.padding.left();
|
||||
y -= st.padding.top();
|
||||
auto view = Ui::PeerUserpicView();
|
||||
p.translate(x, y);
|
||||
_topic->paintUserpic(p, view, {
|
||||
.st = &st::forumTopicRow,
|
||||
.st = &st,
|
||||
.currentBg = st::windowBg,
|
||||
.now = crl::now(),
|
||||
.width = outerWidth,
|
||||
|
|
|
@ -475,8 +475,8 @@ editTopicMaxHeight: 408px;
|
|||
|
||||
chooseTopicListItem: PeerListItem(defaultPeerListItem) {
|
||||
height: 44px;
|
||||
photoSize: 28px;
|
||||
photoPosition: point(8px, 5px);
|
||||
photoSize: 20px;
|
||||
photoPosition: point(16px, 12px);
|
||||
namePosition: point(55px, 11px);
|
||||
nameStyle: TextStyle(defaultTextStyle) {
|
||||
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/glare.h"
|
||||
|
||||
#include "base/object_ptr.h"
|
||||
#include "base/random.h"
|
||||
#include "styles/palette.h"
|
||||
#include "ui/effects/glare.h"
|
||||
#include "ui/painter.h"
|
||||
#include "ui/rect.h"
|
||||
#include "ui/rp_widget.h"
|
||||
#include "styles/style_basic.h"
|
||||
#include "styles/style_widgets.h"
|
||||
|
@ -99,14 +99,18 @@ public:
|
|||
h1 / 2,
|
||||
h1 / 2);
|
||||
|
||||
const auto h2 = st::defaultTextStyle.font->ascent;
|
||||
p.drawRoundedRect(
|
||||
_st.statusPosition.x(),
|
||||
_st.statusPosition.y() + offset,
|
||||
kStatusWidth,
|
||||
h2,
|
||||
h2 / 2,
|
||||
h2 / 2);
|
||||
{
|
||||
const auto h2 = st::defaultTextStyle.font->ascent;
|
||||
const auto radius = h2 / 2;
|
||||
const auto rect = QRect(
|
||||
_st.statusPosition.x(),
|
||||
_st.statusPosition.y() + offset,
|
||||
kStatusWidth,
|
||||
h2);
|
||||
if (rect::bottom(rect) < height()) {
|
||||
p.drawRoundedRect(rect, radius, radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue