Minor UI tweak.

This commit is contained in:
Just Wonder 2020-05-10 00:16:34 -07:00
parent e240dd4dac
commit 38ce352130
4 changed files with 6 additions and 5 deletions

View File

@ -33,7 +33,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Save|QDialogButtonBox::Ok|QDialogButtonBox::Cancel</set>
<set>QDialogButtonBox::Save|QDialogButtonBox::Ok|QDialogButtonBox::Close</set>
</property>
</widget>
</item>

View File

@ -21,7 +21,7 @@ KevaBookmarksDialog::KevaBookmarksDialog(QWidget *parent) :
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false);
ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("&Edit"));
connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(apply()));
connect(ui->buttonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(rename()));
}

View File

@ -60,6 +60,9 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
ui->kevaView->setTextElideMode(Qt::ElideRight);
ui->kevaView->setWordWrap(false);
QHeaderView *verticalHeader = ui->kevaView->verticalHeader();
verticalHeader->setSectionResizeMode(QHeaderView::Fixed);
verticalHeader->setDefaultSectionSize(36);
// context menu
contextMenu = new QMenu(this);

View File

@ -76,9 +76,7 @@ QVariant KevaTableModel::data(const QModelIndex &index, int role) const
if (index.column() == Block)
return (int)(Qt::AlignRight|Qt::AlignVCenter);
else if (index.column() == Value) {
#if (QT_VERSION <= QT_VERSION_CHECK(5, 12, 0))
return (int)(Qt::AlignLeft|Qt::AlignVCenter);
#else
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
return (int)(Qt::AlignLeft|Qt::AlignTop);
#endif
}