Skip to content

Commit

Permalink
Remove fixed sizes from Config dialog .ui file
Browse files Browse the repository at this point in the history
Most of the sizes are replaced with normal QLayout-based positioning,
and a few more essential ones are moved into normalStyle.css for greater
flexibility in customization.
  • Loading branch information
10110111 committed Nov 2, 2023
1 parent 2ddb132 commit 5cced37
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 295 deletions.
15 changes: 15 additions & 0 deletions data/gui/normalStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,21 @@ QTextBrowser#deltaTAlgorithmDescription {
background: transparent;
padding: 0;
margin: 0;
max-height: 175px;
}

QListWidget#scriptListWidget {
min-width: 190px;
max-width: 190px;
}

QListWidget#pluginsListWidget {
min-width: 180px;
max-width: 180px;
}

QCommandLinkButton#getStarsButton {
qproperty-iconSize: 24px;
}

/**************************************************************************************************************
Expand Down
3 changes: 0 additions & 3 deletions src/gui/ConfigurationDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ void ConfigurationDialog::createDialogContent()
connect(ui->dtRadioButton, SIGNAL(clicked(bool)), this, SLOT(setButtonBarDTFormat()));

// Delta-T
ui->pushButtonCustomDeltaTEquationDialog->setFixedSize(QSize(26, 26));
populateDeltaTAlgorithmsList();
idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDeltaTAlgorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1)
Expand Down Expand Up @@ -1857,8 +1856,6 @@ void ConfigurationDialog::populateDeltaTAlgorithmsList()
// TRANSLATORS: Full phrase is "Algorithm of DeltaT"
ui->deltaTLabel->setText(QString("%1 %2T:").arg(q_("Algorithm of")).arg(QChar(0x0394)));

ui->pushButtonCustomDeltaTEquationDialog->setFixedHeight(ui->deltaTAlgorithmComboBox->height());

QComboBox* algorithms = ui->deltaTAlgorithmComboBox;

//Save the current selection to be restored later
Expand Down
Loading

0 comments on commit 5cced37

Please sign in to comment.