gtk style related fixes:
* remove some old/unused styles * fix plugin-ui button (hover color when active) * consistent style for route buttons (and related ArdourButton updates)
This commit is contained in:
parent
089184c016
commit
4912409a8d
|
@ -143,10 +143,6 @@ style "mixer_track_rec_enable_button_active" = "track_rec_enable_button_active"
|
|||
ythickness = 0
|
||||
}
|
||||
|
||||
style "monitor" = "small_button"
|
||||
{
|
||||
}
|
||||
|
||||
style "meterbridge_label" = "small_text"
|
||||
{
|
||||
}
|
||||
|
@ -1024,10 +1020,18 @@ style "tooltip" = "medium_text"
|
|||
|
||||
style "default_toggle_button"
|
||||
{
|
||||
bg[NORMAL] = @@COLPREFIX@_bg
|
||||
bg[PRELIGHT] = shade(1.1, @@COLPREFIX@_bg)
|
||||
bg[ACTIVE] = @@COLPREFIX@_contrasting_indicator
|
||||
fg[ACTIVE] = @@COLPREFIX@_darkest
|
||||
}
|
||||
|
||||
style "default_toggle_button_active" = "default_toggle_button"
|
||||
{
|
||||
bg[NORMAL] = @@COLPREFIX@_contrasting_indicator
|
||||
bg[ACTIVE] = @@COLPREFIX@_contrasting_indicator
|
||||
bg[SELECTED] = @@COLPREFIX@_contrasting_indicator
|
||||
bg[PRELIGHT] = shade(1.2, @@COLPREFIX@_contrasting_indicator)
|
||||
}
|
||||
|
||||
style "meter_strip_dpm" = "default"
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ widget "*SnapTypeSelector" style:highest "medium_bold_entry"
|
|||
widget "*SnapModeSelector" style:highest "medium_bold_entry"
|
||||
widget "*ZoomFocusSelector" style:highest "medium_bold_entry"
|
||||
widget "*ArdourContextMenu*" style:highest "default_menu"
|
||||
widget "*EditGroupTitleButton*" style:highest "default_button"
|
||||
widget "*MixerGroupTitleButton*" style:highest "default_button"
|
||||
widget "*ErrorLogCloseButton" style:highest "default_button"
|
||||
widget "*EditorGTKButton*" style:highest "default_button"
|
||||
widget "*ToolbarButton" style:highest "default_button"
|
||||
|
@ -29,7 +27,6 @@ widget "*TrackHistoryButton*" style:highest "default_button"
|
|||
widget "*TrackSizeButton*" style:highest "default_button"
|
||||
widget "*TrackPlaylistButton*" style:highest "default_button"
|
||||
widget "*TrackAutomationButton*" style:highest "default_button"
|
||||
widget "*TrackGroupButton*" style:highest "default_button"
|
||||
widget "*TrackMixButton*" style:highest "default_button"
|
||||
widget "*TrackVisualButton*" style:highest "default_button"
|
||||
widget "*TrackRemoveButton*" style:highest "default_button"
|
||||
|
@ -51,27 +48,6 @@ widget "*NewSessionDialogButton*" style:highest "preferences"
|
|||
widget "*MixerSendSwitch*" style:highest "very_small_red_active_and_selected_button"
|
||||
widget "*OptionEditorToggleButton" style:highest "small_red_active_and_selected_button"
|
||||
widget "*NewSessionDialogButton" style:highest "small_red_active_and_selected_button"
|
||||
widget "*RecordEnableButton" style:highest "track_rec_enable_button"
|
||||
widget "*RecordEnableButton-active" style:highest "track_rec_enable_button_active"
|
||||
widget "*RecordEnableButton-alternate" style:highest "track_rec_enable_button_alternate"
|
||||
widget "*RecordEnableButton-alternate2" style:highest "track_rec_enable_button_alternate_two"
|
||||
widget "*MixerRecordEnableButton" style:highest "mixer_track_rec_enable_button"
|
||||
widget "*MixerRecordEnableButton-active" style:highest "mixer_track_rec_enable_button_active"
|
||||
widget "*MixerRecordEnableButton-alternate" style:highest "mixer_track_rec_enable_button_alternate"
|
||||
widget "*MuteButton" style:highest "mute_button"
|
||||
widget "*MuteButton-alternate" style:highest "mute_button_fullylit"
|
||||
widget "*MuteButton-active" style:highest "mute_button_halflit"
|
||||
widget "*MixerMuteButton" style:highest "mixer_mute_button"
|
||||
widget "*MixerMuteButton-alternate" style:highest "mixer_mute_button_fullylit"
|
||||
widget "*MixerMuteButton-active" style:highest "mixer_mute_button_halflit"
|
||||
widget "*SoloButton" style:highest "solo_button"
|
||||
widget "*SoloButton-alternate" style:highest "solo_button_alternate"
|
||||
widget "*SoloButton-alternate2" style:highest "solo_button_alternate2"
|
||||
widget "*SoloButton-active" style:highest "solo_button_active"
|
||||
widget "*MixerSoloButton" style:highest "mixer_solo_button"
|
||||
widget "*MixerSoloButton-alternate" style:highest "mixer_solo_button_alternate"
|
||||
widget "*MixerSoloButton-alternate2" style:highest "mixer_solo_button_alternate2"
|
||||
widget "*MixerSoloButton-active" style:highest "mixer_solo_button_active"
|
||||
widget "*TrackLoopButton*" style:highest "track_loop_button"
|
||||
widget "*PanAutomationLineSelector*" style:highest "multiline_combo"
|
||||
widget "*EditorRulerLabel*" style:highest "ruler_label"
|
||||
|
@ -85,13 +61,7 @@ widget "*MixerAutomationPlaybackButton*" style:highest "very_small_button"
|
|||
widget "*MixerAutomationPlaybackButton.*" style:highest "very_small_button"
|
||||
widget "*MixerNameButton" style:highest "very_small_button"
|
||||
widget "*MixerNameButtonLabel" style:highest "very_small_button"
|
||||
widget "*MixerGroupButton" style:highest "very_small_button"
|
||||
widget "*MixerGroupButtonLabel" style:highest "very_small_button"
|
||||
widget "*MixerCommentButton" style:highest "very_small_button"
|
||||
widget "*MixerCommentButton*" style:highest "very_small_button"
|
||||
widget "*MixerMonoButton*" style:highest "very_small_button"
|
||||
widget "*EditGroupButton" style:highest "very_small_button"
|
||||
widget "*EditGroupButtonLabel" style:highest "very_small_button"
|
||||
widget "*TransportButton" style:highest "transport_button"
|
||||
widget "*TransportButton-active" style:highest "transport_button_active"
|
||||
widget "*TransportButton-alternate2" style:highest "transport_button_alternate_two"
|
||||
|
@ -259,8 +229,6 @@ widget "*MixerStripPeakDisplay*" style:highest "red_active_small_entry"
|
|||
widget "*MixerStripPeakDisplayPeak*" style:highest "peak_display_peaked_entry"
|
||||
widget "*MixerStripSelectedFrame" style:highest "selected_strip_frame"
|
||||
widget "*MixerStripFrame" style:highest "base_frame"
|
||||
widget "*HWMonitorButton" style:highest "bright_when_active"
|
||||
widget "*HWMonitorButton*" style:highest "bright_when_active"
|
||||
widget "*monitor section invert" style:highest "monitor_invert_button"
|
||||
widget "*monitor section cut" style:highest "monitor_mute_button"
|
||||
widget "*monitor section dim" style:highest "monitor_dim_button"
|
||||
|
@ -275,12 +243,7 @@ widget "*FadeCurve" style:highest "medium_bold_entry"
|
|||
widget "*FadeCurve*" style:highest "medium_bold_entry"
|
||||
widget "*RouteParamsListDisplay" style:highest "inspector_track_list_display"
|
||||
widget "*TearOffArrow" style:highest "tearoff_arrow"
|
||||
widget "*RouteParamsTitleButton" style:highest "medium_text"
|
||||
widget "*RouteParamsTitleLabel" style:highest "medium_text"
|
||||
widget "*PluginAutomateRecordButton" style:highest "small_red_active_and_selected_button"
|
||||
widget "*PluginAutomateRecordButton*" style:highest "small_red_active_and_selected_button"
|
||||
widget "*PluginAutomatePlayButton" style:highest "small_red_active_and_selected_button"
|
||||
widget "*PluginAutomatePlayButton*" style:highest "small_red_active_and_selected_button"
|
||||
widget "*PluginAutomateButton" style:highest "small_button"
|
||||
widget "*PluginAutomateButton*" style:highest "small_button"
|
||||
widget "*PluginSaveButton" style:highest "small_button"
|
||||
|
@ -288,7 +251,8 @@ widget "*PluginSaveButton*" style:highest "small_button"
|
|||
widget "*PluginEditButton*" style:highest "small_button"
|
||||
widget "*PluginLoadButton" style:highest "small_button"
|
||||
widget "*PluginLoadButton*" style:highest "small_button"
|
||||
widget "*PluginEditorButton" style:highest "default_toggle_button"
|
||||
widget "*PluginEditorButton*" style:highest "default_toggle_button"
|
||||
widget "*PluginEditorButton-active" style:highest "default_toggle_button_active"
|
||||
|
||||
widget "*BarControlSpinner" style:highest "small_spinner"
|
||||
widget "*BarControlSpinner*" style:highest "small_spinner"
|
||||
|
@ -375,18 +339,19 @@ widget "*tracknumber label" style:highest "tracknumber_label"
|
|||
widget "*StatusBarBox" style:highest "status_bar_box"
|
||||
widget "*RouteNameEditorEntry" style:highest "text_cell_entry"
|
||||
widget "*RegionNameEditorEntry" style:highest "text_cell_entry"
|
||||
widget "*EditorRouteGroupsAllGroupButton" style:highest "default_toggle_button"
|
||||
widget "*MidiSoundNotesButton" style:highest "default_toggle_button"
|
||||
widget "*MeasureLatencyButton" style:highest "default_toggle_button"
|
||||
widget "*monitor" style:highest "monitor"
|
||||
widget "*processor prefader" style:highest "processor"
|
||||
widget "*processor fader" style:highest "processor"
|
||||
widget "*processor postfader" style:highest "processor"
|
||||
widget "*MonitorSectionLabel" style:highest "small_text"
|
||||
widget "*mute button" style:highest "monitor"
|
||||
widget "*invert button" style:highest "monitor"
|
||||
widget "*record enable button" style:highest "small_button"
|
||||
widget "*mute button" style:highest "small_button"
|
||||
widget "*invert button" style:highest "small_button"
|
||||
widget "*send alert button" style:highest "small_text"
|
||||
widget "*solo button" style:highest "monitor"
|
||||
widget "*solo button" style:highest "small_button"
|
||||
widget "*route button" style:highest "small_button"
|
||||
widget "*monitor button" style:highest "small_button"
|
||||
widget "*rude solo" style:highest "small_text"
|
||||
widget "*rude audition" style:highest "small_text"
|
||||
widget "*feedback alert" style:highest "small_text"
|
||||
|
|
|
@ -362,7 +362,6 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
}
|
||||
|
||||
const int text_margin = char_pixel_width();
|
||||
|
||||
// Text, if any
|
||||
if (!_pixbuf && ((_elements & Text)==Text) && !_text.empty()) {
|
||||
assert(_layout);
|
||||
|
@ -377,7 +376,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
|
|||
printf("%s: f:%dx%d bh:%.0f tw:%d (%dx%d) %s\"%s\"\n",
|
||||
get_name().c_str(),
|
||||
char_pixel_width(), char_pixel_height(),
|
||||
ceil(_text_height * BASELINESTRETCH),
|
||||
ceil(char_pixel_height() * BASELINESTRETCH),
|
||||
_text_width,
|
||||
get_width(), get_height(),
|
||||
layout_font ? "L:" : "W:",
|
||||
|
@ -577,7 +576,7 @@ ArdourButton::on_size_request (Gtk::Requisition* req)
|
|||
_text_height = char_pixel_height ();
|
||||
// if _layout does not exist, char_pixel_height() creates it,
|
||||
_layout->get_pixel_size (_text_width, ignored);
|
||||
req->width += rint(1.6 * char_pixel_width()); // padding
|
||||
req->width += rint(1.75 * char_pixel_width()); // padding
|
||||
req->width += _text_width;
|
||||
req->height = std::max(req->height, (int) ceil(_text_height * BASELINESTRETCH + 1.0));
|
||||
} else {
|
||||
|
@ -601,9 +600,9 @@ ArdourButton::on_size_request (Gtk::Requisition* req)
|
|||
|
||||
if (_elements & (RecButton | CloseCross)) {
|
||||
assert(!(_elements & Text));
|
||||
const int wh = std::max(char_pixel_width(), char_pixel_height()) * BASELINESTRETCH;
|
||||
const int wh = std::max(3.5 * char_pixel_width(), ceil(char_pixel_height() * BASELINESTRETCH + 1));
|
||||
req->width += wh;
|
||||
req->height = std::max(req->height, (int) wh);
|
||||
req->height = std::max(req->height, wh);
|
||||
}
|
||||
|
||||
if (_tweaks & Square) {
|
||||
|
@ -1016,7 +1015,9 @@ ArdourButton::set_tweaks (Tweaks t)
|
|||
{
|
||||
if (_tweaks != t) {
|
||||
_tweaks = t;
|
||||
CairoWidget::set_dirty ();
|
||||
if (is_realized()) {
|
||||
queue_resize ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,8 +130,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
|
||||
hide_button.set_elements ((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::CloseCross));
|
||||
|
||||
auto_button.set_name ("mixer strip button");
|
||||
hide_button.set_name ("mixer strip button");
|
||||
auto_button.set_name ("route button");
|
||||
hide_button.set_name ("route button");
|
||||
|
||||
auto_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
hide_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
@ -183,6 +183,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
Gtk::DrawingArea *blankB = manage (new Gtk::DrawingArea());
|
||||
|
||||
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&parent);
|
||||
// TODO use rtv->controls_base_unselected_name
|
||||
// subscribe to route_active_changed, ...
|
||||
if (rtv && rtv->is_audio_track()) {
|
||||
blank0->set_name ("AudioTrackControlsBaseUnselected");
|
||||
blankB->set_name ("AudioTrackControlsBaseUnselected");
|
||||
|
|
|
@ -793,8 +793,10 @@ GenericPluginUI::toggle_parameter_changed (ControlUI* cui)
|
|||
if (!cui->ignore_change) {
|
||||
if (val > 0.5) {
|
||||
cui->button->set_active (true);
|
||||
cui->button->set_name ("PluginEditorButton-active");
|
||||
} else {
|
||||
cui->button->set_active (false);
|
||||
cui->button->set_name ("PluginEditorButton");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -855,7 +857,13 @@ void
|
|||
GenericPluginUI::control_port_toggled (ControlUI* cui)
|
||||
{
|
||||
cui->ignore_change++;
|
||||
insert->automation_control (cui->parameter())->set_value (cui->button->get_active());
|
||||
const bool active = cui->button->get_active();
|
||||
if (active) {
|
||||
cui->button->set_name ("PluginEditorButton-active");
|
||||
} else {
|
||||
cui->button->set_name ("PluginEditorButton");
|
||||
}
|
||||
insert->automation_control (cui->parameter())->set_value (active);
|
||||
cui->ignore_change--;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCan
|
|||
number_label.set_elements((ArdourButton::Element)(ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text|ArdourButton::Inactive));
|
||||
number_label.set_alignment(.5, .5);
|
||||
number_label.set_fallthrough_to_parent (true);
|
||||
track_number_v_size_group->add_widget(number_label);
|
||||
|
||||
sess->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::parameter_changed, this, _1), gui_context());
|
||||
}
|
||||
|
@ -218,7 +217,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
controls_table.attach (*mute_button, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
|
||||
}
|
||||
controls_button_size_group->add_widget(*mute_button);
|
||||
track_number_v_size_group->add_widget(*mute_button);
|
||||
|
||||
if (!_route->is_master()) {
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
|
@ -418,9 +416,9 @@ RouteTimeAxisView::update_track_number_visibility ()
|
|||
}
|
||||
if (show_label) {
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 1, 0);
|
||||
controls_table.attach (number_label, 3, 4, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 1, 0);
|
||||
} else {
|
||||
controls_table.attach (number_label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 1, 0);
|
||||
controls_table.attach (number_label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 1, 0);
|
||||
}
|
||||
// see ArdourButton::on_size_request(), we should probably use a global size-group here instead.
|
||||
// except the width of the number label is subtracted from the name-hbox, so we
|
||||
|
|
|
@ -75,7 +75,6 @@ int const TimeAxisView::_max_order = 512;
|
|||
unsigned int TimeAxisView::name_width_px = 100; // TODO adjust with font-scaling on style-change
|
||||
PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
|
||||
Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::controls_meters_size_group = Glib::RefPtr<Gtk::SizeGroup>();
|
||||
Glib::RefPtr<Gtk::SizeGroup> TimeAxisView::track_number_v_size_group = Glib::RefPtr<Gtk::SizeGroup>();
|
||||
|
||||
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
|
||||
: AxisView (sess)
|
||||
|
@ -105,9 +104,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
if (!controls_meters_size_group) {
|
||||
controls_meters_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
|
||||
}
|
||||
if (!track_number_v_size_group) {
|
||||
track_number_v_size_group = SizeGroup::create (SIZE_GROUP_VERTICAL);
|
||||
}
|
||||
if (extra_height == 0) {
|
||||
compute_heights ();
|
||||
}
|
||||
|
@ -1151,6 +1147,7 @@ TimeAxisView::compute_heights ()
|
|||
window.add (one_row_table);
|
||||
test_button->set_name ("mute button");
|
||||
test_button->set_text (_("M"));
|
||||
test_button->set_tweaks (ArdourButton::Square);
|
||||
|
||||
one_row_table.set_border_width (border_width);
|
||||
one_row_table.set_row_spacings (2);
|
||||
|
|
|
@ -203,7 +203,6 @@ class TimeAxisView : public virtual AxisView
|
|||
|
||||
protected:
|
||||
static Glib::RefPtr<Gtk::SizeGroup> controls_meters_size_group;
|
||||
static Glib::RefPtr<Gtk::SizeGroup> track_number_v_size_group;
|
||||
static unsigned int name_width_px;
|
||||
/* The Standard LHS Controls */
|
||||
Gtk::Table controls_table;
|
||||
|
|
Loading…
Reference in New Issue