Mercurial > hg > easyhg
changeset 674:4283398d248f
Minor improvement to dialog spacing
author | Chris Cannam |
---|---|
date | Wed, 05 Dec 2018 13:21:09 +0000 |
parents | e4d18e8ef430 |
children | 8121a6f9abca |
files | src/hgrunner.cpp src/moreinformationdialog.cpp src/moreinformationdialog.h |
diffstat | 3 files changed, 17 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hgrunner.cpp Wed Dec 05 13:20:51 2018 +0000 +++ b/src/hgrunner.cpp Wed Dec 05 13:21:09 2018 +0000 @@ -484,7 +484,7 @@ QByteArray fileExt = randomKey(); if (fileExt == QByteArray()) { - DEBUG << "HgRunner::addExtensionOptions: Failed to get proper auth file ext" << endl; + DEBUG << "HgRunner::getAuthFilePath: Failed to get proper auth file ext" << endl; return ""; } QString fileExt16 = QString::fromLocal8Bit(fileExt.toBase64()).left(16) @@ -493,7 +493,7 @@ (QStandardPaths::CacheLocation); QDir().mkpath(path); if (path == "") { - DEBUG << "HgRunner::addExtensionOptions: Failed to get cache location" << endl; + DEBUG << "HgRunner::getAuthFilePath: Failed to get cache location" << endl; return ""; } @@ -509,7 +509,7 @@ if (m_authKey == "") { QByteArray key = randomKey(); if (key == QByteArray()) { - DEBUG << "HgRunner::addExtensionOptions: Failed to get proper auth key" << endl; + DEBUG << "HgRunner::getAuthKey: Failed to get proper auth key" << endl; return ""; } QString key16 = QString::fromLocal8Bit(key.toBase64()).left(16);
--- a/src/moreinformationdialog.cpp Wed Dec 05 13:20:51 2018 +0000 +++ b/src/moreinformationdialog.cpp Wed Dec 05 13:21:09 2018 +0000 @@ -35,24 +35,24 @@ { setWindowTitle(title); - QGridLayout *layout = new QGridLayout; - layout->setSpacing(10); - setLayout(layout); + m_layout = new QGridLayout; + m_layout->setSpacing(10); + setLayout(m_layout); m_iconLabel = new QLabel; - layout->addWidget(m_iconLabel, 0, 0, 2, 1, Qt::AlignTop); + m_layout->addWidget(m_iconLabel, 0, 0, 2, 1, Qt::AlignTop); QLabel *headLabel = new QLabel(QString("<qt><h3>%1</h3></qt>").arg(head)); - layout->addWidget(headLabel, 0, 1); + m_layout->addWidget(headLabel, 0, 1); QLabel *textLabel = new QLabel(text); textLabel->setTextFormat(Qt::RichText); textLabel->setWordWrap(true); - layout->addWidget(textLabel, 1, 1, Qt::AlignTop); + m_layout->addWidget(textLabel, 1, 1, Qt::AlignTop); QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok); connect(bb, SIGNAL(accepted()), this, SLOT(accept())); - layout->addWidget(bb, 2, 0, 1, 2); + m_layout->addWidget(bb, 2, 0, 1, 2); m_moreButton = bb->addButton(tr("More Details..."), QDialogButtonBox::ActionRole); @@ -74,13 +74,13 @@ font.setStyleHint(QFont::TypeWriter); m_moreText->setFont(font); - layout->addWidget(m_moreText, 3, 0, 1, 2); + m_layout->addWidget(m_moreText, 3, 0, 1, 2); m_moreText->hide(); if (more == "") m_moreButton->hide(); - layout->setRowStretch(1, 10); - layout->setColumnStretch(1, 20); + m_layout->setRowStretch(1, 10); + m_layout->setColumnStretch(1, 20); setMinimumWidth(400); } @@ -93,9 +93,11 @@ { if (m_moreText->isVisible()) { m_moreText->hide(); + m_layout->setRowStretch(3, 0); m_moreButton->setText(tr("Show Details...")); } else { m_moreText->show(); + m_layout->setRowStretch(3, 30); m_moreButton->setText(tr("Hide Details...")); } adjustSize();
--- a/src/moreinformationdialog.h Wed Dec 05 13:20:51 2018 +0000 +++ b/src/moreinformationdialog.h Wed Dec 05 13:21:09 2018 +0000 @@ -24,6 +24,7 @@ class QLabel; class QTextEdit; class QPushButton; +class QGridLayout; /** * Provide methods like the QMessageBox static methods, to call up @@ -55,6 +56,7 @@ void moreClicked(); private: + QGridLayout *m_layout; QLabel *m_iconLabel; QPushButton *m_moreButton; QTextEdit *m_moreText;