mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-27 23:48:22 +01:00
[Summary] Improving FADER and INSPECTOR
This commit is contained in:
parent
1a458c74a0
commit
ddb3c7da06
5 changed files with 77 additions and 73 deletions
|
|
@ -1161,7 +1161,9 @@ MixerStrip::route_color_changed ()
|
|||
color_button[i]->set_active (new_color == Gdk::Color (XMLColor[i]));
|
||||
}
|
||||
|
||||
name_button.modify_bg (STATE_NORMAL, new_color);
|
||||
name_button.modify_bg (Gtk::STATE_NORMAL, new_color);
|
||||
name_button.modify_bg (Gtk::STATE_ACTIVE, new_color);
|
||||
name_button.modify_bg (Gtk::STATE_PRELIGHT, new_color);
|
||||
color_palette_home.modify_bg (STATE_NORMAL, new_color);
|
||||
color_palette_home.modify_bg (STATE_ACTIVE, new_color);
|
||||
color_palette_home.queue_draw ();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,18 @@
|
|||
|
||||
<RouteUI bgnormal="#383838">
|
||||
<VBox>
|
||||
<EventBox id="color_palette_home" borderwidth="1" bgnormal="#383838">
|
||||
<EventBox id="color_palette_home"
|
||||
borderwidth="1"
|
||||
bgnormal="#383838">
|
||||
<VBox>
|
||||
<iconbutton id="color_palette_button"
|
||||
width="95"
|
||||
height="17"
|
||||
normalicon="inspector_color_close"
|
||||
activeicon="inspector_color_open"/>
|
||||
<VBox id="color_buttons_home" visible="false">
|
||||
<VBox id="color_buttons_home"
|
||||
noshowall="true"
|
||||
visible="false">
|
||||
<HBox>
|
||||
<iconbutton id="color_button_1"
|
||||
width="19"
|
||||
|
|
@ -110,27 +114,32 @@
|
|||
</VBox>
|
||||
</EventBox>
|
||||
<VBox box.pack="end">
|
||||
<EventBox id="panners_home" bgnormal="#383838" width="95" height="60"/>
|
||||
<EventBox id="panners_home"
|
||||
bgnormal="#383838"
|
||||
width="95"
|
||||
height="60"/>
|
||||
<HBox id="level_meter_home"/>
|
||||
<Vbox>
|
||||
<HBox id="gain_meter_home"/>
|
||||
<!--RouteUI-->
|
||||
<HBox id="invert_button_box" visible="false"/>
|
||||
<EventBox bgnormal="#000000" width="50">
|
||||
<VBox borderwidth="1" spacing="1">
|
||||
<HBox id="invert_button_box"
|
||||
visible="false"/>
|
||||
<EventBox bgnormal="#000000"
|
||||
width="50">
|
||||
<VBox borderwidth="1"
|
||||
spacing="1">
|
||||
<HBox spacing="1">
|
||||
<iconbutton id="rec_enable_button"
|
||||
width="47"
|
||||
height="20"
|
||||
normalicon="inspector_record"
|
||||
activeicon="inspector_record_active"
|
||||
prelighticon="inspector_record_prelight"/>
|
||||
width="47"
|
||||
height="20"
|
||||
normalicon="inspector_record"
|
||||
activeicon="inspector_record_active"
|
||||
prelighticon="inspector_record_prelight"/>
|
||||
<iconbutton id="monitor_input_button"
|
||||
width="47"
|
||||
height="20"
|
||||
normalicon="inspector_monitor_input"
|
||||
activeicon="inspector_monitor_input_active"
|
||||
prelighticon="inspector_monitor_input_prelight"/>
|
||||
width="47"
|
||||
height="20"
|
||||
normalicon="inspector_monitor_input"
|
||||
activeicon="inspector_monitor_input_active"
|
||||
prelighticon="inspector_monitor_input_prelight"/>
|
||||
</HBox>
|
||||
<HBox spacing="1">
|
||||
<iconbutton id="mute_button"
|
||||
|
|
@ -151,14 +160,18 @@
|
|||
<Button id="name_button"
|
||||
width="95"
|
||||
height="47"
|
||||
fgnormal="#D7D7D7"/>
|
||||
fgnormal="#D7D7D7"
|
||||
fghover="#D7D7D7"
|
||||
fgactive="#D7D7D7"/>
|
||||
</VBox>
|
||||
</EventBox>
|
||||
<Button id="show_sends_button" visible="false" noshowall="true"/>
|
||||
<Button id="monitor_disk_button" visible="false" noshowall="true"/>
|
||||
<Button id="comment_button" visible="false" noshowall="true"/>
|
||||
<Button id="midi_input_enable_button" visible="false" noshowall="true"/>
|
||||
<Button id="group_button" text="Grp" visible="false" noshowall="true"/>
|
||||
<HBox visible="false" noshowall="true">
|
||||
<Button id="show_sends_button"/>
|
||||
<Button id="monitor_disk_button"/>
|
||||
<Button id="comment_button"/>
|
||||
<Button id="midi_input_enable_button"/>
|
||||
<Button id="group_button"/>
|
||||
</HBox>
|
||||
</Vbox>
|
||||
</VBox>
|
||||
</VBox>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GainSlider meterwidth="6" thinmeterwidth="6">
|
||||
<Adjustment id="gain_adjustment"
|
||||
minvalue="0"
|
||||
maxvalue="1"/>
|
||||
<Layout Layout="" bgnormal="#383838" width="97" height="253">
|
||||
minvalue="0"
|
||||
maxvalue="1"/>
|
||||
<Layout bgnormal="#383838"
|
||||
width="97"
|
||||
height="260">
|
||||
<Button id="peak_display_button"
|
||||
x="0" y="0"
|
||||
width="97" height="18"
|
||||
|
|
@ -19,7 +21,9 @@
|
|||
y="36"
|
||||
width="27"
|
||||
height="187"/>
|
||||
<icon source="inspector_background.png" x="33" y="18"/>
|
||||
<icon source="inspector_background.png"
|
||||
x="33"
|
||||
y="18"/>
|
||||
<Fader id="gain_slider"
|
||||
adjustment="gain_adjustment"
|
||||
facesource="slider_controller_fader.png"
|
||||
|
|
@ -27,12 +31,16 @@
|
|||
handlesource="slider_controller_fader_handle.png"
|
||||
activehandlesource="slider_controller_fader_handle.png"
|
||||
minposx="10"
|
||||
minposy="200"
|
||||
minposy="196"
|
||||
maxposx="10"
|
||||
maxposy="10"
|
||||
x="66"
|
||||
y="25"
|
||||
y="26"
|
||||
bgnormal="#383838"/>
|
||||
<VBox id="gain_display_home" x="1" y="237" width="95" height="16"/>
|
||||
<VBox id="gain_display_home"
|
||||
x="1"
|
||||
y="244"
|
||||
width="95"
|
||||
height="16"/>
|
||||
</Layout>
|
||||
</GainSlider>
|
||||
|
|
@ -337,14 +337,14 @@ WavesButton::set_controllable (boost::shared_ptr<Controllable> c)
|
|||
void
|
||||
WavesButton::watch ()
|
||||
{
|
||||
boost::shared_ptr<Controllable> c (binding_proxy.get_controllable ());
|
||||
boost::shared_ptr<Controllable> c (binding_proxy.get_controllable ());
|
||||
|
||||
if (!c) {
|
||||
warning << _("button cannot watch state of non-existing Controllable\n") << endmsg;
|
||||
return;
|
||||
}
|
||||
if (!c) {
|
||||
warning << _("button cannot watch state of non-existing Controllable\n") << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&WavesButton::controllable_changed, this), gui_context());
|
||||
c->Changed.connect (watch_connection, invalidator(*this), boost::bind (&WavesButton::controllable_changed, this), gui_context());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -54,46 +54,27 @@ WavesIconButton::render (cairo_t* cr)
|
|||
{
|
||||
void (*rounded_function)(cairo_t*, double, double, double, double, double);
|
||||
|
||||
switch (_corner_mask) {
|
||||
case 0x1: /* upper left only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_left_rectangle;
|
||||
break;
|
||||
case 0x2: /* upper right only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_right_rectangle;
|
||||
break;
|
||||
case 0x3: /* upper only */
|
||||
rounded_function = Gtkmm2ext::rounded_top_rectangle;
|
||||
break;
|
||||
/* should really have functions for lower right, lower left,
|
||||
lower only, but for now, we don't
|
||||
*/
|
||||
default:
|
||||
rounded_function = Gtkmm2ext::rounded_rectangle;
|
||||
}
|
||||
|
||||
Glib::RefPtr<Gtk::Style> style = get_style();
|
||||
/*
|
||||
Gdk::Color bgcolor = style->get_bg ((get_state() == Gtk::STATE_INSENSITIVE) ? Gtk::STATE_INSENSITIVE :
|
||||
(_hovering ?
|
||||
(_pushed ?
|
||||
Gtk::STATE_ACTIVE :
|
||||
Gtk::STATE_PRELIGHT ) :
|
||||
(get_active() ?
|
||||
Gtk::STATE_ACTIVE :
|
||||
Gtk::STATE_NORMAL)));*/
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf> pixbuf = ((CairoWidget::active_state() == Gtkmm2ext::ImplicitActive) ? _implicit_active_pixbuf : Glib::RefPtr<Gdk::Pixbuf>(0));
|
||||
|
||||
if (pixbuf == 0) {
|
||||
pixbuf = (get_state() == Gtk::STATE_INSENSITIVE) ?
|
||||
(_inactive_pixbuf ? _inactive_pixbuf : _normal_pixbuf) :
|
||||
(_hovering ?
|
||||
(_pushed ?
|
||||
(_active_pixbuf ? _active_pixbuf : _normal_pixbuf) :
|
||||
(_prelight_pixbuf ? _prelight_pixbuf : _normal_pixbuf)) :
|
||||
(get_active() ?
|
||||
(_active_pixbuf ? _active_pixbuf : _normal_pixbuf) :
|
||||
_normal_pixbuf));
|
||||
(_inactive_pixbuf ? _inactive_pixbuf : _normal_pixbuf) :
|
||||
(_hovering ?
|
||||
(_pushed ? (_active_pixbuf ?
|
||||
_active_pixbuf :
|
||||
_normal_pixbuf) :
|
||||
(_prelight_pixbuf ?
|
||||
_prelight_pixbuf :
|
||||
(get_active() ?
|
||||
(_active_pixbuf ?
|
||||
_active_pixbuf :
|
||||
_normal_pixbuf) :
|
||||
_normal_pixbuf))) :
|
||||
(get_active() ?
|
||||
(_active_pixbuf ?
|
||||
_active_pixbuf :
|
||||
_normal_pixbuf) :
|
||||
_normal_pixbuf));
|
||||
}
|
||||
|
||||
if ((_left_border_width != 0) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue