diff options
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 5509a5c93..83fec7d92 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -773,7 +773,6 @@ void MainTab::acceptChanges() emit addDiveFinished(); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); MainWindow::instance()->diveList->setFocus(); - resetPallete(); displayed_dive.divetrip = nullptr; // Should not be necessary, just in case! return; } else { @@ -871,7 +870,6 @@ void MainTab::acceptChanges() DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); } int scrolledBy = MainWindow::instance()->diveList->verticalScrollBar()->sliderPosition(); - resetPallete(); if (lastMode == MANUALLY_ADDED_DIVE) { MainWindow::instance()->diveList->reload(); int newDiveNr = get_divenr(get_dive_by_uniq_id(addedId)); @@ -897,25 +895,6 @@ void MainTab::acceptChanges() editMode = NONE; } -void MainTab::resetPallete() -{ - QPalette p; - ui.buddy->setPalette(p); - ui.notes->setPalette(p); - ui.location->setPalette(p); - ui.divemaster->setPalette(p); - ui.suit->setPalette(p); - ui.airtemp->setPalette(p); - ui.DiveType->setPalette(p); - ui.watertemp->setPalette(p); - ui.dateEdit->setPalette(p); - ui.timeEdit->setPalette(p); - ui.tagWidget->setPalette(p); - ui.diveTripLocation->setPalette(p); - ui.duration->setPalette(p); - ui.depth->setPalette(p); -} - void MainTab::rejectChanges() { EditMode lastMode = editMode; @@ -935,7 +914,6 @@ void MainTab::rejectChanges() tabBar()->setTabIcon(0, QIcon()); // Notes tabBar()->setTabIcon(1, QIcon()); // Equipment hideMessage(); - resetPallete(); // no harm done to call cancelPlan even if we were not in ADD or PLAN mode... DivePlannerPointsModel::instance()->cancelPlan(); if(lastMode == ADD) @@ -965,17 +943,6 @@ void MainTab::rejectChanges() ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty()); } -void MainTab::markChangedWidget(QWidget *w) -{ - QPalette p; - qreal h, s, l, a; - enableEdition(); - qApp->palette().color(QPalette::Text).getHslF(&h, &s, &l, &a); - p.setBrush(QPalette::Base, (l <= 0.3) ? QColor(Qt::yellow).lighter() : (l <= 0.6) ? QColor(Qt::yellow).light() : /* else */ QColor(Qt::yellow).darker(300)); - w->setPalette(p); - modified = true; -} - static QStringList stringToList(const QString &s) { QStringList res = s.split(",", QString::SkipEmptyParts); |