[PATCH 3/5] Profile2: add use of the isGrayscale flag when getting a color

Lubomir I. Ivanov neolit123 at gmail.com
Tue Mar 25 14:34:10 PDT 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

getColor() has a default argument for grayscale set to false.
With this patch we pass it the local isGrayscale flag, which
can only be set during printing.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 qt-ui/profile/profilewidget2.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index b0bbdbe..3862d06 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -178,7 +178,7 @@ void ProfileWidget2::setupItemOnScene()
 	meanDepth->setAxis(profileYAxis);
 
 	diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignTop);
-	diveComputerText->setBrush(getColor(TIME_TEXT));
+	diveComputerText->setBrush(getColor(TIME_TEXT, isGrayscale));
 
 	rulerItem->setAxis(timeAxis, profileYAxis);
 
@@ -198,7 +198,7 @@ void ProfileWidget2::setupItemOnScene()
 	setupItem(ITEM, timeAxis, gasYAxis, dataModel, DivePlotDataModel::VERTICAL_COLUMN, DivePlotDataModel::TIME, 0); \
 	ITEM->setThreshouldSettingsKey(THRESHOULD_SETTINGS);                                                            \
 	ITEM->setVisibilitySettingsKey(VISIBILITY_SETTINGS);                                                            \
-	ITEM->setColors(getColor(COLOR), getColor(COLOR_ALERT));                                                        \
+	ITEM->setColors(getColor(COLOR, isGrayscale), getColor(COLOR_ALERT, isGrayscale));                              \
 	ITEM->preferencesChanged();                                                                                     \
 	ITEM->setZValue(99);
 
@@ -605,7 +605,7 @@ void ProfileWidget2::setProfileState()
 	currentState = PROFILE;
 	MainWindow::instance()->setToolButtonsEnabled(true);
 	toolTipItem->readPos();
-	setBackgroundBrush(getColor(::BACKGROUND));
+	setBackgroundBrush(getColor(::BACKGROUND, isGrayscale));
 
 	background->setVisible(false);
 	toolTipItem->setVisible(true);
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list