19 #include <QGraphicsScene> |
19 #include <QGraphicsScene> |
20 #include <QGraphicsItem> |
20 #include <QGraphicsItem> |
21 #include <QMouseEvent> |
21 #include <QMouseEvent> |
22 #include <QScrollBar> |
22 #include <QScrollBar> |
23 #include <QColorDialog> |
23 #include <QColorDialog> |
|
24 #include "../colors.h" |
|
25 #include "../guiutilities.h" |
24 #include "../main.h" |
26 #include "../main.h" |
25 #include "../mainwindow.h" |
27 #include "../mainwindow.h" |
26 #include "../colors.h" |
|
27 #include "../miscallenous.h" |
28 #include "../miscallenous.h" |
28 #include "colorselector.h" |
29 #include "colorselector.h" |
29 #include "ui_colorselector.h" |
30 #include "ui_colorselector.h" |
30 |
31 |
31 enum { NUM_COLUMNS = 16 }; |
32 enum { NUM_COLUMNS = 16 }; |
137 return; |
138 return; |
138 } |
139 } |
139 |
140 |
140 ui.colorLabel->setText (format ("%1 - %2", selection().indexString(), |
141 ui.colorLabel->setText (format ("%1 - %2", selection().indexString(), |
141 (selection().isDirect() ? "<direct color>" : selection().name()))); |
142 (selection().isDirect() ? "<direct color>" : selection().name()))); |
142 ui.iconLabel->setPixmap (MakeColorIcon (selection(), 16).pixmap (16, 16)); |
143 ui.iconLabel->setPixmap (guiUtilities()->makeColorIcon (selection(), 16).pixmap (16, 16)); |
143 |
144 |
144 #ifdef TRANSPARENT_DIRECT_COLORS |
145 #ifdef TRANSPARENT_DIRECT_COLORS |
145 ui.transparentDirectColor->setEnabled (selection().isDirect()); |
146 ui.transparentDirectColor->setEnabled (selection().isDirect()); |
146 ui.transparentDirectColor->setChecked (selection().isDirect() and selection().faceColor().alphaF() < 1.0); |
147 ui.transparentDirectColor->setChecked (selection().isDirect() and selection().faceColor().alphaF() < 1.0); |
147 #else |
148 #else |