Gui: Ability to target new file buttons fia QSS.
This adds ability to target New File buttons via `#CreateNewRow > QPushButton` selector.
This commit is contained in:
committed by
Chris Hennes
parent
538579d5dd
commit
d282d449b9
@@ -1197,6 +1197,11 @@ QPushButton {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
#CreateNewRow > QPushButton {
|
||||
/* Reset min width to default */
|
||||
min-width: -1;
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #444444;
|
||||
color: #adadad;
|
||||
|
||||
@@ -1123,6 +1123,11 @@ QPushButton {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
#CreateNewRow > QPushButton {
|
||||
/* Reset min width to default */
|
||||
min-width: -1;
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #d8d8d8;
|
||||
color: #adadad;
|
||||
|
||||
@@ -147,8 +147,18 @@ StartView::StartView(QWidget* parent)
|
||||
|
||||
_newFileLabel = gsl::owner<QLabel*>(new QLabel());
|
||||
layout->addWidget(_newFileLabel);
|
||||
|
||||
auto createNewRow = gsl::owner<QWidget*>(new QWidget);
|
||||
auto flowLayout = gsl::owner<FlowLayout*>(new FlowLayout);
|
||||
layout->addLayout(flowLayout);
|
||||
|
||||
// reset margins of layout to provide consistent spacing
|
||||
flowLayout->setContentsMargins({});
|
||||
|
||||
// this allows new file widgets to be targeted via QSS
|
||||
createNewRow->setObjectName(QStringLiteral("CreateNewRow"));
|
||||
createNewRow->setLayout(flowLayout);
|
||||
|
||||
layout->addWidget(createNewRow);
|
||||
configureNewFileButtons(flowLayout);
|
||||
|
||||
_recentFilesLabel = gsl::owner<QLabel*>(new QLabel());
|
||||
|
||||
Reference in New Issue
Block a user