Fix cut off text in Achievements dialog

This commit is contained in:
LillyJadeKatrin 2024-06-22 00:26:52 -04:00
parent 8b9ac5d767
commit e1a8dc65ce
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QProgressBar>
#include <QSizePolicy>
#include <QVBoxLayout>
#include <QWidget>
@ -30,9 +31,11 @@ AchievementBox::AchievementBox(QWidget* parent, rc_client_achievement_t* achieve
m_badge = new QLabel();
QLabel* title = new QLabel(QString::fromUtf8(achievement->title, strlen(achievement->title)));
title->setWordWrap(true);
title->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
QLabel* description =
new QLabel(QString::fromUtf8(achievement->description, strlen(achievement->description)));
description->setWordWrap(true);
description->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
QLabel* points = new QLabel(tr("%1 points").arg(achievement->points));
m_status = new QLabel();
m_progress_bar = new QProgressBar();

View File

@ -57,8 +57,10 @@ void AchievementLeaderboardWidget::UpdateData(bool clean_all)
m_leaderboard_order[leaderboard->id] = row;
QLabel* a_title = new QLabel(QString::fromUtf8(leaderboard->title));
a_title->setWordWrap(true);
a_title->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
QLabel* a_description = new QLabel(QString::fromUtf8(leaderboard->description));
a_description->setWordWrap(true);
a_description->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
QVBoxLayout* a_col_left = new QVBoxLayout();
a_col_left->addWidget(a_title);
a_col_left->addWidget(a_description);