src/colorSelector.cc

changeset 801
f6abc9eb4217
parent 796
f23f4e4ed279
child 806
4240f47aa2d4
--- a/src/colorSelector.cc	Sat Jun 14 09:58:58 2014 +0300
+++ b/src/colorSelector.cc	Sat Jun 14 19:41:09 2014 +0300
@@ -59,7 +59,12 @@
 	ui->viewport->setMaximumWidth (width);
 
 	connect (ui->directColor, SIGNAL (clicked (bool)), this, SLOT (chooseDirectColor()));
+
+#ifdef TRANSPARENT_DIRECT_COLORS
 	connect (ui->transparentDirectColor, SIGNAL (clicked (bool)), this, SLOT (transparentCheckboxClicked()));
+#else
+	ui->transparentDirectColor->hide();
+#endif
 
 	drawColorInfo();
 }
@@ -151,8 +156,14 @@
 	ui->colorLabel->setText (format ("%1 - %2", selection()->indexString(),
 		(selection()->isDirect() ? "<direct color>" : selection()->name())));
 	ui->iconLabel->setPixmap (makeColorIcon (selection(), 16).pixmap (16, 16));
+
+#ifdef TRANSPARENT_DIRECT_COLORS
 	ui->transparentDirectColor->setEnabled (selection()->isDirect());
 	ui->transparentDirectColor->setChecked (selection()->isDirect() && selection()->faceColor().alphaF() < 1.0);
+#else
+	ui->transparentDirectColor->setChecked (false);
+	ui->transparentDirectColor->setEnabled (false);
+#endif
 }
 
 // =============================================================================

mercurial