summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kcolorbutton.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp
index 433f909..c7c6088 100644
--- a/microkde/kcolorbutton.cpp
+++ b/microkde/kcolorbutton.cpp
@@ -4,10 +4,20 @@
#include "qlayout.h"
-
+#ifdef DESKTOP_VERSION
+#include <qcolordialog.h>
+#endif
void KColorButton:: edit()
{
+#ifdef DESKTOP_VERSION
+ QColor col = QColorDialog::getColor ( mColor );
+ if ( col.isValid () ) {
+ mColor = col;
+ setColor ( mColor );
+ emit changed ( mColor );
+ }
+#else
KColorDialog* k = new KColorDialog( this );
k->setColor( mColor );
int res = k->exec();
@@ -17,6 +27,7 @@ void KColorButton:: edit()
emit changed ( mColor );
}
delete k;
+#endif
}
KColorButton::KColorButton( QWidget *p ):QPushButton( p )
{