Timeline: Add some theming

While we're at it, also remove all the weird borders and use standard
icons. The timeline doesn't have a "baroque" theme, it's all flat for
now. If the need arises we can add some gradients here and there.

Change-Id: Ia9ce22d7f412c4999feca2284959be4d734267ac
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Ulf Hermann
2016-07-28 12:30:32 +02:00
parent 15fbfaf2e9
commit 94ca84c1e4
34 changed files with 185 additions and 193 deletions

View File

@@ -27,6 +27,8 @@
#include "timelinerenderstate.h"
#include "timelinenotesmodel.h"
#include <utils/theme/theme.h>
namespace Timeline {
struct Point2DWithDistanceFromTop {
@@ -226,6 +228,7 @@ private:
int m_matrix_id;
int m_z_range_id;
int m_color_id;
};
NotesMaterialShader::NotesMaterialShader()
@@ -240,6 +243,9 @@ void NotesMaterialShader::updateState(const RenderState &state, QSGMaterial *, Q
if (state.isMatrixDirty()) {
program()->setUniformValue(m_matrix_id, state.combinedMatrix());
program()->setUniformValue(m_z_range_id, GLfloat(1.0));
program()->setUniformValue(
m_color_id,
Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor));
}
}
@@ -253,6 +259,7 @@ void NotesMaterialShader::initialize()
{
m_matrix_id = program()->uniformLocation("matrix");
m_z_range_id = program()->uniformLocation("_qt_zRange");
m_color_id = program()->uniformLocation("notesColor");
}
QSGMaterialType *NotesMaterial::type() const