author | zautrix <zautrix> | 2005-06-07 08:53:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-07 08:53:18 (UTC) |
commit | aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4 (patch) (side-by-side diff) | |
tree | 69bcfb2ea1e74fa38bf8c648ecba4501dfbe5690 /microkde | |
parent | ff8af7ccdd6346bba1cb871c33931352bbafe40e (diff) | |
download | kdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.zip kdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.tar.gz kdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.tar.bz2 |
color dialog fix
-rw-r--r-- | microkde/kcolorbutton.cpp | 13 |
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 @@ -3,12 +3,22 @@ #include "qapplication.h" #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(); if ( res ) { @@ -16,8 +26,9 @@ void KColorButton:: edit() setColor ( mColor ); emit changed ( mColor ); } delete k; +#endif } KColorButton::KColorButton( QWidget *p ):QPushButton( p ) { int size = 24; |