Added Config::setDisabledPaintEvents()
Makes our internal widgets not override QWidget::paintEvent(), which gives full power to the user to stylesheets. Was already possible, but required the user to override the internal widgets via the widget factory For issue #146
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "Separator_qwidget.h"
|
||||
#include "Widget_qwidget.h"
|
||||
#include "Logging_p.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
@@ -28,8 +29,13 @@ SeparatorWidget::SeparatorWidget(Layouting::Widget *parent)
|
||||
setMouseTracking(true);
|
||||
}
|
||||
|
||||
void SeparatorWidget::paintEvent(QPaintEvent *)
|
||||
void SeparatorWidget::paintEvent(QPaintEvent *ev)
|
||||
{
|
||||
if (KDDockWidgets::Config::self().disabledPaintEvents() & KDDockWidgets::Config::CustomizableWidget_Separator) {
|
||||
QWidget::paintEvent(ev);
|
||||
return;
|
||||
}
|
||||
|
||||
QPainter p(this);
|
||||
|
||||
QStyleOption opt;
|
||||
|
||||
Reference in New Issue
Block a user