Changeset View
Changeset View
Standalone View
Standalone View
src/qt/utilitydialog.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | if (about) { | ||||
ui->aboutMessage->setTextFormat(Qt::RichText); | ui->aboutMessage->setTextFormat(Qt::RichText); | ||||
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); | ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); | ||||
text = version + "\n" + licenseInfo; | text = version + "\n" + licenseInfo; | ||||
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML); | ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML); | ||||
ui->aboutMessage->setWordWrap(true); | ui->aboutMessage->setWordWrap(true); | ||||
ui->helpMessage->setVisible(false); | ui->helpMessage->setVisible(false); | ||||
} else { | } else { | ||||
setWindowTitle(tr("Command-line options")); | setWindowTitle(tr("Command-line options")); | ||||
QString header = tr("Usage:") + "\n" + " bitcoin-qt [" + | QString header = | ||||
tr("command-line options") + "] " + | "Usage: bitcoin-qt [command-line options] \n"; | ||||
"\n"; | |||||
QTextCursor cursor(ui->helpMessage->document()); | QTextCursor cursor(ui->helpMessage->document()); | ||||
cursor.insertText(version); | cursor.insertText(version); | ||||
cursor.insertBlock(); | cursor.insertBlock(); | ||||
cursor.insertText(header); | cursor.insertText(header); | ||||
cursor.insertBlock(); | cursor.insertBlock(); | ||||
std::string strUsage = node.helpMessage(HelpMessageMode::BITCOIN_QT); | std::string strUsage = node.helpMessage(HelpMessageMode::BITCOIN_QT); | ||||
const bool showDebug = gArgs.GetBoolArg("-help-debug", false); | const bool showDebug = gArgs.GetBoolArg("-help-debug", false); | ||||
Show All 29 Lines | if (about) { | ||||
if (showDebug) { | if (showDebug) { | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-uiplatform", | "-uiplatform", | ||||
strprintf("Select platform to customize UI for (one of " | strprintf("Select platform to customize UI for (one of " | ||||
"windows, macosx, other; default: %s)", | "windows, macosx, other; default: %s)", | ||||
BitcoinGUI::DEFAULT_UIPLATFORM)); | BitcoinGUI::DEFAULT_UIPLATFORM)); | ||||
} | } | ||||
QString coreOptions = QString::fromStdString(strUsage); | QString coreOptions = QString::fromStdString(strUsage); | ||||
text = version + "\n" + header + "\n" + coreOptions; | text = version + "\n\n" + header + "\n" + coreOptions; | ||||
QTextTableFormat tf; | QTextTableFormat tf; | ||||
tf.setBorderStyle(QTextFrameFormat::BorderStyle_None); | tf.setBorderStyle(QTextFrameFormat::BorderStyle_None); | ||||
tf.setCellPadding(2); | tf.setCellPadding(2); | ||||
QVector<QTextLength> widths; | QVector<QTextLength> widths; | ||||
widths << QTextLength(QTextLength::PercentageLength, 35); | widths << QTextLength(QTextLength::PercentageLength, 35); | ||||
widths << QTextLength(QTextLength::PercentageLength, 65); | widths << QTextLength(QTextLength::PercentageLength, 65); | ||||
tf.setColumnWidthConstraints(widths); | tf.setColumnWidthConstraints(widths); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |