Improve RegistersWidget grid UI

This commit is contained in:
itayc0hen 2019-12-06 18:51:49 +02:00 committed by Itay Cohen
parent 489b89dc7c
commit 035aa52cca

View File

@ -17,6 +17,7 @@ RegistersWidget::RegistersWidget(MainWindow *main, QAction *action) :
// setup register layout // setup register layout
registerLayout->setVerticalSpacing(0); registerLayout->setVerticalSpacing(0);
registerLayout->setAlignment(Qt::AlignLeft | Qt::AlignTop) ;
ui->verticalLayout->addLayout(registerLayout); ui->verticalLayout->addLayout(registerLayout);
refreshDeferrer = createRefreshDeferrer([this]() { refreshDeferrer = createRefreshDeferrer([this]() {
@ -68,7 +69,7 @@ void RegistersWidget::setRegisterGrid()
registerLabel->setMaximumWidth(60); registerLabel->setMaximumWidth(60);
registerLabel->setStyleSheet("font-weight: bold; font-family: mono;"); registerLabel->setStyleSheet("font-weight: bold; font-family: mono;");
registerEditValue = new QLineEdit; registerEditValue = new QLineEdit;
registerEditValue->setFixedWidth(140); registerEditValue->setMaximumWidth(140);
registerEditValue->setFont(Config()->getFont()); registerEditValue->setFont(Config()->getFont());
registerLabel->setContextMenuPolicy(Qt::CustomContextMenu); registerLabel->setContextMenuPolicy(Qt::CustomContextMenu);
connect(registerLabel, &QWidget::customContextMenuRequested, this, [this, registerEditValue, registerLabel](QPoint p){ connect(registerLabel, &QWidget::customContextMenuRequested, this, [this, registerEditValue, registerLabel](QPoint p){