summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
authorzautrix <zautrix>2005-06-07 08:53:18 (UTC)
committer zautrix <zautrix>2005-06-07 08:53:18 (UTC)
commitaa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4 (patch) (side-by-side diff)
tree69bcfb2ea1e74fa38bf8c648ecba4501dfbe5690 /kaddressbook/views
parentff8af7ccdd6346bba1cb871c33931352bbafe40e (diff)
downloadkdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.zip
kdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.tar.gz
kdepimpi-aa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4.tar.bz2
color dialog fix
Diffstat (limited to 'kaddressbook/views') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/colorlistbox.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 7386207..2bddca6 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -27,6 +27,9 @@
#endif //KAB_EMBEDDED
#include "colorlistbox.h"
+#ifdef DESKTOP_VERSION
+#include <qcolordialog.h>
+#endif
ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
@@ -97,6 +100,12 @@ void ColorListBox::newColor( int index )
setColor( index, c );
}
#else //KAB_EMBEDDED
+#ifdef DESKTOP_VERSION
+ QColor col = QColorDialog::getColor ( c );
+ if ( col.isValid () ) {
+ setColor( index, col );
+ }
+#else
KColorDialog* k = new KColorDialog( this );
k->setColor( c );
int res = k->exec();
@@ -104,6 +113,7 @@ void ColorListBox::newColor( int index )
setColor( index, k->getColor() );
}
delete k;
+#endif
#endif //KAB_EMBEDDED
}