summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-16 13:18:04 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-09-16 13:18:04 (GMT)
commit418d0345380140bc5e2ad77987cad6aa081c1878 (patch)
treef1ba6e763dff91d5044b656364d062499a49e637 /tools/designer/src/lib
parentbc7eb95302d9fac44c8e922b173a576aaa9606d5 (diff)
downloadQt-418d0345380140bc5e2ad77987cad6aa081c1878.zip
Qt-418d0345380140bc5e2ad77987cad6aa081c1878.tar.gz
Qt-418d0345380140bc5e2ad77987cad6aa081c1878.tar.bz2
Fix alpha setting in Designer's "Edit Palette" window
Use QColorDialog::getColor() instead of deprecated QColorDialog::getRgba(), which causes alpha value to get lost in the process. Task-number: QT-4494 Reviewed-by: Jarek Kobus <jkobus@trolltech.com>
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r--tools/designer/src/lib/shared/stylesheeteditor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/designer/src/lib/shared/stylesheeteditor.cpp b/tools/designer/src/lib/shared/stylesheeteditor.cpp
index c7668b1..b9f9ba2 100644
--- a/tools/designer/src/lib/shared/stylesheeteditor.cpp
+++ b/tools/designer/src/lib/shared/stylesheeteditor.cpp
@@ -240,13 +240,10 @@ void StyleSheetEditorDialog::slotAddGradient(const QString &property)
void StyleSheetEditorDialog::slotAddColor(const QString &property)
{
- bool ok;
- QRgb rgba = QColorDialog::getRgba(0xffffffff, &ok, this);
- if (!ok)
+ const QColor color = QColorDialog::getColor(0xffffffff, this, QString(), QColorDialog::ShowAlphaChannel);
+ if (!color.isValid())
return;
- QColor color;
- color.setRgba(rgba);
QString colorStr;
if (color.alpha() == 255) {