Diffstat (limited to 'noncore/graphics/drawpad/colorpanel.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/colorpanel.cpp | 18 |
1 files changed, 2 insertions, 16 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 @@ -24,3 +24,3 @@ ColorPanelButton::ColorPanelButton(const QColor& color, QWidget* parent, const c setFixedSize(16, 16); - setActive(false); + setFrameStyle(NoFrame); } @@ -31,13 +31,2 @@ ColorPanelButton::~ColorPanelButton() -void ColorPanelButton::setActive(bool active) -{ - m_active = active; - - if (m_active) { - setFrameStyle(Panel | Sunken); - } else { - setFrameStyle(NoFrame); - } -} - void ColorPanelButton::enterEvent(QEvent* e) @@ -46,6 +35,4 @@ void ColorPanelButton::enterEvent(QEvent* e) - if (!m_active) { setFrameStyle(Panel | Sunken); } -} @@ -55,6 +42,4 @@ void ColorPanelButton::leaveEvent(QEvent* e) - if (!m_active) { setFrameStyle(NoFrame); } -} @@ -127,2 +112,3 @@ void ColorPanel::addColor(const QColor& color, int row, int col) connect(panelButton, SIGNAL(selected(const QColor&)), this, SLOT(buttonSelected(const QColor&))); + m_pGridLayout->addWidget(panelButton, row, col); |