Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on Jan 12 2017, 8:44 AM.
diff --git a/plugins/dockers/animation/timeline_frames_model.cpp b/plugins/dockers/animation/timeline_frames_model.cpp
index cf2d525..7e8adff 100644
--- a/plugins/dockers/animation/timeline_frames_model.cpp
+++ b/plugins/dockers/animation/timeline_frames_model.cpp
@@ -377,6 +377,10 @@ bool TimelineFramesModel::setData(const QModelIndex &index, const QVariant &valu
return ModelWithExternalNotifications::setData(index, value, role);
}
+#include "kis_node_view_color_scheme.h"
+#include "krita_utils.h"
+#include <QApplication>
+
QVariant TimelineFramesModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if(!m_d->dummiesFacade) return QVariant();
@@ -438,6 +442,16 @@ QVariant TimelineFramesModel::headerData(int section, Qt::Orientation orientatio
int label = m_d->layerColorLabel(section);
return label > 0 ? label : QVariant();
}
+ case Qt::BackgroundRole: {
+ int label = m_d->layerColorLabel(section);
+ if (label > 0) {
+ KisNodeViewColorScheme scm;
+ QColor color = scm.colorLabel(label);
+ QPalette pal = qApp->palette();
+ color = KritaUtils::blendColors(color, pal.color(QPalette::Button), 0.3);
+ return QBrush(color);
+ }
+ }
}
}
diff --git a/plugins/dockers/animation/timeline_layers_header.cpp b/plugins/dockers/animation/timeline_layers_header.cpp
index 7c9b692..7861315 100644
--- a/plugins/dockers/animation/timeline_layers_header.cpp
+++ b/plugins/dockers/animation/timeline_layers_header.cpp
@@ -146,7 +146,7 @@ void TimelineLayersHeader::paintSection(QPainter *painter, const QRect &rect, in
QColor color = scm.colorLabel(colorIndex);
QPalette plt = QWidget::palette();
- if (color.alpha()>0){
+ if (0 && color.alpha()>0){
QPalette::ColorRole rolesToChange[] = {QPalette::Light,QPalette::Midlight ,QPalette::Button,
QPalette::Dark ,QPalette::Mid};
QColor oldColor, newcolor;
@@ -159,7 +159,8 @@ void TimelineLayersHeader::paintSection(QPainter *painter, const QRect &rect, in
}
painter->save();
- paintSectionWithCustomPalette(painter, rect, logicalIndex, plt);
+ QHeaderView::paintSection(painter, rect, logicalIndex);
+ //paintSectionWithCustomPalette(painter, rect, logicalIndex, plt);
painter->restore();
bool isLayerActive = model()->headerData(logicalIndex, orientation(), TimelineFramesModel::ActiveLayerRole).toBool();
dkazakov edited the content of this paste. (Show Details)Jan 12 2017, 8:44 AM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.
dkazakov updated the paste's language from autodetect to autodetect.