use selected (outline) color for MIDI note velocity bar (thanks, cooltehno, for the idea)
This commit is contained in:
parent
3a8c443499
commit
02b05f295a
@ -175,7 +175,7 @@ NoteBase::set_selected(bool selected)
|
|||||||
const uint32_t base_col = base_color();
|
const uint32_t base_col = base_color();
|
||||||
set_fill_color (base_col);
|
set_fill_color (base_col);
|
||||||
|
|
||||||
set_outline_color(calculate_outline(base_col, (_flags == Selected)));
|
set_outline_color(calculate_outline (base_col, (_flags == Selected)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SCALE_USHORT_TO_UINT8_T(x) ((x) / 257)
|
#define SCALE_USHORT_TO_UINT8_T(x) ((x) / 257)
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
||||||
void set_velocity (double fract);
|
void set_velocity (double fract);
|
||||||
void set_fill_color (Gtkmm2ext::Color);
|
void set_fill_color (Gtkmm2ext::Color);
|
||||||
|
void set_outline_color (Gtkmm2ext::Color);
|
||||||
|
|
||||||
static void set_show_velocity_bars (bool);
|
static void set_show_velocity_bars (bool);
|
||||||
|
|
||||||
|
@ -97,5 +97,11 @@ void
|
|||||||
Note::set_fill_color (Gtkmm2ext::Color c)
|
Note::set_fill_color (Gtkmm2ext::Color c)
|
||||||
{
|
{
|
||||||
Fill::set_fill_color (c);
|
Fill::set_fill_color (c);
|
||||||
_velocity_color = UINT_INTERPOLATE (c, 0x000000ff, 0.5);
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Note::set_outline_color (Gtkmm2ext::Color c)
|
||||||
|
{
|
||||||
|
Outline::set_outline_color (c);
|
||||||
|
_velocity_color = c;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user