Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a5c465eb authored by Scott Petrovic's avatar Scott Petrovic

Update backgrounds for a few dockers to be more consistent with other dockers

parent 767dcf15
......@@ -25,6 +25,7 @@
#include <QMouseEvent>
#include <QTimer>
#include <QPushButton>
#include <QApplication>
#include <kconfig.h>
#include <kconfiggroup.h>
......@@ -167,7 +168,13 @@ void KisColorSelector::paintEvent(QPaintEvent* e)
{
Q_UNUSED(e);
QPainter p(this);
p.fillRect(0,0,width(),height(),QColor(128,128,128));
// for selecting colors we want to keep a somewhat neutral gray to make selecting
// a color easier in case someone uses a wacky theme color
QColor bgColor = qApp->palette().color(QPalette::Base);
int darkenCoeff = bgColor.value() > 128 ? 180 : 50; // same logic icons use
p.fillRect(0,0,width(),height(),QColor(darkenCoeff,darkenCoeff,darkenCoeff));
p.setRenderHint(QPainter::Antialiasing);
m_mainComponent->paintEvent(&p);
......
......@@ -18,6 +18,7 @@
#include "kis_color_selector_combo_box.h"
#include <QGridLayout>
#include <QPainter>
#include <QApplication>
#include "kis_color_selector.h"
#include "kis_canvas2.h"
......@@ -127,7 +128,11 @@ protected:
void paintEvent(QPaintEvent *) override
{
QPainter painter(this);
painter.fillRect(0,0,width(), height(), QColor(128,128,128));
QColor bgColor = qApp->palette().color(QPalette::Base);
int darkenCoeff = bgColor.value() > 128 ? 180 : 50; // same logic icons use
painter.fillRect(0,0,width(), height(), QColor(darkenCoeff,darkenCoeff,darkenCoeff));
painter.fillRect(highlightArea, palette().highlight());
}
......
......@@ -39,6 +39,9 @@ HistogramDockerDock::HistogramDockerDock()
m_histogramWidget = new HistogramDockerWidget(this);
m_histogramWidget->setBackgroundRole(QPalette::AlternateBase);
m_histogramWidget->setAutoFillBackground(true); // paints background role before paint()
m_histogramWidget->setMinimumHeight(50);
//m_histogramWidget->setSmoothHistogram(false);
m_layout->addWidget(m_histogramWidget, 1);
......
......@@ -41,6 +41,8 @@ OverviewDockerDock::OverviewDockerDock( )
m_overviewWidget = new OverviewWidget(this);
m_overviewWidget->setMinimumHeight(50);
m_overviewWidget->setBackgroundRole(QPalette::AlternateBase);
m_overviewWidget->setAutoFillBackground(true); // paints background role before paint()
m_layout->addWidget(m_overviewWidget, 1);
......
......@@ -36,6 +36,7 @@ DlgHistogram::DlgHistogram(QWidget * parent, const char * name)
setDefaultButton(Ok);
setObjectName(name);
m_page = new KisHistogramWidget(this, "histogram");
Q_CHECK_PTR(m_page);
setCaption(i18n("Histogram"));
......
......@@ -49,6 +49,7 @@ Histogram::~Histogram()
void Histogram::slotActivated()
{
DlgHistogram * dlgHistogram = new DlgHistogram(m_view->mainWindow(), "Histogram");
Q_CHECK_PTR(dlgHistogram);
KisLayerSP layer = m_view->nodeManager()->activeLayer();
......@@ -61,8 +62,6 @@ void Histogram::slotActivated()
if (dlgHistogram->exec() == QDialog::Accepted) {
// Do nothing; this is an informational dialog
}
}
delete dlgHistogram;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment