Browse Source

Minor UI tweak.

keva-gui
Just Wonder 5 years ago
parent
commit
38ce352130
  1. 2
      src/qt/forms/kevabookmarksdialog.ui
  2. 2
      src/qt/kevabookmarksdialog.cpp
  3. 3
      src/qt/kevadialog.cpp
  4. 4
      src/qt/kevatablemodel.cpp

2
src/qt/forms/kevabookmarksdialog.ui

@ -33,7 +33,7 @@ @@ -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>

2
src/qt/kevabookmarksdialog.cpp

@ -21,7 +21,7 @@ KevaBookmarksDialog::KevaBookmarksDialog(QWidget *parent) : @@ -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()));
}

3
src/qt/kevadialog.cpp

@ -60,6 +60,9 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) : @@ -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);

4
src/qt/kevatablemodel.cpp

@ -76,9 +76,7 @@ QVariant KevaTableModel::data(const QModelIndex &index, int role) const @@ -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
}

Loading…
Cancel
Save