Quellcode durchsuchen

UI: Make toolbar color selectors respect alpha

gxalpha vor 4 Jahren
Ursprung
Commit
4bd69bf46e
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      UI/context-bar-controls.cpp

+ 2 - 2
UI/context-bar-controls.cpp

@@ -546,8 +546,6 @@ ColorSourceToolbar::~ColorSourceToolbar()
 
 void ColorSourceToolbar::UpdateColor()
 {
-	color.setAlpha(255);
-
 	QPalette palette = QPalette(color);
 	ui->color->setFrameStyle(QFrame::Sunken | QFrame::Panel);
 	ui->color->setText(color.name(QColor::HexRgb));
@@ -574,6 +572,7 @@ void ColorSourceToolbar::on_choose_clicked()
 
 	QColorDialog::ColorDialogOptions options;
 
+	options |= QColorDialog::ShowAlphaChannel;
 #ifndef _WIN32
 	options |= QColorDialog::DontUseNativeDialog;
 #endif
@@ -693,6 +692,7 @@ void TextSourceToolbar::on_selectColor_clicked()
 
 	QColorDialog::ColorDialogOptions options;
 
+	options |= QColorDialog::ShowAlphaChannel;
 #ifndef _WIN32
 	options |= QColorDialog::DontUseNativeDialog;
 #endif