mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Reduced hard coded stylesheet values
* disabled hardcoded wizard pages style sheet * adjusted style sheet * fixed QMneu issue: https://stackoverflow.com/questions/53991839/qt-5-12-menu-items-with-unwanted-extra-space * tagged remaining ones as "\fixme hardcoded"
This commit is contained in:
committed by
Mat Sutcliffe
parent
cd095dbb3f
commit
2de192600f
@@ -61,12 +61,15 @@ namespace BlackGui
|
||||
// init if data already available
|
||||
this->onWebDataRead();
|
||||
|
||||
// \fixme setting per stylesheet does NOT work, this hardcoded stuff should be removed
|
||||
/**
|
||||
//! \todo remove this block when no longer needed after 2019-02
|
||||
//! \fixme hardcoded stylesheet setting per stylesheet does NOT work, this hardcoded stuff should be removed
|
||||
const QString style("background-image: url(:/textures/icons/textures/texture-inner.jpg)");
|
||||
ui->wp2_Aircraft->setStyleSheet(style);
|
||||
ui->wp3_LiveryColor->setStyleSheet(style);
|
||||
ui->wp4_Livery->setStyleSheet(style);
|
||||
ui->wp5_Distributor->setStyleSheet(style);
|
||||
**/
|
||||
}
|
||||
|
||||
CDbQuickMappingWizard::~CDbQuickMappingWizard()
|
||||
|
||||
@@ -258,12 +258,15 @@ namespace BlackGui
|
||||
BLACK_VERIFY_X(checkBox, Q_FUNC_INFO, "no checkbox");
|
||||
if (!checkBox) { return; }
|
||||
|
||||
static const QString background("background: rgba(40,40,40)"); //! \todo hardcoded, should come from stylesheet
|
||||
static const QString background("background: rgba(40,40,40)"); //! \fixme hardcoded stylesheet setting, should come from stylesheet
|
||||
if (readOnly)
|
||||
{
|
||||
checkBox->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
checkBox->setFocusPolicy(Qt::NoFocus);
|
||||
checkBox->setStyleSheet(background);
|
||||
|
||||
// without that, the checkboxes appear not readonly
|
||||
// obviously style sheet only does not work
|
||||
checkBox->setStyleSheet(background); //! fixme hardcoded stylesheet setting
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ QCheckBox {
|
||||
|
||||
/* CGuiUtility::checkBoxReadOnly */
|
||||
/* used for read-only checkboxes */
|
||||
/* QCheckBox[readOnly="true"] { background: rgba(40,40,40); } */
|
||||
|
||||
QCheckBox::indicator {
|
||||
color: #b1b1b1;
|
||||
@@ -194,6 +195,8 @@ BlackGui--Components--CRawFsdMessagesDialog,
|
||||
BlackGui--Components--CDbOwnModelsDialog,
|
||||
BlackGui--Components--CDbOwnModelSetDialog,
|
||||
BlackGui--Components--CFirstModelSetComponent,
|
||||
BlackGui--Components--CDbAircraftIcaoComponent,
|
||||
BlackGui--Components--CDbLiveryComponent,
|
||||
BlackGui--Components--CDbDistributorComponent,
|
||||
BlackGui--Components--CLegalInfoComponent
|
||||
{
|
||||
@@ -473,9 +476,9 @@ QMenu {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
QMenu::item {
|
||||
padding: 4px 25px 4px 20px;
|
||||
}
|
||||
/* until Qt 5.12 needed, now since Qt 5.12 causing issue
|
||||
QMenu::item { padding: 4px 25px 4px 20px; }
|
||||
**/
|
||||
|
||||
/* fix margin style */
|
||||
QMenu > QFrame {
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace BlackGui
|
||||
const QString f = fileInfo.fileName().toLower();
|
||||
|
||||
// keep even empty files as placeholders
|
||||
newStyleSheets.insert(f, c);
|
||||
newStyleSheets.insert(f, c); // set an empty string here to disable all stylesheet
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user