summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 04ef82f49d..f3652c09da 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -92,7 +92,7 @@ public:
SetColorAll = ShowColor | SelectColor
};
- QColorDialogPrivate() : options(new QColorDialogOptions)
+ QColorDialogPrivate() : options(QColorDialogOptions::create())
#ifdef Q_OS_WIN32
, updateTimer(0)
#endif
@@ -1180,14 +1180,10 @@ QColorShower::QColorShower(QColorDialog *parent)
gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this);
-#ifndef Q_OS_WINCE
#ifdef QT_SMALL_COLORDIALOG
lab->setMinimumHeight(60);
#endif
lab->setMinimumWidth(60);
-#else
- lab->setMinimumWidth(20);
-#endif
// For QVGA screens only the comboboxes and color label are visible.
// For nHD screens only color and luminence pickers and color label are visible.
@@ -1702,7 +1698,7 @@ void QColorDialogPrivate::initWidgets()
leftLay = 0;
-#if defined(Q_OS_WINCE) || defined(QT_SMALL_COLORDIALOG)
+#if defined(QT_SMALL_COLORDIALOG)
smallDisplay = true;
const int lumSpace = 20;
#else
@@ -1725,7 +1721,7 @@ void QColorDialogPrivate::initWidgets()
leftLay->addWidget(lblBasicColors);
leftLay->addWidget(standard);
-#if !defined(Q_OS_WINCE) && !defined(QT_SMALL_COLORDIALOG)
+#if !defined(QT_SMALL_COLORDIALOG)
// The screen color picker button
screenColorPickerButton = new QPushButton();
leftLay->addWidget(screenColorPickerButton);
@@ -1734,9 +1730,7 @@ void QColorDialogPrivate::initWidgets()
q->connect(screenColorPickerButton, SIGNAL(clicked()), SLOT(_q_pickScreenColor()));
#endif
-#if !defined(Q_OS_WINCE)
leftLay->addStretch();
-#endif
custom = new QColorWell(q, customColorRows, colorColumns, QColorDialogOptions::customColors());
custom->setAcceptDrops(true);
@@ -1931,10 +1925,8 @@ static const Qt::WindowFlags DefaultWindowFlags =
Constructs a color dialog with the given \a parent.
*/
QColorDialog::QColorDialog(QWidget *parent)
- : QDialog(*new QColorDialogPrivate, parent, DefaultWindowFlags)
+ : QColorDialog(QColor(Qt::white), parent)
{
- Q_D(QColorDialog);
- d->init(Qt::white);
}
/*!