mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
remove more unused MIDI note colors
This commit is contained in:
parent
cbe458addd
commit
b0e496c825
9 changed files with 15 additions and 30 deletions
|
|
@ -2935,9 +2935,7 @@ MidiRegionView::begin_resizing (bool /*at_front*/)
|
|||
ArdourCanvas::Rect (note->x0(), note->y0(), note->x0(), note->y1()));
|
||||
|
||||
// calculate the colors: get the color settings
|
||||
uint32_t fill_color = UINT_RGBA_CHANGE_A(
|
||||
UIConfiguration::instance().color ("midi note selected"),
|
||||
128);
|
||||
uint32_t fill_color = NoteBase::meter_style_fill_color (note->note()->velocity(), true);
|
||||
|
||||
// make the resize preview notes more transparent and bright
|
||||
fill_color = UINT_INTERPOLATE(fill_color, 0xFFFFFF40, 0.5);
|
||||
|
|
@ -2949,7 +2947,7 @@ MidiRegionView::begin_resizing (bool /*at_front*/)
|
|||
0.85));
|
||||
|
||||
resize_rect->set_outline_color (NoteBase::calculate_outline (
|
||||
UIConfiguration::instance().color ("midi note selected")));
|
||||
UIConfiguration::instance().color ("midi note selected outline")));
|
||||
|
||||
resize_data->resize_rect = resize_rect;
|
||||
_resize_data.push_back(resize_data);
|
||||
|
|
|
|||
|
|
@ -44,17 +44,13 @@ const uint32_t NoteBase::midi_channel_colors[16] = {
|
|||
0x832dd3ff, 0xa92dd3ff, 0xd32dbfff, 0xd32d67ff
|
||||
};
|
||||
|
||||
bool NoteBase::_color_init = false;
|
||||
uint32_t NoteBase::_selected_mod_col = 0;
|
||||
uint32_t NoteBase::_selected_outline_col = 0;
|
||||
uint32_t NoteBase::_selected_col = 0;
|
||||
bool NoteBase::_color_init = false;
|
||||
Gtkmm2ext::Color NoteBase::_selected_col = 0;
|
||||
|
||||
void
|
||||
NoteBase::set_colors ()
|
||||
{
|
||||
_selected_mod_col = UIConfiguration::instance().color_mod ("midi note selected", "midi note");
|
||||
_selected_outline_col = UIConfiguration::instance().color ("midi note selected outline");
|
||||
_selected_col = UIConfiguration::instance().color ("midi note selected");
|
||||
_selected_col = UIConfiguration::instance().color ("midi note selected outline");
|
||||
}
|
||||
|
||||
NoteBase::NoteBase(MidiRegionView& region, bool with_events, const boost::shared_ptr<NoteType> note)
|
||||
|
|
@ -325,20 +321,18 @@ NoteBase::big_enough_to_trim () const
|
|||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
Gtkmm2ext::Color
|
||||
NoteBase::meter_style_fill_color(uint8_t vel, bool /* selected */)
|
||||
{
|
||||
if (vel < 32) {
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color ("midi meter color0"), UIConfiguration::instance().color ("midi meter color1"), (vel / 32.0));
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color_mod ("midi meter color0", "midi note"), UIConfiguration::instance().color_mod ("midi meter color1", "midi note"), (vel / 32.0));
|
||||
} else if (vel < 64) {
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color ("midi meter color2"), UIConfiguration::instance().color ("midi meter color3"), ((vel-32) / 32.0));
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color_mod ("midi meter color2", "midi note"), UIConfiguration::instance().color_mod ("midi meter color3", "midi note"), ((vel-32) / 32.0));
|
||||
} else if (vel < 100) {
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color ("midi meter color4"), UIConfiguration::instance().color ("midi meter color5"), ((vel-64) / 36.0));
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color_mod ("midi meter color4", "midi note"), UIConfiguration::instance().color_mod ("midi meter color5", "midi note"), ((vel-64) / 36.0));
|
||||
} else if (vel < 112) {
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color ("midi meter color6"), UIConfiguration::instance().color ("midi meter color7"), ((vel-100) / 12.0));
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color_mod ("midi meter color6", "midi note"), UIConfiguration::instance().color_mod ("midi meter color7", "midi note"), ((vel-100) / 12.0));
|
||||
} else {
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color ("midi meter color8"), UIConfiguration::instance().color ("midi meter color9"), ((vel-112) / 17.0));
|
||||
return UINT_INTERPOLATE(UIConfiguration::instance().color_mod ("midi meter color8", "midi note"), UIConfiguration::instance().color_mod ("midi meter color9", "midi note"), ((vel-112) / 17.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "temporal/beats.h"
|
||||
#include "canvas/types.h"
|
||||
#include "gtkmm2ext/colors.h"
|
||||
|
||||
#include "rgb_macros.h"
|
||||
#include "ui_config.h"
|
||||
|
|
@ -103,12 +104,12 @@ public:
|
|||
|
||||
static void set_colors ();
|
||||
|
||||
static uint32_t meter_style_fill_color(uint8_t vel, bool selected);
|
||||
static Gtkmm2ext::Color meter_style_fill_color(uint8_t vel, bool selected);
|
||||
|
||||
/// calculate outline colors from fill colors of notes
|
||||
inline static uint32_t calculate_outline(uint32_t color, bool selected=false) {
|
||||
if (selected) {
|
||||
return _selected_outline_col;
|
||||
return _selected_col;
|
||||
} else {
|
||||
return UINT_INTERPOLATE(color, 0x000000ff, 0.5);
|
||||
}
|
||||
|
|
@ -140,9 +141,7 @@ protected:
|
|||
private:
|
||||
bool event_handler (GdkEvent *);
|
||||
|
||||
static uint32_t _selected_mod_col;
|
||||
static uint32_t _selected_outline_col;
|
||||
static uint32_t _selected_col;
|
||||
static Gtkmm2ext::Color _selected_col;
|
||||
static bool _color_init;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="color 56"/>
|
||||
<ColorAlias name="midi meter color9" alias="color 17"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="color 91"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 67"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 32"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="color 56"/>
|
||||
<ColorAlias name="midi meter color9" alias="meter color3"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="color 80"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 67"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 32"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="color 56"/>
|
||||
<ColorAlias name="midi meter color9" alias="meter color3"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="color 91"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 67"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 13"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="color 56"/>
|
||||
<ColorAlias name="midi meter color9" alias="meter color3"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="color 29"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 67"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 32"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
|
|||
|
|
@ -285,7 +285,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="midi color4"/>
|
||||
<ColorAlias name="midi meter color9" alias="midi color5"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="color 40"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 9"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 32"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 60"/>
|
||||
|
|
|
|||
|
|
@ -282,7 +282,6 @@
|
|||
<ColorAlias name="midi meter color8" alias="meter color8"/>
|
||||
<ColorAlias name="midi meter color9" alias="meter color9"/>
|
||||
<ColorAlias name="midi note inactive channel" alias="color 4"/>
|
||||
<ColorAlias name="midi note selected" alias="meter color7"/>
|
||||
<ColorAlias name="midi note selected outline" alias="color 105"/>
|
||||
<ColorAlias name="midi note velocity text" alias="color 2"/>
|
||||
<ColorAlias name="midi patch change fill" alias="color 105"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue