mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 18:01:56 +00:00
ThreadWidget: Don't set fixed width on QLineEdits
Fix clipping of QLineEdit contents by having them take up half the grid width instead of trying to match the contents width in an unreliable manner.
This commit is contained in:
parent
2fb66e9708
commit
ab25632992
1 changed files with 5 additions and 2 deletions
|
@ -137,8 +137,7 @@ QLineEdit* ThreadWidget::CreateLineEdit() const
|
||||||
{
|
{
|
||||||
QLineEdit* line_edit = new QLineEdit(QStringLiteral("00000000"));
|
QLineEdit* line_edit = new QLineEdit(QStringLiteral("00000000"));
|
||||||
line_edit->setReadOnly(true);
|
line_edit->setReadOnly(true);
|
||||||
line_edit->setFixedWidth(
|
line_edit->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
|
||||||
line_edit->fontMetrics().boundingRect(QStringLiteral(" 00000000 ")).width());
|
|
||||||
return line_edit;
|
return line_edit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,6 +145,8 @@ QGroupBox* ThreadWidget::CreateContextGroup()
|
||||||
{
|
{
|
||||||
QGroupBox* context_group = new QGroupBox(tr("Thread context"));
|
QGroupBox* context_group = new QGroupBox(tr("Thread context"));
|
||||||
QGridLayout* context_layout = new QGridLayout;
|
QGridLayout* context_layout = new QGridLayout;
|
||||||
|
context_layout->setColumnStretch(0, 1);
|
||||||
|
context_layout->setColumnStretch(1, 1);
|
||||||
context_group->setLayout(context_layout);
|
context_group->setLayout(context_layout);
|
||||||
context_layout->addWidget(new QLabel(tr("Current context")), 0, 0);
|
context_layout->addWidget(new QLabel(tr("Current context")), 0, 0);
|
||||||
m_current_context = CreateLineEdit();
|
m_current_context = CreateLineEdit();
|
||||||
|
@ -164,6 +165,8 @@ QGroupBox* ThreadWidget::CreateActiveThreadQueueGroup()
|
||||||
{
|
{
|
||||||
QGroupBox* thread_queue_group = new QGroupBox(tr("Active thread queue"));
|
QGroupBox* thread_queue_group = new QGroupBox(tr("Active thread queue"));
|
||||||
auto* thread_queue_layout = new QGridLayout;
|
auto* thread_queue_layout = new QGridLayout;
|
||||||
|
thread_queue_layout->setColumnStretch(0, 1);
|
||||||
|
thread_queue_layout->setColumnStretch(1, 1);
|
||||||
thread_queue_group->setLayout(thread_queue_layout);
|
thread_queue_group->setLayout(thread_queue_layout);
|
||||||
thread_queue_layout->addWidget(new QLabel(tr("Head")), 0, 0);
|
thread_queue_layout->addWidget(new QLabel(tr("Head")), 0, 0);
|
||||||
m_queue_head = CreateLineEdit();
|
m_queue_head = CreateLineEdit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue