author | leseb <leseb> | 2002-03-27 17:09:29 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-03-27 17:09:29 (UTC) |
commit | 4372bb8e59eb4b0d2fa5fba8f6525dc14873f239 (patch) (side-by-side diff) | |
tree | 6947938ca5d22d3a373741ba3acfc20e8dd67729 /noncore/graphics/drawpad/colorpanel.cpp | |
parent | fb056735d9a021787f83c6a791225a7ca70c1eb5 (diff) | |
download | opie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.zip opie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.tar.gz opie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.tar.bz2 |
Import/export dialogs, improved new page dialog, new tools, ...
Diffstat (limited to 'noncore/graphics/drawpad/colorpanel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/colorpanel.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/noncore/graphics/drawpad/colorpanel.cpp b/noncore/graphics/drawpad/colorpanel.cpp index 1db0d7b..9327012 100644 --- a/noncore/graphics/drawpad/colorpanel.cpp +++ b/noncore/graphics/drawpad/colorpanel.cpp @@ -22,40 +22,25 @@ ColorPanelButton::ColorPanelButton(const QColor& color, QWidget* parent, const c m_color = color; setFixedSize(16, 16); - setActive(false); + setFrameStyle(NoFrame); } ColorPanelButton::~ColorPanelButton() { } -void ColorPanelButton::setActive(bool active) -{ - m_active = active; - - if (m_active) { - setFrameStyle(Panel | Sunken); - } else { - setFrameStyle(NoFrame); - } -} - void ColorPanelButton::enterEvent(QEvent* e) { Q_UNUSED(e) - if (!m_active) { - setFrameStyle(Panel | Sunken); - } + setFrameStyle(Panel | Sunken); } void ColorPanelButton::leaveEvent(QEvent* e) { Q_UNUSED(e) - if (!m_active) { - setFrameStyle(NoFrame); - } + setFrameStyle(NoFrame); } void ColorPanelButton::paintEvent(QPaintEvent* e) @@ -125,6 +110,7 @@ void ColorPanel::addColor(const QColor& color, int row, int col) { ColorPanelButton* panelButton = new ColorPanelButton(color, this); connect(panelButton, SIGNAL(selected(const QColor&)), this, SLOT(buttonSelected(const QColor&))); + m_pGridLayout->addWidget(panelButton, row, col); } |