Qt/RegisterView: fix minor aesthetic issues

This aligns the values to the right since It looks odd to be aligned to the left with any format other than hexadecimal.  It also sets the font tot he debugger font and disallow selection as a previous commit made the selection pointless since it now relies on the current item.
This commit is contained in:
aldelaro5 2018-05-04 23:48:18 -04:00
parent 8c23335be3
commit 9bacb3cb26
No known key found for this signature in database
GPG Key ID: 054DD3E6FF48DB71
1 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,8 @@ void RegisterWidget::CreateWidgets()
m_table->verticalHeader()->setVisible(false);
m_table->verticalHeader()->setDefaultSectionSize(24);
m_table->setContextMenuPolicy(Qt::CustomContextMenu);
m_table->setSelectionMode(QAbstractItemView::SingleSelection);
m_table->setSelectionMode(QAbstractItemView::NoSelection);
m_table->setFont(Settings::Instance().GetDebugFont());
QStringList empty_list;
@ -353,10 +354,12 @@ void RegisterWidget::AddRegister(int row, int column, RegisterType type, std::st
m_table->setItem(row, column, label);
m_table->setItem(row, column + 1, value);
m_table->item(row, column + 1)->setTextAlignment(Qt::AlignRight);
}
else
{
m_table->setItem(row, column, value);
m_table->item(row, column)->setTextAlignment(Qt::AlignRight);
}
connect(this, &RegisterWidget::UpdateTable, [value] { value->RefreshValue(); });