some tweaks to make narrow mixer strips actually narrow

git-svn-id: svn://localhost/ardour2/branches/3.0@13547 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-11-26 22:05:45 +00:00
parent c175baf9dd
commit 14f11a9e63
3 changed files with 55 additions and 25 deletions

View file

@ -262,7 +262,7 @@ ArdourButton::render (cairo_t* cr)
int text_margin; int text_margin;
if (get_width() < 75) { if (get_width() < 75) {
text_margin = 3; text_margin = 5;
} else { } else {
text_margin = 10; text_margin = 10;
} }

View file

@ -161,7 +161,7 @@ MixerStrip::init ()
output_button.set_name ("mixer strip button"); output_button.set_name ("mixer strip button");
Gtkmm2ext::set_size_request_to_display_given_text (output_button, longest_label.c_str(), 4, 4); Gtkmm2ext::set_size_request_to_display_given_text (output_button, longest_label.c_str(), 4, 4);
ARDOUR_UI::instance()->set_tip (&meter_point_button, _("Select metering point"), ""); ARDOUR_UI::instance()->set_tip (&meter_point_button, _("Click to select metering point"), "");
meter_point_button.set_name ("mixer strip button"); meter_point_button.set_name ("mixer strip button");
/* TRANSLATORS: this string should be longest of the strings /* TRANSLATORS: this string should be longest of the strings
@ -632,8 +632,8 @@ MixerStrip::set_width_enum (Width w, void* owner)
panners.short_astate_string(_route->panner()->automation_state())); panners.short_astate_string(_route->panner()->automation_state()));
} }
solo_isolated_led->set_text (_("i")); solo_isolated_led->set_text (_("iso"));
solo_safe_led->set_text (_("L")); solo_safe_led->set_text (_("Lck"));
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2); Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
set_size_request (max (50, gpm.get_gm_width()), -1); set_size_request (max (50, gpm.get_gm_width()), -1);
@ -1680,6 +1680,8 @@ MixerStrip::engine_running ()
string string
MixerStrip::meter_point_string (MeterPoint mp) MixerStrip::meter_point_string (MeterPoint mp)
{ {
switch (_width) {
case Wide:
switch (mp) { switch (mp) {
case MeterInput: case MeterInput:
return _("in"); return _("in");
@ -1702,6 +1704,33 @@ MixerStrip::meter_point_string (MeterPoint mp)
return _("custom"); return _("custom");
break; break;
} }
break;
case Narrow:
switch (mp) {
case MeterInput:
return _("in");
break;
case MeterPreFader:
return _("pr");
break;
case MeterPostFader:
return _("po");
break;
case MeterOutput:
return _("o");
break;
case MeterCustom:
default:
return _("c");
break;
}
break;
}
} }
/** Called when the metering point has changed */ /** Called when the metering point has changed */
@ -1884,8 +1913,9 @@ MixerStrip::set_button_names ()
break; break;
} }
}
meter_point_button.set_text (meter_point_string (_route->meter_point()));
}
PluginSelector* PluginSelector*
MixerStrip::plugin_selector() MixerStrip::plugin_selector()

View file

@ -314,7 +314,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
void set_meter_point (ARDOUR::MeterPoint); void set_meter_point (ARDOUR::MeterPoint);
PBD::ScopedConnection _level_meter_connection; PBD::ScopedConnection _level_meter_connection;
static std::string meter_point_string (ARDOUR::MeterPoint); std::string meter_point_string (ARDOUR::MeterPoint);
}; };
#endif /* __ardour_mixer_strip__ */ #endif /* __ardour_mixer_strip__ */