mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
Avoid inheriting the style sheet in child widgets
Avoid inheriting the style sheet in child widgets by naming the widget type where it is set. This had the effect, reported in issue #838, of setting an unwanted style in child widgets, like the tool-tip of the "Load all data" button, the tool-tip of the SQL results pane or the context menu of the search-bar edit line.
This commit is contained in:
@@ -302,7 +302,7 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett
|
||||
// Warn user if not all data has been fetched and hint about the button for loading all the data
|
||||
if (ui->plotWidget->graphCount() > 0 && model->canFetchMore()) {
|
||||
ui->buttonLoadAllData->setEnabled(true);
|
||||
ui->buttonLoadAllData->setStyleSheet("color: white; background-color: rgb(255, 102, 102)");
|
||||
ui->buttonLoadAllData->setStyleSheet("QToolButton {color: white; background-color: rgb(255, 102, 102)}");
|
||||
ui->buttonLoadAllData->setToolTip(tr("Load all data and redraw plot.\n"
|
||||
"Warning: not all data has been fetched from the table yet due to the partial fetch mechanism."));
|
||||
QToolTip::showText(ui->buttonLoadAllData->mapToGlobal(QPoint(0, 0)), ui->buttonLoadAllData->toolTip());
|
||||
|
||||
@@ -65,7 +65,7 @@ void SqlExecutionArea::finishExecution(const QString& result, const bool ok)
|
||||
if (ok)
|
||||
ui->editErrors->setStyleSheet("");
|
||||
else
|
||||
ui->editErrors->setStyleSheet("color: white; background-color: rgb(255, 102, 102)");
|
||||
ui->editErrors->setStyleSheet("QTextEdit {color: white; background-color: rgb(255, 102, 102)}");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +146,7 @@ void SqlExecutionArea::find(QString expr, bool forward)
|
||||
if (found || expr == "")
|
||||
ui->findLineEdit->setStyleSheet("");
|
||||
else
|
||||
ui->findLineEdit->setStyleSheet("color: white; background-color: rgb(255, 102, 102)");
|
||||
ui->findLineEdit->setStyleSheet("QLineEdit {color: white; background-color: rgb(255, 102, 102)}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user