Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Button text modification #312

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void BuildPropertyWidget::setupOverviewUI()
d->outputDirEdit = new DLineEdit(this);
d->outputDirEdit->lineEdit()->setReadOnly(true);
auto button = new QPushButton(this);
button->setText(tr("Browse..."));
button->setText(tr("Browse"));
connect(button, &QPushButton::clicked, [this](){
QString outputDirectory = QFileDialog::getExistingDirectory(this, "Output directory", d->outputDirEdit->text());
if (!outputDirectory.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void ConfigureProjPane::setupUI()

d->radioDebug = new DRadioButton("Debug");
d->radioDebug->setFixedWidth(100);
auto btnDebug = new DPushButton(tr("Browse..."));
auto btnDebug = new DPushButton(tr("Browse"));
d->lineEditDebug = new DLineEdit(this);
d->lineEditDebug->setMinimumWidth(280);
btnSignalConnect(btnDebug, d->lineEditDebug);
Expand All @@ -117,7 +117,7 @@ void ConfigureProjPane::setupUI()

d->radioRelease = new DRadioButton("Release");
d->radioRelease->setFixedWidth(100);
auto btnRelease = new DPushButton(tr("Browse..."));
auto btnRelease = new DPushButton(tr("Browse"));
d->lineEditRelease = new DLineEdit(this);
d->lineEditDebug->setMinimumWidth(280);
btnSignalConnect(btnRelease, d->lineEditRelease);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void RunConfigPane::setupUi()
// working directory ui.
QHBoxLayout *browLayout = new QHBoxLayout(mainFrame);
auto browseBtn = new QPushButton(mainFrame);
browseBtn->setText(tr("Browse..."));
browseBtn->setText(tr("Browse"));
d->workingDirLineEdit = new DLineEdit(mainFrame);
d->workingDirLineEdit->lineEdit()->setReadOnly(true);
connect(d->workingDirLineEdit, &DLineEdit::textChanged, [this](){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ QVariant StepsModel::headerData(int section, Qt::Orientation orientation, int ro
if (orientation == Qt::Horizontal) {
switch (section) {
case kTarget:
return "Target";
return QObject::tr("Target");
case kPath:
return "Path";
return QObject::tr("Path");
default:
break;
}
Expand Down Expand Up @@ -226,6 +226,8 @@ void StepsPane::setupUi()
tableView->setFrameShape(QFrame::NoFrame);
DHeaderView* headerView = tableView->horizontalHeader();
headerView->setStretchLastSection(true);
headerView->setSectionResizeMode(DHeaderView::ResizeToContents); //表头宽度根据其内容的宽度动态调整
headerView->setDefaultAlignment(Qt::AlignLeft); //让标头向左对齐
headerView->setSelectionMode(QAbstractItemView::SingleSelection);
tableView->verticalHeader()->hide();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void GradleDetailPropertyWidget::setupUI()
label->setFixedWidth(kHeadlineWidth);

DPushButton *btnBrowser = new DPushButton(this);
btnBrowser->setText(tr("Browse..."));
btnBrowser->setText(tr("Browse"));
btnBrowser->setObjectName(headLine);
hLayout->addWidget(label);
hLayout->addWidget(widget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void MavenDetailPropertyWidget::setupUI()
label->setFixedWidth(kHeadlineWidth);

DPushButton *btnBrowser = new DPushButton(this);
btnBrowser->setText(tr("Browse..."));
btnBrowser->setText(tr("Browse"));
btnBrowser->setObjectName(headLine);
hLayout->addWidget(label);
hLayout->addWidget(widget);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/reversedebug/loadcoredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void LoadCoreDialog::setupUi()
d->traceDir->setPlaceholderText(tr("Trace directory."));

DPushButton *btnBrowser = new DPushButton(this);
btnBrowser->setText(tr("Browse..."));
btnBrowser->setText(tr("Browse"));

// pid
d->pidInput = new DComboBox(mainFrame);
Expand Down