several theme changes. changed drawing of rounded_rectangle to be more correct. operation and feel should be more consistent. rec-mute-solo buttons are now dull until enabled. this might be debatable. otherwise if it looks weird, try loading Window->Theme Manager and clicking Restore Defaults
git-svn-id: svn://localhost/ardour2/branches/3.0@13611 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -179,66 +179,65 @@
|
||||
<Option name="processor control button: led active" value="ff0000ff"/>
|
||||
<Option name="processor control button: text" value="ffffffff"/>
|
||||
<Option name="processor control button: text active" value="ffffffff"/>
|
||||
<Option name="monitor button: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor button: fill end" value="564d48ff"/>
|
||||
<Option name="monitor button: fill start active" value="46a344ff"/>
|
||||
<Option name="monitor button: fill end active" value="3c723bff"/>
|
||||
<Option name="monitor button: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor button: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor button: fill start active" value="553500ff"/>
|
||||
<Option name="monitor button: fill end active" value="e58505ff"/>
|
||||
<Option name="monitor button: led" value="660000ff"/>
|
||||
<Option name="monitor button: led active" value="ff0000ff"/>
|
||||
<Option name="monitor button: text" value="aaaaa3ff"/>
|
||||
<Option name="monitor button: text active" value="1a1a1aff"/>
|
||||
<Option name="solo isolate: fill start" value="5d5856ff"/>
|
||||
<Option name="solo isolate: fill end" value="564d48ff"/>
|
||||
<Option name="solo isolate: fill start" value="5f5a58ff"/>
|
||||
<Option name="solo isolate: fill end" value="504442ff"/>
|
||||
<Option name="solo isolate: fill start active" value="5d5856ff"/>
|
||||
<Option name="solo isolate: fill end active" value="564d48ff"/>
|
||||
<Option name="solo isolate: led" value="660000ff"/>
|
||||
<Option name="solo isolate: led active" value="ff0000ff"/>
|
||||
<Option name="solo isolate: text" value="c7c7d8ff"/>
|
||||
<Option name="solo isolate: text active" value="c8c8d9ff"/>
|
||||
<Option name="solo safe: fill start" value="5d5856ff"/>
|
||||
<Option name="solo safe: fill end" value="564d48ff"/>
|
||||
<Option name="solo safe: fill start" value="5f5a58ff"/>
|
||||
<Option name="solo safe: fill end" value="504442ff"/>
|
||||
<Option name="solo safe: fill start active" value="5d5856ff"/>
|
||||
<Option name="solo safe: fill end active" value="564d48ff"/>
|
||||
<Option name="solo safe: led" value="660000ff"/>
|
||||
<Option name="solo safe: led active" value="ff0000ff"/>
|
||||
<Option name="solo safe: text" value="c7c7d8ff"/>
|
||||
<Option name="solo safe: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor section cut: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor section cut: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section cut: fill start active" value="f7bb0aff"/>
|
||||
<Option name="monitor section cut: fill end active" value="ed8f00ff"/>
|
||||
<Option name="monitor section cut: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor section cut: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor section cut: fill start active" value="5f4943ff"/>
|
||||
<Option name="monitor section cut: fill end active" value="ffa500ff"/>
|
||||
<Option name="monitor section cut: led" value="473812ff"/>
|
||||
<Option name="monitor section cut: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section cut: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor section cut: text active" value="000000ff"/>
|
||||
<Option name="monitor section dim: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor section dim: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section dim: fill start active" value="04af02ff"/>
|
||||
<Option name="monitor section dim: fill end active" value="008a00ff"/>
|
||||
<Option name="monitor section dim: led" value="473812ff"/>
|
||||
<Option name="monitor section dim: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor section dim: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor section dim: fill start active" value="553500ff"/>
|
||||
<Option name="monitor section dim: fill end active" value="e58505ff"/>
|
||||
<Option name="monitor section dim: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section dim: text" value="c8c8d9ff"/>
|
||||
<Option name="monitor section dim: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor section solo: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor section solo: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section solo: fill start active" value="f4f395ff"/>
|
||||
<Option name="monitor section solo: fill end active" value="fffe1dff"/>
|
||||
<Option name="monitor section solo: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor section solo: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor section solo: fill start active" value="104506ff"/>
|
||||
<Option name="monitor section solo: fill end active" value="4dbb00ff"/>
|
||||
<Option name="monitor section solo: led" value="473812ff"/>
|
||||
<Option name="monitor section solo: led active" value="ffa500ff"/>
|
||||
<Option name="monitor section solo: text" value="00000000"/>
|
||||
<Option name="monitor section solo: text active" value="00000000"/>
|
||||
<Option name="monitor section invert: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor section invert: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section invert: fill start active" value="03af01ff"/>
|
||||
<Option name="monitor section invert: fill end active" value="008a00ff"/>
|
||||
<Option name="monitor section invert: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor section invert: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor section invert: fill start active" value="222260ff"/>
|
||||
<Option name="monitor section invert: fill end active" value="4242d0ff"/>
|
||||
<Option name="monitor section invert: led" value="473812ff"/>
|
||||
<Option name="monitor section invert: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section invert: text" value="00000000"/>
|
||||
<Option name="monitor section invert: text active" value="00000000"/>
|
||||
<Option name="monitor section mono: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor section mono: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section mono: fill start active" value="04af02ff"/>
|
||||
<Option name="monitor section mono: fill end active" value="008a00ff"/>
|
||||
<Option name="monitor section mono: fill start" value="5f5a58ff"/>
|
||||
<Option name="monitor section mono: fill end" value="3f3a38ff"/>
|
||||
<Option name="monitor section mono: fill start active" value="222260ff"/>
|
||||
<Option name="monitor section mono: fill end active" value="3232c0ff"/>
|
||||
<Option name="monitor section mono: led" value="473812ff"/>
|
||||
<Option name="monitor section mono: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section mono: text" value="c7c7d8ff"/>
|
||||
@@ -299,26 +298,34 @@
|
||||
<Option name="feedback alert: led active" value="00000000"/>
|
||||
<Option name="feedback alert: text" value="969696ff"/>
|
||||
<Option name="feedback alert: text active" value="e5e5e5ff"/>
|
||||
<Option name="mute button: fill start" value="af8a14ff"/>
|
||||
<Option name="mute button: fill end" value="745127ff"/>
|
||||
<Option name="mute button: fill start active" value="ffc300ff"/>
|
||||
<Option name="mute button: fill end active" value="ea8400ff"/>
|
||||
<Option name="mute button: fill start" value="565659ff"/>
|
||||
<Option name="mute button: fill end" value="484853ff"/>
|
||||
<Option name="mute button: fill start active" value="5f4943ff"/>
|
||||
<Option name="mute button: fill end active" value="ffa500ff"/>
|
||||
<Option name="mute button: led" value="00000000"/>
|
||||
<Option name="mute button: led active" value="00000000"/>
|
||||
<Option name="mute button: text" value="bfbfbfff"/>
|
||||
<Option name="mute button: text active" value="191919ff"/>
|
||||
<Option name="solo button: fill start" value="a09865ff"/>
|
||||
<Option name="solo button: fill end" value="4c5b2aff"/>
|
||||
<Option name="solo button: fill start active" value="fffd9bff"/>
|
||||
<Option name="solo button: fill end active" value="ffff00ff"/>
|
||||
<Option name="solo button: fill start" value="565659ff"/>
|
||||
<Option name="solo button: fill end" value="484853ff"/>
|
||||
<Option name="solo button: fill start active" value="104506ff"/>
|
||||
<Option name="solo button: fill end active" value="4dbb00ff"/>
|
||||
<Option name="solo button: led" value="00000000"/>
|
||||
<Option name="solo button: led active" value="00000000"/>
|
||||
<Option name="solo button: text" value="bfbfbfff"/>
|
||||
<Option name="solo button: text active" value="191919ff"/>
|
||||
<Option name="record enable button: fill start" value="603f3fff"/>
|
||||
<Option name="invert button: fill start" value="565659ff"/>
|
||||
<Option name="invert button: fill end" value="484853ff"/>
|
||||
<Option name="invert button: fill start active" value="222260ff"/>
|
||||
<Option name="invert button: fill end active" value="4242d0ff"/>
|
||||
<Option name="invert button: led" value="473812ff"/>
|
||||
<Option name="invert button: led active" value="78cb4eff"/>
|
||||
<Option name="invert button: text" value="bfbfbfff"/>
|
||||
<Option name="invert button: text active" value="bfbfbfff"/>
|
||||
<Option name="record enable button: fill start" value="5f3f3fff"/>
|
||||
<Option name="record enable button: fill end" value="3d2828ff"/>
|
||||
<Option name="record enable button: fill start active" value="fb0c0cff"/>
|
||||
<Option name="record enable button: fill end active" value="b50f0fff"/>
|
||||
<Option name="record enable button: fill start active" value="280b0bff"/>
|
||||
<Option name="record enable button: fill end active" value="b50e0eff"/>
|
||||
<Option name="record enable button: led" value="00000000"/>
|
||||
<Option name="record enable button: led active" value="00000000"/>
|
||||
<Option name="record enable button: text" value="a5a5a5ff"/>
|
||||
@@ -331,9 +338,9 @@
|
||||
<Option name="send alert button: led active" value="00000000"/>
|
||||
<Option name="send alert button: text" value="ccccccff"/>
|
||||
<Option name="send alert button: text active" value="000000ff"/>
|
||||
<Option name="transport button: fill start" value="656867ff"/>
|
||||
<Option name="transport button: fill end" value="333333ff"/>
|
||||
<Option name="transport button: fill start active" value="a1ff43ff"/>
|
||||
<Option name="transport button: fill start" value="616268ff"/>
|
||||
<Option name="transport button: fill end" value="505159ff"/>
|
||||
<Option name="transport button: fill start active" value="145409ff"/>
|
||||
<Option name="transport button: fill end active" value="00a300ff"/>
|
||||
<Option name="transport button: led" value="00000000"/>
|
||||
<Option name="transport button: led active" value="00000000"/>
|
||||
@@ -341,14 +348,14 @@
|
||||
<Option name="transport button: text active" value="00000000"/>
|
||||
<Option name="transport recenable button: fill start" value="5f3f3fff"/>
|
||||
<Option name="transport recenable button: fill end" value="3d2828ff"/>
|
||||
<Option name="transport recenable button: fill start active" value="f80b0bff"/>
|
||||
<Option name="transport recenable button: fill start active" value="280b0bff"/>
|
||||
<Option name="transport recenable button: fill end active" value="b50e0eff"/>
|
||||
<Option name="transport recenable button: led" value="00000000"/>
|
||||
<Option name="transport recenable button: led active" value="00000000"/>
|
||||
<Option name="transport recenable button: text" value="00000000"/>
|
||||
<Option name="transport recenable button: text active" value="00000000"/>
|
||||
<Option name="transport option button: fill start" value="636470ff"/>
|
||||
<Option name="transport option button: fill end" value="4a4b51ff"/>
|
||||
<Option name="transport option button: fill end" value="54555dff"/>
|
||||
<Option name="transport option button: fill start active" value="636470ff"/>
|
||||
<Option name="transport option button: fill end active" value="4a4b51ff"/>
|
||||
<Option name="transport option button: led" value="4f3300ff"/>
|
||||
@@ -356,9 +363,9 @@
|
||||
<Option name="transport option button: text" value="c7c7d8ff"/>
|
||||
<Option name="transport option button: text active" value="c8c8d9ff"/>
|
||||
<Option name="transport active option button: fill start" value="606b60ff"/>
|
||||
<Option name="transport active option button: fill end" value="555d54ff"/>
|
||||
<Option name="transport active option button: fill start active" value="a1ff43ff"/>
|
||||
<Option name="transport active option button: fill end active" value="00a300ff"/>
|
||||
<Option name="transport active option button: fill end" value="495348ff"/>
|
||||
<Option name="transport active option button: fill start active" value="154515ff"/>
|
||||
<Option name="transport active option button: fill end active" value="20a320ff"/>
|
||||
<Option name="transport active option button: led" value="4f3300ff"/>
|
||||
<Option name="transport active option button: led active" value="ffa500ff"/>
|
||||
<Option name="transport active option button: text" value="c7c7d8ff"/>
|
||||
@@ -373,46 +380,46 @@
|
||||
<Option name="plugin bypass button: text active" value="c8c8d9ff"/>
|
||||
<Option name="punch button: fill start" value="603f3fff"/>
|
||||
<Option name="punch button: fill end" value="3d2828ff"/>
|
||||
<Option name="punch button: fill start active" value="fb0c0cff"/>
|
||||
<Option name="punch button: fill end active" value="b50f0fff"/>
|
||||
<Option name="punch button: fill start active" value="503010ff"/>
|
||||
<Option name="punch button: fill end active" value="f03020ff"/>
|
||||
<Option name="punch button: led" value="00000000"/>
|
||||
<Option name="punch button: led active" value="00000000"/>
|
||||
<Option name="punch button: text" value="a5a5a5ff"/>
|
||||
<Option name="punch button: text active" value="d8d8d8ff"/>
|
||||
<Option name="mouse mode button: fill start" value="6e8755ff"/>
|
||||
<Option name="mouse mode button: fill end" value="274e00ff"/>
|
||||
<Option name="mouse mode button: fill start active" value="c5ff95ff"/>
|
||||
<Option name="mouse mode button: fill start" value="636470ff"/>
|
||||
<Option name="mouse mode button: fill end" value="54555dff"/>
|
||||
<Option name="mouse mode button: fill start active" value="145409ff"/>
|
||||
<Option name="mouse mode button: fill end active" value="14ae08ff"/>
|
||||
<Option name="mouse mode button: led" value="4f3300ff"/>
|
||||
<Option name="mouse mode button: led active" value="ffa500ff"/>
|
||||
<Option name="mouse mode button: text" value="c7c7d8ff"/>
|
||||
<Option name="mouse mode button: text" value="f2f2f2ff"/>
|
||||
<Option name="mouse mode button: text active" value="000000ff"/>
|
||||
<Option name="zoom button: fill start" value="626370ff"/>
|
||||
<Option name="zoom button: fill end" value="4a4b51ff"/>
|
||||
<Option name="zoom button: fill start active" value="4d4d4dff"/>
|
||||
<Option name="zoom button: fill end active" value="121212ff"/>
|
||||
<Option name="zoom button: fill end" value="54555dff"/>
|
||||
<Option name="zoom button: fill start active" value="202025ff"/>
|
||||
<Option name="zoom button: fill end active" value="404045ff"/>
|
||||
<Option name="zoom button: led" value="4f3300ff"/>
|
||||
<Option name="zoom button: led active" value="ffa500ff"/>
|
||||
<Option name="zoom button: text" value="c7c7d8ff"/>
|
||||
<Option name="zoom button: text active" value="c8c8d9ff"/>
|
||||
<Option name="route button: fill start" value="56565dff"/>
|
||||
<Option name="route button: fill end" value="484856ff"/>
|
||||
<Option name="route button: fill start" value="565659ff"/>
|
||||
<Option name="route button: fill end" value="484853ff"/>
|
||||
<Option name="route button: fill start active" value="4d4d4dff"/>
|
||||
<Option name="route button: fill end active" value="121212ff"/>
|
||||
<Option name="route button: led" value="4f3300ff"/>
|
||||
<Option name="route button: led active" value="ffa500ff"/>
|
||||
<Option name="route button: text" value="c7c7d8ff"/>
|
||||
<Option name="route button: text active" value="c8c8d9ff"/>
|
||||
<Option name="mixer strip button: fill start" value="56565dff"/>
|
||||
<Option name="mixer strip button: fill end" value="484856ff"/>
|
||||
<Option name="mixer strip button: fill start active" value="ffd993ff"/>
|
||||
<Option name="mixer strip button: fill start" value="565659ff"/>
|
||||
<Option name="mixer strip button: fill end" value="484853ff"/>
|
||||
<Option name="mixer strip button: fill start active" value="5f4943ff"/>
|
||||
<Option name="mixer strip button: fill end active" value="ffa500ff"/>
|
||||
<Option name="mixer strip button: led" value="4f3300ff"/>
|
||||
<Option name="mixer strip button: led active" value="ffa500ff"/>
|
||||
<Option name="mixer strip button: text" value="c7c7d7ff"/>
|
||||
<Option name="mixer strip button: text" value="c7c7d8ff"/>
|
||||
<Option name="mixer strip button: text active" value="000000ff"/>
|
||||
<Option name="mixer strip name button: fill start" value="56565dff"/>
|
||||
<Option name="mixer strip name button: fill end" value="484856ff"/>
|
||||
<Option name="mixer strip name button: fill start" value="565659ff"/>
|
||||
<Option name="mixer strip name button: fill end" value="484853ff"/>
|
||||
<Option name="mixer strip name button: fill start active" value="4d4d4dff"/>
|
||||
<Option name="mixer strip name button: fill end active" value="121212ff"/>
|
||||
<Option name="mixer strip name button: led" value="4f3300ff"/>
|
||||
|
||||
@@ -361,6 +361,7 @@ widget "*processor fader" style:highest "processor"
|
||||
widget "*processor postfader" style:highest "processor"
|
||||
widget "*MonitorSectionLabel" style:highest "very_small_text"
|
||||
widget "*mute button" style:highest "monitor"
|
||||
widget "*invert button" style:highest "monitor"
|
||||
widget "*send alert button" style:highest "small_text"
|
||||
widget "*solo button" style:highest "monitor"
|
||||
widget "*rude solo" style:highest "small_text"
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
#define REFLECTION_HEIGHT 2
|
||||
|
||||
using namespace Gdk;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
@@ -57,7 +59,7 @@ ArdourButton::ArdourButton (Element e)
|
||||
, _text_width (0)
|
||||
, _text_height (0)
|
||||
, _diameter (11.0)
|
||||
, _corner_radius (5.0)
|
||||
, _corner_radius (4.0)
|
||||
, _corner_mask (0xf)
|
||||
, border_color (0)
|
||||
, fill_color_active (0)
|
||||
@@ -83,7 +85,7 @@ ArdourButton::ArdourButton (const std::string& str, Element e)
|
||||
, _text_width (0)
|
||||
, _text_height (0)
|
||||
, _diameter (11.0)
|
||||
, _corner_radius (5.0)
|
||||
, _corner_radius (4.0)
|
||||
, _corner_mask (0xf)
|
||||
, border_color (0)
|
||||
, fill_color_active (0)
|
||||
@@ -186,17 +188,14 @@ ArdourButton::render (cairo_t* cr)
|
||||
|
||||
float r,g,b,a;
|
||||
|
||||
if (_elements & Edge) {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
|
||||
UINT_TO_RGBA (border_color, &r, &g, &b, &a);
|
||||
//cairo_set_source_rgba (cr, r/255.0,g/255.0,b/255.0,a/255.0); //TODO: why doesn't this work?
|
||||
cairo_set_source_rgba (cr, 0,0,0,0.9);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
if (_elements & Body) {
|
||||
if ((_elements & Body)==Body) {
|
||||
if (_elements & Edge) {
|
||||
rounded_function (cr, 1, 1, get_width()-2, get_height()-2, _corner_radius - 1.0);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 1);
|
||||
rounded_function(cr, 0, 0, get_width(), get_height(), _corner_radius);
|
||||
cairo_fill (cr);
|
||||
|
||||
rounded_function (cr, 1, 1, get_width()-2, get_height()-2, _corner_radius - 1.5);
|
||||
} else {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
|
||||
}
|
||||
@@ -204,45 +203,55 @@ ArdourButton::render (cairo_t* cr)
|
||||
if (active_state() == Gtkmm2ext::ImplicitActive) {
|
||||
//background color
|
||||
cairo_set_source (cr, fill_pattern);
|
||||
cairo_fill_preserve (cr);
|
||||
cairo_fill (cr);
|
||||
|
||||
//border
|
||||
UINT_TO_RGBA (fill_color_active, &r, &g, &b, &a);
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
// rounded_function (cr, 3, 3, get_width()-6, get_height()-6, _corner_radius - 1.0);
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()-4, _corner_radius - 1.5);
|
||||
cairo_set_source_rgba (cr, r/255.0, g/255.0, b/255.0, a/255.0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
//reflection
|
||||
if (!_flat_buttons) {
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()/2-2, _corner_radius - 1.0);
|
||||
cairo_set_source (cr, shine_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
} else if (active_state() == Gtkmm2ext::ExplicitActive) {
|
||||
} else if (active_state() == Gtkmm2ext::ExplicitActive || ((_elements & Indicator)==Indicator) ) {
|
||||
|
||||
//background color
|
||||
cairo_set_source (cr, fill_pattern_active);
|
||||
cairo_fill (cr);
|
||||
|
||||
//reflection
|
||||
if (!_flat_buttons) {
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()/2-2, _corner_radius - 1.0);
|
||||
cairo_set_source (cr, shine_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
} else {
|
||||
|
||||
//background color
|
||||
cairo_set_source (cr, fill_pattern);
|
||||
cairo_fill (cr);
|
||||
|
||||
//reflection
|
||||
if (!_flat_buttons) {
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()/2-2, _corner_radius - 1.0);
|
||||
cairo_set_source (cr, shine_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ((_elements & FlatFace)==FlatFace) && (active_state() != Gtkmm2ext::ExplicitActive) ) {
|
||||
|
||||
if ( !_flat_buttons ) {
|
||||
float rheight = get_height()*0.5-REFLECTION_HEIGHT;
|
||||
Gtkmm2ext::rounded_rectangle (cr, 2, 3, get_width()-4, rheight, _corner_radius-1);
|
||||
cairo_set_source (cr, shine_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
if (active_state() == Gtkmm2ext::ExplicitActive) {
|
||||
|
||||
UINT_TO_RGBA (fill_color_active, &r, &g, &b, &a);
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()-4, _corner_radius - 2.0);
|
||||
cairo_set_source_rgba (cr, r/255.0, g/255.0, b/255.0, a/255.0);
|
||||
cairo_fill (cr);
|
||||
|
||||
} else {
|
||||
|
||||
UINT_TO_RGBA (fill_color_inactive, &r, &g, &b, &a);
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
rounded_function (cr, 2, 2, get_width()-4, get_height()-4, _corner_radius - 2.0);
|
||||
cairo_set_source_rgba (cr, r/255.0, g/255.0, b/255.0, a/255.0);
|
||||
cairo_fill (cr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +276,7 @@ ArdourButton::render (cairo_t* cr)
|
||||
text_margin = 10;
|
||||
}
|
||||
|
||||
if ((_elements & Text) && !_text.empty()) {
|
||||
if ( ((_elements & Text)==Text) && !_text.empty()) {
|
||||
|
||||
cairo_new_path (cr);
|
||||
|
||||
@@ -286,7 +295,7 @@ ArdourButton::render (cairo_t* cr)
|
||||
pango_cairo_show_layout (cr, _layout->gobj());
|
||||
}
|
||||
|
||||
if (_elements & Indicator) {
|
||||
if (((_elements & Indicator)==Indicator)) {
|
||||
|
||||
/* move to the center of the indicator/led */
|
||||
|
||||
@@ -317,14 +326,7 @@ ArdourButton::render (cairo_t* cr)
|
||||
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
|
||||
//reflection
|
||||
cairo_scale(cr, 0.7, 0.7);
|
||||
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
||||
cairo_set_source (cr, reflection_pattern);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +334,18 @@ ArdourButton::render (cairo_t* cr)
|
||||
|
||||
if ((visual_state() & Gtkmm2ext::Insensitive)) {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius);
|
||||
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.5);
|
||||
cairo_set_source_rgba (cr, 0.505, 0.517, 0.525, 0.5);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
//reflection
|
||||
bool show_reflection = (active_state() == Gtkmm2ext::ExplicitActive);
|
||||
show_reflection &= !_flat_buttons;
|
||||
show_reflection &= !((_elements & Indicator)==Indicator);
|
||||
if ( show_reflection ) {
|
||||
float rheight = get_height()*0.5-REFLECTION_HEIGHT;
|
||||
Gtkmm2ext::rounded_rectangle (cr, 2, get_height()*0.5-1, get_width()-4, rheight, _corner_radius-1);
|
||||
cairo_set_source (cr, shine_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
@@ -443,7 +456,6 @@ ArdourButton::set_colors ()
|
||||
|
||||
if (_elements & Body) {
|
||||
|
||||
shine_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height()/2-2);
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", get_name()));
|
||||
|
||||
if (_flat_buttons) {
|
||||
@@ -458,8 +470,10 @@ ArdourButton::set_colors ()
|
||||
active_b = b/255.0;
|
||||
active_a = a/255.0;
|
||||
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0, 1,1,1,0.1);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.2, 1,1,1,0.4);
|
||||
shine_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0, 1,1,1,0.0);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.5, 1,1,1,0.1);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 0.7, 1,1,1,0.2);
|
||||
cairo_pattern_add_color_stop_rgba (shine_pattern, 1, 1,1,1,0.1);
|
||||
|
||||
fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height()-3);
|
||||
@@ -824,6 +838,13 @@ ArdourButton::set_elements (Element e)
|
||||
set_colors ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::add_elements (Element e)
|
||||
{
|
||||
_elements = (ArdourButton::Element) (_elements | e);
|
||||
set_colors ();
|
||||
}
|
||||
|
||||
void
|
||||
ArdourButton::set_flat_buttons (bool yn)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __gtk2_ardour_ardour_button_h__
|
||||
@@ -38,6 +37,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
Body = 0x2,
|
||||
Text = 0x4,
|
||||
Indicator = 0x8,
|
||||
FlatFace = 0x10,
|
||||
};
|
||||
|
||||
static Element default_elements;
|
||||
@@ -53,7 +53,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
|
||||
enum Tweaks {
|
||||
ShowClick = 0x1,
|
||||
NoModel = 0x4,
|
||||
NoModel = 0x2,
|
||||
};
|
||||
|
||||
Tweaks tweaks() const { return _tweaks; }
|
||||
@@ -64,6 +64,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
|
||||
Element elements() const { return _elements; }
|
||||
void set_elements (Element);
|
||||
void add_elements (Element);
|
||||
|
||||
void set_corner_radius (float);
|
||||
void set_rounded_corner_mask (int);
|
||||
@@ -116,6 +117,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
||||
float _corner_radius;
|
||||
int _corner_mask;
|
||||
|
||||
uint32_t bg_color;
|
||||
uint32_t border_color;
|
||||
uint32_t fill_color_active;
|
||||
uint32_t fill_color_inactive;
|
||||
|
||||
@@ -241,8 +241,10 @@ ARDOUR_UI::setup_transport ()
|
||||
static_cast<Widget*> (&transport_frame), 1));
|
||||
|
||||
auto_return_button.set_text(_("Auto Return"));
|
||||
|
||||
follow_edits_button.set_text(_("Follow Edits"));
|
||||
auto_input_button.set_text (_("Auto Input"));
|
||||
|
||||
// auto_input_button.set_text (_("Auto Input"));
|
||||
|
||||
click_button.set_image (get_icon (X_("metronome")));
|
||||
act = ActionManager::get_action ("Transport", "ToggleClick");
|
||||
@@ -335,6 +337,8 @@ ARDOUR_UI::setup_transport ()
|
||||
transport_button_size_group->add_widget (roll_button);
|
||||
transport_button_size_group->add_widget (stop_button);
|
||||
|
||||
goto_start_button.set_size_request (-1, 40);
|
||||
|
||||
HBox* tbox1 = manage (new HBox);
|
||||
HBox* tbox2 = manage (new HBox);
|
||||
HBox* tbox = manage (new HBox);
|
||||
@@ -349,15 +353,12 @@ ARDOUR_UI::setup_transport ()
|
||||
tbox2->set_spacing (2);
|
||||
tbox->set_spacing (2);
|
||||
|
||||
tbox1->pack_start (midi_panic_button, false, false, 5);
|
||||
tbox1->pack_start (click_button, false, false, 5);
|
||||
tbox1->pack_start (midi_panic_button, false, false);
|
||||
tbox1->pack_start (goto_start_button, false, false);
|
||||
tbox1->pack_start (goto_end_button, false, false);
|
||||
tbox1->pack_start (auto_loop_button, false, false);
|
||||
|
||||
play_selection_button.set_rounded_corner_mask (0x1); /* upper left only */
|
||||
roll_button.set_rounded_corner_mask (0x2); /* upper right only */
|
||||
|
||||
tbox2->pack_start (play_selection_button, false, false);
|
||||
tbox2->pack_start (roll_button, false, false);
|
||||
tbox2->pack_start (stop_button, false, false);
|
||||
@@ -387,7 +388,7 @@ ARDOUR_UI::setup_transport ()
|
||||
|
||||
VBox* transport_vbox = manage (new VBox);
|
||||
transport_vbox->set_name ("TransportBase");
|
||||
transport_vbox->set_border_width (3);
|
||||
transport_vbox->set_border_width (0);
|
||||
transport_vbox->set_spacing (3);
|
||||
transport_vbox->pack_start (*tbox, true, true, 0);
|
||||
transport_vbox->pack_start (*shuttle_box, false, false, 0);
|
||||
|
||||
@@ -85,7 +85,7 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
|
||||
, info_height (0)
|
||||
, upper_height (0)
|
||||
, mode_based_info_ratio (1.0)
|
||||
, corner_radius (9)
|
||||
, corner_radius (4)
|
||||
, font_size (10240)
|
||||
, editing (false)
|
||||
, bbt_reference_time (-1)
|
||||
@@ -94,7 +94,6 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
|
||||
, last_sdelta (0)
|
||||
, dragging (false)
|
||||
, drag_field (Field (0))
|
||||
|
||||
{
|
||||
set_flags (CAN_FOCUS);
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
||||
controls_table.attach (auto_button, 6, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
|
||||
if (_controller) {
|
||||
_controller.get()->set_size_request(-1, 24);
|
||||
/* add bar controller */
|
||||
controls_table.attach (*_controller.get(), 0, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
/* note that this handler connects *before* the default handler */
|
||||
|
||||
@@ -171,6 +171,7 @@ BUTTON_VARS(RudeSolo, "rude solo")
|
||||
BUTTON_VARS(RudeIsolate, "rude isolate")
|
||||
BUTTON_VARS(RudeAudition, "rude audition")
|
||||
BUTTON_VARS(FeedbackAlert, "feedback alert")
|
||||
BUTTON_VARS(InvertButton, "invert button")
|
||||
BUTTON_VARS(MuteButton, "mute button")
|
||||
BUTTON_VARS(SoloButton, "solo button")
|
||||
BUTTON_VARS(RecEnableButton, "record enable button")
|
||||
|
||||
@@ -652,11 +652,13 @@ Editor::Editor ()
|
||||
|
||||
/* nudge stuff */
|
||||
|
||||
nudge_forward_button.add (*(manage (new Image (::get_icon("nudge_right")))));
|
||||
nudge_backward_button.add (*(manage (new Image (::get_icon("nudge_left")))));
|
||||
nudge_forward_button.set_name ("zoom button");
|
||||
nudge_forward_button.add_elements (ArdourButton::FlatFace);
|
||||
nudge_forward_button.set_image(::get_icon("nudge_right"));
|
||||
|
||||
nudge_forward_button.set_name ("TransportButton");
|
||||
nudge_backward_button.set_name ("TransportButton");
|
||||
nudge_backward_button.set_name ("zoom button");
|
||||
nudge_backward_button.add_elements (ArdourButton::FlatFace);
|
||||
nudge_backward_button.set_image(::get_icon("nudge_left"));
|
||||
|
||||
fade_context_menu.set_name ("ArdourContextMenu");
|
||||
|
||||
@@ -2857,7 +2859,7 @@ Editor::setup_toolbar ()
|
||||
mouse_mode_size_group->add_widget (internal_edit_button);
|
||||
|
||||
/* make them just a bit bigger */
|
||||
mouse_move_button.set_size_request (-1, 25);
|
||||
mouse_move_button.set_size_request (-1, 30);
|
||||
|
||||
mouse_mode_hbox->set_spacing (2);
|
||||
|
||||
@@ -2916,19 +2918,25 @@ Editor::setup_toolbar ()
|
||||
RefPtr<Action> act;
|
||||
|
||||
zoom_in_button.set_name ("zoom button");
|
||||
zoom_in_button.add (*(manage (new Image (::get_icon ("zoom_in")))));
|
||||
zoom_in_button.add_elements ( ArdourButton::FlatFace );
|
||||
zoom_in_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_in_button.set_image(::get_icon ("zoom_in"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-in"));
|
||||
act->connect_proxy (zoom_in_button);
|
||||
zoom_in_button.set_related_action (act);
|
||||
|
||||
zoom_out_button.set_name ("zoom button");
|
||||
zoom_out_button.add (*(manage (new Image (::get_icon ("zoom_out")))));
|
||||
zoom_out_button.add_elements ( ArdourButton::FlatFace );
|
||||
zoom_out_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_out_button.set_image(::get_icon ("zoom_out"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("temporal-zoom-out"));
|
||||
act->connect_proxy (zoom_out_button);
|
||||
zoom_out_button.set_related_action (act);
|
||||
|
||||
zoom_out_full_button.set_name ("zoom button");
|
||||
zoom_out_full_button.add (*(manage (new Image (::get_icon ("zoom_full")))));
|
||||
zoom_out_full_button.add_elements ( ArdourButton::FlatFace );
|
||||
zoom_out_full_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
zoom_out_full_button.set_image(::get_icon ("zoom_full"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("zoom-to-session"));
|
||||
act->connect_proxy (zoom_out_full_button);
|
||||
zoom_out_full_button.set_related_action (act);
|
||||
|
||||
zoom_focus_selector.set_name ("ZoomFocusSelector");
|
||||
set_popdown_strings (zoom_focus_selector, zoom_focus_strings);
|
||||
@@ -2941,17 +2949,21 @@ Editor::setup_toolbar ()
|
||||
_zoom_box.pack_start (zoom_focus_selector, false, false);
|
||||
|
||||
/* Track zoom buttons */
|
||||
tav_expand_button.set_name ("TrackHeightButton");
|
||||
tav_expand_button.set_name ("zoom button");
|
||||
tav_expand_button.add_elements ( ArdourButton::FlatFace );
|
||||
tav_expand_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
tav_expand_button.set_size_request (-1, 20);
|
||||
tav_expand_button.add (*(manage (new Image (::get_icon ("tav_exp")))));
|
||||
tav_expand_button.set_image(::get_icon ("tav_exp"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("expand-tracks"));
|
||||
act->connect_proxy (tav_expand_button);
|
||||
tav_expand_button.set_related_action (act);
|
||||
|
||||
tav_shrink_button.set_name ("TrackHeightButton");
|
||||
tav_shrink_button.set_name ("zoom button");
|
||||
tav_shrink_button.add_elements ( ArdourButton::FlatFace );
|
||||
tav_shrink_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
tav_shrink_button.set_size_request (-1, 20);
|
||||
tav_shrink_button.add (*(manage (new Image (::get_icon ("tav_shrink")))));
|
||||
tav_shrink_button.set_image(::get_icon ("tav_shrink"));
|
||||
act = ActionManager::get_action (X_("Editor"), X_("shrink-tracks"));
|
||||
act->connect_proxy (tav_shrink_button);
|
||||
tav_shrink_button.set_related_action (act);
|
||||
|
||||
_zoom_box.pack_start (tav_shrink_button);
|
||||
_zoom_box.pack_start (tav_expand_button);
|
||||
@@ -2967,7 +2979,7 @@ Editor::setup_toolbar ()
|
||||
_zoom_tearoff->Visible.connect (sigc::bind (sigc::mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
|
||||
&_zoom_tearoff->tearoff_window(), 0));
|
||||
|
||||
snap_box.set_spacing (1);
|
||||
snap_box.set_spacing (2);
|
||||
snap_box.set_border_width (2);
|
||||
|
||||
snap_type_selector.set_name ("SnapTypeSelector");
|
||||
@@ -2995,6 +3007,9 @@ Editor::setup_toolbar ()
|
||||
nudge_forward_button.signal_button_release_event().connect (sigc::mem_fun(*this, &Editor::nudge_forward_release), false);
|
||||
nudge_backward_button.signal_button_release_event().connect (sigc::mem_fun(*this, &Editor::nudge_backward_release), false);
|
||||
|
||||
nudge_forward_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
nudge_backward_button.set_tweaks ((ArdourButton::Tweaks) (ArdourButton::ShowClick) );
|
||||
|
||||
nudge_box->pack_start (nudge_backward_button, false, false);
|
||||
nudge_box->pack_start (nudge_forward_button, false, false);
|
||||
nudge_box->pack_start (*nudge_clock, false, false);
|
||||
|
||||
@@ -1569,12 +1569,13 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||
void editor_list_button_toggled ();
|
||||
|
||||
AudioClock* zoom_range_clock;
|
||||
Gtk::Button zoom_in_button;
|
||||
Gtk::Button zoom_out_button;
|
||||
Gtk::Button zoom_out_full_button;
|
||||
|
||||
Gtk::Button tav_expand_button;
|
||||
Gtk::Button tav_shrink_button;
|
||||
ArdourButton zoom_in_button;
|
||||
ArdourButton zoom_out_button;
|
||||
ArdourButton zoom_out_full_button;
|
||||
|
||||
ArdourButton tav_expand_button;
|
||||
ArdourButton tav_shrink_button;
|
||||
|
||||
Gtk::VBox toolbar_clock_vbox;
|
||||
Gtk::VBox toolbar_selection_clock_vbox;
|
||||
@@ -1931,8 +1932,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||
|
||||
/* nudge */
|
||||
|
||||
Gtk::Button nudge_forward_button;
|
||||
Gtk::Button nudge_backward_button;
|
||||
ArdourButton nudge_forward_button;
|
||||
ArdourButton nudge_backward_button;
|
||||
Gtk::HBox nudge_hbox;
|
||||
Gtk::VBox nudge_vbox;
|
||||
AudioClock* nudge_clock;
|
||||
|
||||
@@ -408,41 +408,49 @@ Editor::register_actions ()
|
||||
smart_mode_action = Glib::RefPtr<ToggleAction>::cast_static (act);
|
||||
smart_mode_button.set_related_action (smart_mode_action);
|
||||
smart_mode_button.set_text (_("Smart"));
|
||||
smart_mode_button.add_elements ( ArdourButton::FlatFace );
|
||||
smart_mode_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject));
|
||||
mouse_move_button.set_related_action (act);
|
||||
mouse_move_button.set_image (::get_icon("tool_object"));
|
||||
mouse_move_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_move_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange));
|
||||
mouse_select_button.set_related_action (act);
|
||||
mouse_select_button.set_image (::get_icon("tool_range"));
|
||||
mouse_select_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_select_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw));
|
||||
mouse_draw_button.set_related_action (act);
|
||||
mouse_draw_button.set_image (::get_icon("midi_tool_pencil"));
|
||||
mouse_draw_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_draw_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("Gain Tool"), sigc::bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseGain));
|
||||
mouse_gain_button.set_related_action (act);
|
||||
mouse_gain_button.set_image (::get_icon("tool_gain"));
|
||||
mouse_gain_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_gain_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("Zoom Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseZoom));
|
||||
mouse_zoom_button.set_related_action (act);
|
||||
mouse_zoom_button.set_image (::get_icon("tool_zoom"));
|
||||
mouse_zoom_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_zoom_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition));
|
||||
mouse_audition_button.set_related_action (act);
|
||||
mouse_audition_button.set_image (::get_icon("tool_audition"));
|
||||
mouse_audition_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_audition_button.set_name ("mouse mode button");
|
||||
|
||||
act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX));
|
||||
mouse_timefx_button.set_related_action (act);
|
||||
mouse_timefx_button.set_image (::get_icon("tool_stretch"));
|
||||
mouse_timefx_button.add_elements ( ArdourButton::FlatFace );
|
||||
mouse_timefx_button.set_name ("mouse mode button");
|
||||
|
||||
ActionManager::register_action (editor_actions, "step-mouse-mode", _("Step Mouse Mode"), sigc::bind (sigc::mem_fun(*this, &Editor::step_mouse_mode), true));
|
||||
@@ -450,6 +458,7 @@ Editor::register_actions ()
|
||||
act = ActionManager::register_toggle_action (mouse_mode_actions, "toggle-internal-edit", _("Edit MIDI"), sigc::mem_fun(*this, &Editor::toggle_internal_editing));
|
||||
internal_edit_button.set_related_action (act);
|
||||
internal_edit_button.set_image (::get_icon("tool_note"));
|
||||
internal_edit_button.add_elements ( ArdourButton::FlatFace );
|
||||
internal_edit_button.set_name ("mouse mode button");
|
||||
|
||||
RadioAction::Group edit_point_group;
|
||||
|
||||
@@ -155,6 +155,7 @@ MixerStrip::init ()
|
||||
|
||||
input_button.set_text (_("Input"));
|
||||
input_button.set_name ("mixer strip button");
|
||||
input_button.set_size_request (-1, 20);
|
||||
input_button_box.pack_start (input_button, true, true);
|
||||
|
||||
output_button.set_text (_("Output"));
|
||||
@@ -243,12 +244,13 @@ MixerStrip::init ()
|
||||
bottom_button_table.set_homogeneous (true);
|
||||
bottom_button_table.attach (group_button, 0, 1, 0, 1);
|
||||
|
||||
name_button.set_name ("mixer strip name button");
|
||||
name_button.set_name ("mixer strip button");
|
||||
name_button.set_text (" "); /* non empty text, forces creation of the layout */
|
||||
name_button.set_text (""); /* back to empty */
|
||||
name_button.layout()->set_ellipsize (Pango::ELLIPSIZE_END);
|
||||
name_button.signal_size_allocate().connect (sigc::mem_fun (*this, &MixerStrip::name_button_resized));
|
||||
Gtkmm2ext::set_size_request_to_display_given_text (name_button, longest_label.c_str(), 2, 2);
|
||||
name_button.set_size_request (-1, 20);
|
||||
|
||||
ARDOUR_UI::instance()->set_tip (&group_button, _("Mix group"), "");
|
||||
group_button.set_name ("mixer strip button");
|
||||
|
||||
@@ -1787,10 +1787,11 @@ RouteUI::setup_invert_buttons ()
|
||||
|
||||
for (uint32_t i = 0; i < to_add; ++i) {
|
||||
ArdourButton* b = manage (new ArdourButton);
|
||||
b->set_size_request(20,20);
|
||||
b->signal_button_press_event().connect (sigc::mem_fun (*this, &RouteUI::invert_press));
|
||||
b->signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_release), i));
|
||||
|
||||
b->set_name (X_("mixer strip button"));
|
||||
b->set_name (X_("invert button"));
|
||||
if (to_add == 1) {
|
||||
if (N > 1) {
|
||||
b->set_text (string_compose (X_("Ø (%1)"), N));
|
||||
|
||||
@@ -146,7 +146,7 @@ StereoPanner::on_expose_event (GdkEventExpose*)
|
||||
/* background */
|
||||
|
||||
context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
|
||||
rounded_rectangle (context, 0, 0, width, height, corner_radius);
|
||||
cairo_rectangle (context->cobj(), 0, 0, width, height);
|
||||
context->fill ();
|
||||
|
||||
/* the usable width is reduced from the real width, because we need space for
|
||||
|
||||
@@ -81,11 +81,18 @@ BarController::BarController (Gtk::Adjustment& adj,
|
||||
spinner.signal_output().connect (mem_fun (*this, &BarController::entry_output));
|
||||
spinner.set_digits (9);
|
||||
spinner.set_numeric (true);
|
||||
|
||||
|
||||
add (darea);
|
||||
|
||||
show_all ();
|
||||
}
|
||||
|
||||
BarController::~BarController ()
|
||||
{
|
||||
// delete pattern;
|
||||
// delete shine_pattern;
|
||||
}
|
||||
|
||||
void
|
||||
BarController::drop_grab ()
|
||||
{
|
||||
@@ -263,17 +270,53 @@ BarController::mouse_control (double x, GdkWindow* window, double scaling)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
BarController::create_patterns ()
|
||||
{
|
||||
Glib::RefPtr<Gdk::Window> win (darea.get_window());
|
||||
Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
|
||||
|
||||
Gdk::Color c = get_style()->get_fg (get_state());
|
||||
float r, g, b;
|
||||
r = c.get_red_p ();
|
||||
g = c.get_green_p ();
|
||||
b = c.get_blue_p ();
|
||||
|
||||
float rheight = darea.get_height()-2;
|
||||
|
||||
cairo_pattern_t* pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, rheight);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0, r*0.3,g*0.3,b*0.3, 1.0);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 1, r, g, b, 1.0);
|
||||
Cairo::RefPtr<Cairo::Pattern> p (new Cairo::Pattern (pat, false));
|
||||
pattern = p;
|
||||
cairo_pattern_destroy(pat);
|
||||
|
||||
pat = cairo_pattern_create_linear (0.0, 0.0, 0.0, rheight);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0, 1,1,1,0.0);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0.2, 1,1,1,0.3);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 0.5, 1,1,1,0.0);
|
||||
cairo_pattern_add_color_stop_rgba (pat, 1, 1,1,1,0.0);
|
||||
Cairo::RefPtr<Cairo::Pattern> p2 (new Cairo::Pattern (pat, false));
|
||||
shine_pattern = p2;
|
||||
cairo_pattern_destroy(pat);
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
BarController::expose (GdkEventExpose* /*event*/)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Window> win (darea.get_window());
|
||||
Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
|
||||
Gdk::Color c;
|
||||
Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
|
||||
|
||||
if( !pattern )
|
||||
create_patterns();
|
||||
|
||||
Gdk::Color c;
|
||||
Widget* parent;
|
||||
gint x1=0, x2=0, y1=0, y2=0;
|
||||
gint w, h;
|
||||
double fract;
|
||||
float r, g, b;
|
||||
double fract, radius;
|
||||
float r, g, b;
|
||||
|
||||
fract = ((adjustment.get_value() - adjustment.get_lower()) /
|
||||
(adjustment.get_upper() - adjustment.get_lower()));
|
||||
@@ -396,20 +439,19 @@ BarController::expose (GdkEventExpose* /*event*/)
|
||||
w = darea.get_width() - 2;
|
||||
h = darea.get_height() - 2;
|
||||
|
||||
x1 = 0;
|
||||
x2 = (gint) floor (w * fract);
|
||||
y1 = 0;
|
||||
x2 = (gint) floor (w * (0.1+0.9*fract));
|
||||
y2 = h;
|
||||
radius = 4;
|
||||
|
||||
/* bounding box */
|
||||
/* border */
|
||||
|
||||
c = get_style()->get_bg (get_state());
|
||||
r = c.get_red_p ();
|
||||
g = c.get_green_p ();
|
||||
b = c.get_blue_p ();
|
||||
context->set_source_rgb (r, g, b);
|
||||
rounded_rectangle (context, 0, 0, darea.get_width(), darea.get_height());
|
||||
context->stroke ();
|
||||
context->set_source_rgb (0,0,0);
|
||||
rounded_rectangle (context, 0, 0, darea.get_width(), darea.get_height() , radius);
|
||||
context->fill ();
|
||||
|
||||
/* draw active box */
|
||||
|
||||
@@ -417,19 +459,23 @@ BarController::expose (GdkEventExpose* /*event*/)
|
||||
r = c.get_red_p ();
|
||||
g = c.get_green_p ();
|
||||
b = c.get_blue_p ();
|
||||
context->set_source_rgb (r, g, b);
|
||||
rounded_rectangle (context, 1 + x1, 1 + y1, x2, y2);
|
||||
context->set_source (pattern);
|
||||
rounded_rectangle (context, 1, 1, x2, y2, radius-1.5);
|
||||
context->fill ();
|
||||
|
||||
context->set_source (shine_pattern);
|
||||
rounded_rectangle (context, 2, 3, x2-2, y2-8, radius-2);
|
||||
context->fill ();
|
||||
|
||||
/* draw inactive box */
|
||||
|
||||
c = get_style()->get_fg (STATE_INSENSITIVE);
|
||||
r = c.get_red_p ();
|
||||
g = c.get_green_p ();
|
||||
b = c.get_blue_p ();
|
||||
context->set_source_rgb (r, g, b);
|
||||
rounded_rectangle (context, 1 + x2, 1 + y1, w - x2, y2);
|
||||
context->fill ();
|
||||
// c = get_style()->get_fg (STATE_INSENSITIVE);
|
||||
// r = c.get_red_p ();
|
||||
// g = c.get_green_p ();
|
||||
// b = c.get_blue_p ();
|
||||
// context->set_source_rgb (r, g, b);
|
||||
// rounded_rectangle (context, 1 + x2, 1 + y1, w - x2, y2);
|
||||
// context->fill ();
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ CairoPacker::draw_background (Gtk::Widget& w, GdkEventExpose*)
|
||||
Gdk::Color bg = get_bg ();
|
||||
|
||||
context->set_source_rgba (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p(), 1.0);
|
||||
Gtkmm2ext::rounded_rectangle (context, x, y, w.get_allocation().get_width(), w.get_allocation().get_height(), 9);
|
||||
Gtkmm2ext::rounded_rectangle (context, x, y, w.get_allocation().get_width(), w.get_allocation().get_height(), 4);
|
||||
context->fill ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <gtkmm/frame.h>
|
||||
#include <gtkmm/drawingarea.h>
|
||||
#include <gtkmm2ext/binding_proxy.h>
|
||||
#include <cairo.h>
|
||||
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
@@ -31,7 +32,7 @@ class BarController : public Gtk::Frame
|
||||
public:
|
||||
BarController (Gtk::Adjustment& adj, boost::shared_ptr<PBD::Controllable>);
|
||||
|
||||
virtual ~BarController () {}
|
||||
virtual ~BarController ();
|
||||
|
||||
enum barStyle {
|
||||
LeftToRight,
|
||||
@@ -89,6 +90,10 @@ class BarController : public Gtk::Frame
|
||||
return "";
|
||||
}
|
||||
|
||||
void create_patterns();
|
||||
Cairo::RefPtr<Cairo::Pattern> pattern;
|
||||
Cairo::RefPtr<Cairo::Pattern> shine_pattern;
|
||||
|
||||
virtual bool button_press (GdkEventButton *);
|
||||
virtual bool button_release (GdkEventButton *);
|
||||
virtual bool motion (GdkEventMotion *);
|
||||
|
||||
@@ -40,6 +40,8 @@ class PixFader : public Gtk::DrawingArea
|
||||
|
||||
void set_default_value (float);
|
||||
|
||||
void create_patterns ();
|
||||
|
||||
protected:
|
||||
Gtk::Adjustment& adjustment;
|
||||
|
||||
@@ -69,6 +71,10 @@ class PixFader : public Gtk::DrawingArea
|
||||
Cairo::RefPtr<Cairo::Context> belt_context[STATES];
|
||||
Cairo::RefPtr<Cairo::ImageSurface> belt_surface[STATES];
|
||||
Glib::RefPtr<Gdk::Pixbuf> pixbuf[STATES];
|
||||
|
||||
Cairo::RefPtr<Cairo::Pattern> pattern;
|
||||
Cairo::RefPtr<Cairo::Pattern> shine_pattern;
|
||||
|
||||
int span, girth;
|
||||
int _orien;
|
||||
float left_r;
|
||||
|
||||
@@ -417,76 +417,54 @@ Gtkmm2ext::rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context> context,
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
G D
|
||||
F****E
|
||||
*/
|
||||
cairo_move_to (cr, x+r,y); // Move to A
|
||||
cairo_line_to (cr, x+w-r,y); // Straight line to B
|
||||
cairo_curve_to (cr, x+w,y,x+w,y,x+w,y+r); // Curve to C, Control points are both at Q
|
||||
cairo_line_to (cr, x+w,y+h-r); // Move to D
|
||||
cairo_curve_to (cr, x+w,y+h,x+w,y+h,x+w-r,y+h); // Curve to E
|
||||
cairo_line_to (cr, x+r,y+h); // Line to F
|
||||
cairo_curve_to (cr, x,y+h,x,y+h,x,y+h-r); // Curve to G
|
||||
cairo_line_to (cr, x,y+r); // Line to H
|
||||
cairo_curve_to (cr, x,y,x,y,x+r,y); // Curve to A
|
||||
double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
cairo_arc (cr, x + w - r, y + h - r, r, 0 * degrees, 90 * degrees); //br
|
||||
cairo_arc (cr, x + r, y + h - r, r, 90 * degrees, 180 * degrees); //bl
|
||||
cairo_arc (cr, x + r, y + r, r, 180 * degrees, 270 * degrees); //tl
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
G D
|
||||
F****E
|
||||
*/
|
||||
cairo_move_to (cr, x+r,y); // Move to A
|
||||
cairo_line_to (cr, x+w-r,y); // Straight line to B
|
||||
cairo_curve_to (cr, x+w,y,x+w,y,x+w,y+r); // Curve to C, Control points are both at Q
|
||||
cairo_line_to (cr, x+w,y+h); // Move to E
|
||||
cairo_line_to (cr, x,y+h); // Line to F
|
||||
cairo_line_to (cr, x,y+r); // Line to H
|
||||
cairo_curve_to (cr, x,y,x,y,x+r,y); // Curve to A
|
||||
double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x+w, y+h);
|
||||
cairo_line_to (cr, x, y+h);
|
||||
cairo_arc (cr, x + r, y + r, r, 180 * degrees, 270 * degrees); //tl
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_bottom_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
G D
|
||||
F****E
|
||||
*/
|
||||
cairo_move_to (cr, x,y); // Move to A
|
||||
cairo_line_to (cr, x+w,y); // Straight line to B
|
||||
cairo_line_to (cr, x+w,y+h-r); // Move to D
|
||||
cairo_curve_to (cr, x+w,y+h,x+w,y+h,x+w-r,y+h); // Curve to E
|
||||
cairo_line_to (cr, x+r,y+h); // Line to F
|
||||
cairo_curve_to (cr, x,y+h,x,y+h,x,y+h-r); // Curve to G
|
||||
cairo_line_to (cr, x,y); // Line to A
|
||||
double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x, y);
|
||||
cairo_line_to (cr, x+w, y);
|
||||
cairo_arc (cr, x + w - r, y + h - r, r, 0 * degrees, 90 * degrees); //br
|
||||
cairo_arc (cr, x + r, y + h - r, r, 90 * degrees, 180 * degrees); //bl
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
* *
|
||||
F****E
|
||||
*/
|
||||
cairo_move_to (cr, x+r,y); // Move to A
|
||||
cairo_line_to (cr, x+w-r,y); // Straight line to B
|
||||
cairo_curve_to (cr, x+w,y,x+w,y,x+w,y+r); // Curve to C, Control points are both at Q
|
||||
cairo_line_to (cr, x+w,y+h); // Move to E
|
||||
cairo_line_to (cr, x,y+h); // Line to F
|
||||
cairo_line_to (cr, x,y+r); // Line to H
|
||||
cairo_curve_to (cr, x,y,x,y,x+r,y); // Curve to A
|
||||
double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x+w, y+h);
|
||||
cairo_line_to (cr, x, y+h);
|
||||
cairo_arc (cr, x + r, y + r, r, 180 * degrees, 270 * degrees); //tl
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user