Push2: Show both row and column interval explicitly in the same way

This hopefully makes the layout clearer to people who aren't familiar with what
all the settings mean.
This commit is contained in:
David Robillard 2021-06-19 15:59:55 -04:00 committed by Paul Davis
parent e4e874bed0
commit b6389bf274
2 changed files with 18 additions and 3 deletions

View File

@ -53,12 +53,18 @@ row_interval_string (const Push2::RowInterval row_interval)
case Push2::Fifth:
return _("5th \u2191");
case Push2::Sequential:
return _("Sequential \u21C9");
return _("Sequential \u2191");
}
return "";
}
static const char*
column_interval_string (const bool inkey)
{
return inkey ? _("Scale \u2192") : _("Semitone \u2192");
}
ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
: Push2Layout (p, s, name)
, _last_vpot (-1)
@ -93,7 +99,7 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
_inkey_text->set_font_description (fd2);
_inkey_text->set_position (Duple (10, 140));
_inkey_text->set_color (_p2.get_color (Push2::LightBackground));
_inkey_text->set (_("InKey"));
_inkey_text->set (_("Scale"));
_chromatic_text = new Text (this);
_chromatic_text->set_font_description (fd2);
@ -115,10 +121,16 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
_row_interval_text = new Text (this);
_row_interval_text->set_font_description (fd);
_row_interval_text->set_position (Duple (10, 70));
_row_interval_text->set_position (Duple (10, 60));
_row_interval_text->set_color (_p2.get_color (Push2::LightBackground));
_row_interval_text->set (row_interval_string (_p2.row_interval ()));
_column_interval_text = new Text (this);
_column_interval_text->set_font_description (fd);
_column_interval_text->set_position (Duple (10, 80));
_column_interval_text->set_color (_p2.get_color (Push2::LightBackground));
_column_interval_text->set (column_interval_string (false));
for (int n = 0; n < 8; ++n) {
/* text labels for root notes etc.*/
@ -520,9 +532,11 @@ ScaleLayout::show_root_state ()
if (_p2.in_key()) {
_chromatic_text->set_color (change_alpha (_chromatic_text->color(), unselected_root_alpha));
_inkey_text->set_color (change_alpha (_inkey_text->color(), 1.0));
_column_interval_text->set(column_interval_string(true));
} else {
_inkey_text->set_color (change_alpha (_chromatic_text->color(), unselected_root_alpha));
_chromatic_text->set_color (change_alpha (_inkey_text->color(), 1.0));
_column_interval_text->set(column_interval_string(false));
}
Pango::FontDescription fd_bold ("Sans Bold 10");

View File

@ -62,6 +62,7 @@ class ScaleLayout : public Push2Layout
ArdourCanvas::Text* _fixed_text;
ArdourCanvas::Text* _rooted_text;
ArdourCanvas::Text* _row_interval_text;
ArdourCanvas::Text* _column_interval_text;
ArdourCanvas::Text* _close_text;
Push2Menu* _scale_menu;
int _last_vpot;