|
|
|
@ -543,13 +543,16 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog,
|
|
|
|
|
setMouseTracking(true);
|
|
|
|
|
cols = width;
|
|
|
|
|
|
|
|
|
|
if (withColorDialog) {
|
|
|
|
|
if (withColorDialog)
|
|
|
|
|
{
|
|
|
|
|
moreButton = new ColorPickerButton(this);
|
|
|
|
|
moreButton->setFixedWidth(24);
|
|
|
|
|
moreButton->setFixedHeight(21);
|
|
|
|
|
moreButton->setFrameRect(QRect(2, 2, 20, 17));
|
|
|
|
|
connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog()));
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
moreButton = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1061,12 +1064,17 @@ void ColorPickerButton::keyPressEvent(QKeyEvent *e)
|
|
|
|
|
if (e->key() == Qt::Key_Up
|
|
|
|
|
|| e->key() == Qt::Key_Down
|
|
|
|
|
|| e->key() == Qt::Key_Left
|
|
|
|
|
|| e->key() == Qt::Key_Right) {
|
|
|
|
|
|| e->key() == Qt::Key_Right)
|
|
|
|
|
{
|
|
|
|
|
qApp->sendEvent(parent(), e);
|
|
|
|
|
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
|
|
|
|
|
}
|
|
|
|
|
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
|
|
|
|
|
{
|
|
|
|
|
setFrameShadow(Sunken);
|
|
|
|
|
update();
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
QFrame::keyPressEvent(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1079,13 +1087,18 @@ void ColorPickerButton::keyReleaseEvent(QKeyEvent *e)
|
|
|
|
|
if (e->key() == Qt::Key_Up
|
|
|
|
|
|| e->key() == Qt::Key_Down
|
|
|
|
|
|| e->key() == Qt::Key_Left
|
|
|
|
|
|| e->key() == Qt::Key_Right) {
|
|
|
|
|
|| e->key() == Qt::Key_Right)
|
|
|
|
|
{
|
|
|
|
|
qApp->sendEvent(parent(), e);
|
|
|
|
|
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
|
|
|
|
|
}
|
|
|
|
|
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
|
|
|
|
|
{
|
|
|
|
|
setFrameShadow(Raised);
|
|
|
|
|
repaint();
|
|
|
|
|
emit clicked();
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
QFrame::keyReleaseEvent(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|