Loading...
Searching...
No Matches
MidiStyle.hpp
1#pragma once
2#include <QBrush>
3#include <QPen>
4
5namespace Midi
6{
8{
10 {
11 auto baseOrange = noteBaseBrush.color();
12 const double hue = baseOrange.hslHueF();
13 const double lightness = baseOrange.lightnessF();
14 for(std::size_t i = 0; i < std::size(paintedNoteBrush); i++)
15 {
16 auto orange = baseOrange;
17 orange.setHslF(hue, 0.2 + 1.5 * i / 256., lightness);
18 paintedNoteBrush[i].setColor(orange);
19 paintedNoteBrush[i].setStyle(Qt::SolidPattern);
20 }
21 }
22
23 const QBrush lightBrush{QColor{"#303d4c57"}};
24 const QBrush darkerBrush{QColor{"#B0B0B0"}};
25 const QBrush transparentBrush{Qt::transparent};
26 const QPen darkPen = [] {
27 QPen p{QColor{"#604C4C4C"}};
28 p.setCosmetic(true);
29 p.setWidthF(1);
30 return p;
31 }();
32
33 const QPen selectionPen = [] {
34 QPen pen{QColor{0, 0, 0, 127}, 2, Qt::DashLine, Qt::SquareCap, Qt::BevelJoin};
35 pen.setCosmetic(true);
36 return pen;
37 }();
38
39 const QBrush noteBaseBrush{QColor{"#ff9900"}};
40 const QPen noteSelectedBasePen{QColor{"#cc3000"}, 2};
41 const QPen noteBasePen{QColor{"#e0b01e"}};
42
43 QBrush paintedNoteBrush[128];
44};
45}
Definition MidiStyle.hpp:8