mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
remove additional "mid" color from ArdourButton; replace Active/Mid widget state with ExplicitActive/ImplicitActive; represent implicit-active state with colored border around ArdourButton; tune button colors; new rounded_foo() functions, some in use, some not in use right now
git-svn-id: svn://localhost/ardour2/branches/3.0@11466 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
86a9d45ad0
commit
b08d13706f
23 changed files with 310 additions and 409 deletions
|
|
@ -151,14 +151,10 @@
|
|||
<Option name="processor prefader: fill end" value="542525ff"/>
|
||||
<Option name="processor prefader: fill start active" value="873c3cff"/>
|
||||
<Option name="processor prefader: fill end active" value="542525ff"/>
|
||||
<Option name="processor prefader: fill start mid" value="873c3cff"/>
|
||||
<Option name="processor prefader: fill end mid" value="542525ff"/>
|
||||
<Option name="processor prefader: led" value="26550eff"/>
|
||||
<Option name="processor prefader: led active" value="78cb4eff"/>
|
||||
<Option name="processor prefader: led mid" value="26550eff"/>
|
||||
<Option name="processor prefader: text" value="aaaaa3ff"/>
|
||||
<Option name="processor prefader: text active" value="eeeeecff"/>
|
||||
<Option name="processor prefader: text mid" value="aaaaa3ff"/>
|
||||
<Option name="processor fader: border start" value="7cb5d9ff"/>
|
||||
<Option name="processor fader: border end" value="6493b0ff"/>
|
||||
<Option name="processor fader: border start selected" value="cdfaf8ff"/>
|
||||
|
|
@ -167,14 +163,10 @@
|
|||
<Option name="processor fader: fill end" value="154c6eff"/>
|
||||
<Option name="processor fader: fill start active" value="5d90b0ff"/>
|
||||
<Option name="processor fader: fill end active" value="154d6fff"/>
|
||||
<Option name="processor fader: fill start mid" value="5d90b0ff"/>
|
||||
<Option name="processor fader: fill end mid" value="154d6fff"/>
|
||||
<Option name="processor fader: led" value="26550eff"/>
|
||||
<Option name="processor fader: led active" value="78cb4eff"/>
|
||||
<Option name="processor fader: led mid" value="26550eff"/>
|
||||
<Option name="processor fader: text" value="aaaaa3ff"/>
|
||||
<Option name="processor fader: text active" value="eeeeecff"/>
|
||||
<Option name="processor fader: text mid" value="aaaaa3ff"/>
|
||||
<Option name="processor postfader: border start" value="1d631dff"/>
|
||||
<Option name="processor postfader: border end" value="1d631dff"/>
|
||||
<Option name="processor postfader: border start selected" value="46f046ff"/>
|
||||
|
|
@ -183,14 +175,10 @@
|
|||
<Option name="processor postfader: fill end" value="202d23ff"/>
|
||||
<Option name="processor postfader: fill start active" value="415947ff"/>
|
||||
<Option name="processor postfader: fill end active" value="202d23ff"/>
|
||||
<Option name="processor postfader: fill start mid" value="415947ff"/>
|
||||
<Option name="processor postfader: fill end mid" value="202d23ff"/>
|
||||
<Option name="processor postfader: led" value="26550eff"/>
|
||||
<Option name="processor postfader: led active" value="78cb4eff"/>
|
||||
<Option name="processor postfader: led mid" value="26550eff"/>
|
||||
<Option name="processor postfader: text" value="aaaaa3ff"/>
|
||||
<Option name="processor postfader: text active" value="eeeeecff"/>
|
||||
<Option name="processor postfader: text mid" value="aaaaa3ff"/>
|
||||
<Option name="processor control button: border start" value="000000ff"/>
|
||||
<Option name="processor control button: border end" value="000000ff"/>
|
||||
<Option name="processor control button: border start selected" value="000000ff"/>
|
||||
|
|
@ -199,30 +187,22 @@
|
|||
<Option name="processor control button: fill end" value="000000ff"/>
|
||||
<Option name="processor control button: fill start active" value="000000ff"/>
|
||||
<Option name="processor control button: fill end active" value="000000ff"/>
|
||||
<Option name="processor control button: fill start mid" value="000000ff"/>
|
||||
<Option name="processor control button: fill end mid" value="000000ff"/>
|
||||
<Option name="processor control button: led" value="000000ff"/>
|
||||
<Option name="processor control button: led active" value="ff0000ff"/>
|
||||
<Option name="processor control button: led mid" value="000000ff"/>
|
||||
<Option name="processor control button: text" value="ffffffff"/>
|
||||
<Option name="processor control button: text active" value="ffffffff"/>
|
||||
<Option name="processor control button: text mid" value="ffffffff"/>
|
||||
<Option name="monitor: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor: border end" value="000000ff"/>
|
||||
<Option name="monitor: border start selected" value="9a908eff"/>
|
||||
<Option name="monitor: border end selected" value="675c5bff"/>
|
||||
<Option name="monitor: fill start" value="5d5856ff"/>
|
||||
<Option name="monitor: fill end" value="564d48ff"/>
|
||||
<Option name="monitor: fill start active" value="038901ff"/>
|
||||
<Option name="monitor: fill end active" value="004f00ff"/>
|
||||
<Option name="monitor: fill start mid" value="038a01ff"/>
|
||||
<Option name="monitor: fill end mid" value="004f00ff"/>
|
||||
<Option name="monitor: led" value="660000ff"/>
|
||||
<Option name="monitor: led active" value="ff0000ff"/>
|
||||
<Option name="monitor: led mid" value="660000ff"/>
|
||||
<Option name="monitor: text" value="aaaaa3ff"/>
|
||||
<Option name="monitor: text active" value="c6c6beff"/>
|
||||
<Option name="monitor: text mid" value="c7c7bfff"/>
|
||||
<Option name="monitor button: border start" value="889488ff"/>
|
||||
<Option name="monitor button: border end" value="004f00ff"/>
|
||||
<Option name="monitor button: border start selected" value="9a908eff"/>
|
||||
<Option name="monitor button: border end selected" value="675c5bff"/>
|
||||
<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: 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: border start" value="b7b7d2ff"/>
|
||||
<Option name="solo isolate: border end" value="000000ff"/>
|
||||
<Option name="solo isolate: border start selected" value="9a908eff"/>
|
||||
|
|
@ -231,14 +211,10 @@
|
|||
<Option name="solo isolate: fill end" value="564d48ff"/>
|
||||
<Option name="solo isolate: fill start active" value="5d5856ff"/>
|
||||
<Option name="solo isolate: fill end active" value="564d48ff"/>
|
||||
<Option name="solo isolate: fill start mid" value="5d5856ff"/>
|
||||
<Option name="solo isolate: fill end mid" value="564d48ff"/>
|
||||
<Option name="solo isolate: led" value="660000ff"/>
|
||||
<Option name="solo isolate: led active" value="ff0000ff"/>
|
||||
<Option name="solo isolate: led mid" value="660000ff"/>
|
||||
<Option name="solo isolate: text" value="c7c7d8ff"/>
|
||||
<Option name="solo isolate: text active" value="c8c8d9ff"/>
|
||||
<Option name="solo isolate: text mid" value="000000ff"/>
|
||||
<Option name="solo safe: border start" value="b7b7d2ff"/>
|
||||
<Option name="solo safe: border end" value="000000ff"/>
|
||||
<Option name="solo safe: border start selected" value="9a908eff"/>
|
||||
|
|
@ -247,14 +223,10 @@
|
|||
<Option name="solo safe: fill end" value="564d48ff"/>
|
||||
<Option name="solo safe: fill start active" value="5d5856ff"/>
|
||||
<Option name="solo safe: fill end active" value="564d48ff"/>
|
||||
<Option name="solo safe: fill start mid" value="5d5856ff"/>
|
||||
<Option name="solo safe: fill end mid" value="564d48ff"/>
|
||||
<Option name="solo safe: led" value="660000ff"/>
|
||||
<Option name="solo safe: led active" value="ff0000ff"/>
|
||||
<Option name="solo safe: led mid" value="660000ff"/>
|
||||
<Option name="solo safe: text" value="c7c7d8ff"/>
|
||||
<Option name="solo safe: text active" value="c8c8d9ff"/>
|
||||
<Option name="solo safe: text mid" value="000000ff"/>
|
||||
<Option name="monitor section cut: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section cut: border end" value="000000ff"/>
|
||||
<Option name="monitor section cut: border start selected" value="9a908e00"/>
|
||||
|
|
@ -263,14 +235,10 @@
|
|||
<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 mid" value="00000000"/>
|
||||
<Option name="monitor section cut: fill end mid" value="00000000"/>
|
||||
<Option name="monitor section cut: led" value="473812ff"/>
|
||||
<Option name="monitor section cut: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section cut: led mid" value="00000000"/>
|
||||
<Option name="monitor section cut: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor section cut: text active" value="000000ff"/>
|
||||
<Option name="monitor section cut: text mid" value="00000000"/>
|
||||
<Option name="monitor section dim: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section dim: border end" value="000000ff"/>
|
||||
<Option name="monitor section dim: border start selected" value="9a908eff"/>
|
||||
|
|
@ -279,14 +247,10 @@
|
|||
<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: fill start mid" value="04af0200"/>
|
||||
<Option name="monitor section dim: fill end mid" value="008a00ff"/>
|
||||
<Option name="monitor section dim: led" value="473812ff"/>
|
||||
<Option name="monitor section dim: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section dim: led mid" value="00000000"/>
|
||||
<Option name="monitor section dim: text" value="c8c8d9ff"/>
|
||||
<Option name="monitor section dim: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor section dim: text mid" value="00000000"/>
|
||||
<Option name="monitor section solo: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section solo: border end" value="000000ff"/>
|
||||
<Option name="monitor section solo: border start selected" value="9a908eff"/>
|
||||
|
|
@ -295,14 +259,10 @@
|
|||
<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 mid" value="f4f395ff"/>
|
||||
<Option name="monitor section solo: fill end mid" value="fffe1d00"/>
|
||||
<Option name="monitor section solo: led" value="473812ff"/>
|
||||
<Option name="monitor section solo: led active" value="ffa500ff"/>
|
||||
<Option name="monitor section solo: led mid" value="00000000"/>
|
||||
<Option name="monitor section solo: text" value="00000000"/>
|
||||
<Option name="monitor section solo: text active" value="00000000"/>
|
||||
<Option name="monitor section solo: text mid" value="00000000"/>
|
||||
<Option name="monitor section invert: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section invert: border end" value="000000ff"/>
|
||||
<Option name="monitor section invert: border start selected" value="9a908eff"/>
|
||||
|
|
@ -311,14 +271,10 @@
|
|||
<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 mid" value="04af02ff"/>
|
||||
<Option name="monitor section invert: fill end mid" value="008a0000"/>
|
||||
<Option name="monitor section invert: led" value="473812ff"/>
|
||||
<Option name="monitor section invert: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section invert: led mid" value="00000000"/>
|
||||
<Option name="monitor section invert: text" value="00000000"/>
|
||||
<Option name="monitor section invert: text active" value="00000000"/>
|
||||
<Option name="monitor section invert: text mid" value="00000000"/>
|
||||
<Option name="monitor section mono: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section mono: border end" value="000000ff"/>
|
||||
<Option name="monitor section mono: border start selected" value="9a908eff"/>
|
||||
|
|
@ -327,14 +283,10 @@
|
|||
<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 mid" value="04af02ff"/>
|
||||
<Option name="monitor section mono: fill end mid" value="008a00ff"/>
|
||||
<Option name="monitor section mono: led" value="473812ff"/>
|
||||
<Option name="monitor section mono: led active" value="78cb4eff"/>
|
||||
<Option name="monitor section mono: led mid" value="00000000"/>
|
||||
<Option name="monitor section mono: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor section mono: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor section mono: text mid" value="00000000"/>
|
||||
<Option name="monitor section solo model: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor section solo model: border end" value="000000ff"/>
|
||||
<Option name="monitor section solo model: border start selected" value="9a908eff"/>
|
||||
|
|
@ -343,14 +295,10 @@
|
|||
<Option name="monitor section solo model: fill end" value="564d48ff"/>
|
||||
<Option name="monitor section solo model: fill start active" value="5d5856ff"/>
|
||||
<Option name="monitor section solo model: fill end active" value="564d48ff"/>
|
||||
<Option name="monitor section solo model: fill start mid" value="5d5856ff"/>
|
||||
<Option name="monitor section solo model: fill end mid" value="564d48ff"/>
|
||||
<Option name="monitor section solo model: led" value="4f3300ff"/>
|
||||
<Option name="monitor section solo model: led active" value="ffa500ff"/>
|
||||
<Option name="monitor section solo model: led mid" value="b8770000"/>
|
||||
<Option name="monitor section solo model: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor section solo model: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor section solo model: text mid" value="00000000"/>
|
||||
<Option name="monitor solo override: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor solo override: border end" value="000000ff"/>
|
||||
<Option name="monitor solo override: border start selected" value="9a908eff"/>
|
||||
|
|
@ -359,14 +307,10 @@
|
|||
<Option name="monitor solo override: fill end" value="564d48ff"/>
|
||||
<Option name="monitor solo override: fill start active" value="5d5856ff"/>
|
||||
<Option name="monitor solo override: fill end active" value="564d48ff"/>
|
||||
<Option name="monitor solo override: fill start mid" value="5d5856ff"/>
|
||||
<Option name="monitor solo override: fill end mid" value="564d48ff"/>
|
||||
<Option name="monitor solo override: led" value="4f3300ff"/>
|
||||
<Option name="monitor solo override: led active" value="ffa500ff"/>
|
||||
<Option name="monitor solo override: led mid" value="b87700ff"/>
|
||||
<Option name="monitor solo override: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor solo override: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor solo override: text mid" value="00000000"/>
|
||||
<Option name="monitor solo exclusive: border start" value="b7b7d2ff"/>
|
||||
<Option name="monitor solo exclusive: border end" value="000000ff"/>
|
||||
<Option name="monitor solo exclusive: border start selected" value="9a908eff"/>
|
||||
|
|
@ -375,14 +319,10 @@
|
|||
<Option name="monitor solo exclusive: fill end" value="564d48ff"/>
|
||||
<Option name="monitor solo exclusive: fill start active" value="5d5856ff"/>
|
||||
<Option name="monitor solo exclusive: fill end active" value="564c47ff"/>
|
||||
<Option name="monitor solo exclusive: fill start mid" value="5d5856ff"/>
|
||||
<Option name="monitor solo exclusive: fill end mid" value="564d48ff"/>
|
||||
<Option name="monitor solo exclusive: led" value="4f3300ff"/>
|
||||
<Option name="monitor solo exclusive: led active" value="ffa500ff"/>
|
||||
<Option name="monitor solo exclusive: led mid" value="b77600ff"/>
|
||||
<Option name="monitor solo exclusive: text" value="c7c7d8ff"/>
|
||||
<Option name="monitor solo exclusive: text active" value="c8c8d9ff"/>
|
||||
<Option name="monitor solo exclusive: text mid" value="00000000"/>
|
||||
<Option name="rude solo: border start" value="997171ff"/>
|
||||
<Option name="rude solo: border end" value="000000ff"/>
|
||||
<Option name="rude solo: border start selected" value="000000ff"/>
|
||||
|
|
@ -391,14 +331,10 @@
|
|||
<Option name="rude solo: fill end" value="513c3cff"/>
|
||||
<Option name="rude solo: fill start active" value="ff1f1fff"/>
|
||||
<Option name="rude solo: fill end active" value="e21b1bff"/>
|
||||
<Option name="rude solo: fill start mid" value="00000000"/>
|
||||
<Option name="rude solo: fill end mid" value="00000000"/>
|
||||
<Option name="rude solo: led" value="00000000"/>
|
||||
<Option name="rude solo: led active" value="00000000"/>
|
||||
<Option name="rude solo: led mid" value="00000000"/>
|
||||
<Option name="rude solo: text" value="969696ff"/>
|
||||
<Option name="rude solo: text active" value="e5e5e5ff"/>
|
||||
<Option name="rude solo: text mid" value="00000000"/>
|
||||
<Option name="rude isolate: border start" value="8da8b4ff"/>
|
||||
<Option name="rude isolate: border end" value="000000ff"/>
|
||||
<Option name="rude isolate: border start selected" value="00000000"/>
|
||||
|
|
@ -407,14 +343,10 @@
|
|||
<Option name="rude isolate: fill end" value="192930ff"/>
|
||||
<Option name="rude isolate: fill start active" value="e5f7ffff"/>
|
||||
<Option name="rude isolate: fill end active" value="b6e5fdff"/>
|
||||
<Option name="rude isolate: fill start mid" value="00000000"/>
|
||||
<Option name="rude isolate: fill end mid" value="00000000"/>
|
||||
<Option name="rude isolate: led" value="00000000"/>
|
||||
<Option name="rude isolate: led active" value="000000ff"/>
|
||||
<Option name="rude isolate: led mid" value="00000000"/>
|
||||
<Option name="rude isolate: text" value="979797ff"/>
|
||||
<Option name="rude isolate: text active" value="000000ff"/>
|
||||
<Option name="rude isolate: text mid" value="00000000"/>
|
||||
<Option name="rude audition: border start" value="997171ff"/>
|
||||
<Option name="rude audition: border end" value="000000ff"/>
|
||||
<Option name="rude audition: border start selected" value="00000000"/>
|
||||
|
|
@ -423,14 +355,10 @@
|
|||
<Option name="rude audition: fill end" value="513c3cff"/>
|
||||
<Option name="rude audition: fill start active" value="ff1f1fff"/>
|
||||
<Option name="rude audition: fill end active" value="e21b1bff"/>
|
||||
<Option name="rude audition: fill start mid" value="00000000"/>
|
||||
<Option name="rude audition: fill end mid" value="000000ff"/>
|
||||
<Option name="rude audition: led" value="00000000"/>
|
||||
<Option name="rude audition: led active" value="00000000"/>
|
||||
<Option name="rude audition: led mid" value="00000000"/>
|
||||
<Option name="rude audition: text" value="979797ff"/>
|
||||
<Option name="rude audition: text active" value="ffffffff"/>
|
||||
<Option name="rude audition: text mid" value="00000000"/>
|
||||
<Option name="feedback alert: border start" value="997171ff"/>
|
||||
<Option name="feedback alert: border end" value="000000ff"/>
|
||||
<Option name="feedback alert: border start selected" value="000000ff"/>
|
||||
|
|
@ -439,46 +367,34 @@
|
|||
<Option name="feedback alert: fill end" value="513c3cff"/>
|
||||
<Option name="feedback alert: fill start active" value="ff1f1fff"/>
|
||||
<Option name="feedback alert: fill end active" value="e21b1bff"/>
|
||||
<Option name="feedback alert: fill start mid" value="00000000"/>
|
||||
<Option name="feedback alert: fill end mid" value="00000000"/>
|
||||
<Option name="feedback alert: led" value="00000000"/>
|
||||
<Option name="feedback alert: led active" value="00000000"/>
|
||||
<Option name="feedback alert: led mid" value="00000000"/>
|
||||
<Option name="feedback alert: text" value="969696ff"/>
|
||||
<Option name="feedback alert: text active" value="e5e5e5ff"/>
|
||||
<Option name="feedback alert: text mid" value="00000000"/>
|
||||
<Option name="mute button: border start" value="ffcb8bff"/>
|
||||
<Option name="mute button: border end" value="0c0802ff"/>
|
||||
<Option name="mute button: border start selected" value="00000000"/>
|
||||
<Option name="mute button: border end selected" value="00000000"/>
|
||||
<Option name="mute button: fill start" value="ac8568ff"/>
|
||||
<Option name="mute button: fill end" value="383222ff"/>
|
||||
<Option name="mute button: fill end" value="241e0bff"/>
|
||||
<Option name="mute button: fill start active" value="ffc300ff"/>
|
||||
<Option name="mute button: fill end active" value="ea8400ff"/>
|
||||
<Option name="mute button: fill start mid" value="c49600ff"/>
|
||||
<Option name="mute button: fill end mid" value="9b5700ff"/>
|
||||
<Option name="mute button: led" value="00000000"/>
|
||||
<Option name="mute button: led active" value="00000000"/>
|
||||
<Option name="mute button: led mid" value="00000000"/>
|
||||
<Option name="mute button: text" value="999999ff"/>
|
||||
<Option name="mute button: text" value="bfbfbfff"/>
|
||||
<Option name="mute button: text active" value="191919ff"/>
|
||||
<Option name="mute button: text mid" value="262626ff"/>
|
||||
<Option name="solo button: border start" value="ffffffff"/>
|
||||
<Option name="solo button: border end" value="0c0c02ff"/>
|
||||
<Option name="solo button: border start selected" value="000000ff"/>
|
||||
<Option name="solo button: border end selected" value="000000ff"/>
|
||||
<Option name="solo button: fill start" value="a09865ff"/>
|
||||
<Option name="solo button: fill end" value="585f4aff"/>
|
||||
<Option name="solo button: fill end" value="323c1cff"/>
|
||||
<Option name="solo button: fill start active" value="fffd9bff"/>
|
||||
<Option name="solo button: fill end active" value="ffff00ff"/>
|
||||
<Option name="solo button: fill start mid" value="d7d697ff"/>
|
||||
<Option name="solo button: fill end mid" value="f0f09fff"/>
|
||||
<Option name="solo button: led" value="00000000"/>
|
||||
<Option name="solo button: led active" value="00000000"/>
|
||||
<Option name="solo button: led mid" value="00000000"/>
|
||||
<Option name="solo button: text" value="bfbfbfff"/>
|
||||
<Option name="solo button: text active" value="191919ff"/>
|
||||
<Option name="solo button: text mid" value="4c4c4cff"/>
|
||||
<Option name="record enable button: border start" value="a06969ff"/>
|
||||
<Option name="record enable button: border end" value="000000ff"/>
|
||||
<Option name="record enable button: border start selected" value="00000000"/>
|
||||
|
|
@ -487,14 +403,10 @@
|
|||
<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 mid" value="ffa8a8ff"/>
|
||||
<Option name="record enable button: fill end mid" value="fb7c7cff"/>
|
||||
<Option name="record enable button: led" value="00000000"/>
|
||||
<Option name="record enable button: led active" value="00000000"/>
|
||||
<Option name="record enable button: led mid" value="00000000"/>
|
||||
<Option name="record enable button: text" value="a5a5a5ff"/>
|
||||
<Option name="record enable button: text active" value="d8d8d8ff"/>
|
||||
<Option name="record enable button: text mid" value="333333ff"/>
|
||||
<Option name="send alert button: border start" value="9baa8dff"/>
|
||||
<Option name="send alert button: border end" value="000000ff"/>
|
||||
<Option name="send alert button: border start selected" value="00000000"/>
|
||||
|
|
@ -503,14 +415,10 @@
|
|||
<Option name="send alert button: fill end" value="43493cff"/>
|
||||
<Option name="send alert button: fill start active" value="91f928ff"/>
|
||||
<Option name="send alert button: fill end active" value="85e524ff"/>
|
||||
<Option name="send alert button: fill start mid" value="00000000"/>
|
||||
<Option name="send alert button: fill end mid" value="00000000"/>
|
||||
<Option name="send alert button: led" value="00000000"/>
|
||||
<Option name="send alert button: led active" value="00000000"/>
|
||||
<Option name="send alert button: led mid" value="00000000"/>
|
||||
<Option name="send alert button: text" value="ccccccff"/>
|
||||
<Option name="send alert button: text active" value="000000ff"/>
|
||||
<Option name="send alert button: text mid" value="00000000"/>
|
||||
<Option name="midi input button: border start" value="9e9e9eff"/>
|
||||
<Option name="midi input button: border end" value="070707ff"/>
|
||||
<Option name="midi input button: border start selected" value="00000000"/>
|
||||
|
|
@ -519,11 +427,8 @@
|
|||
<Option name="midi input button: fill end" value="333333ff"/>
|
||||
<Option name="midi input button: fill start active" value="a1ff43ff"/>
|
||||
<Option name="midi input button: fill end active" value="00a300ff"/>
|
||||
<Option name="midi input button: fill start mid" value="000000ff"/>
|
||||
<Option name="midi input button: fill end mid" value="00000000"/>
|
||||
<Option name="midi input button: led" value="00000000"/>
|
||||
<Option name="midi input button: led active" value="00000000"/>
|
||||
<Option name="midi input button: led mid" value="00000000"/>
|
||||
<Option name="midi input button: text" value="00000000"/>
|
||||
<Option name="midi input button: text active" value="00000000"/>
|
||||
<Option name="transport button: border start" value="9e9e9eff"/>
|
||||
|
|
@ -534,14 +439,10 @@
|
|||
<Option name="transport button: fill end" value="333333ff"/>
|
||||
<Option name="transport button: fill start active" value="a1ff43ff"/>
|
||||
<Option name="transport button: fill end active" value="00a300ff"/>
|
||||
<Option name="transport button: fill start mid" value="000000ff"/>
|
||||
<Option name="transport button: fill end mid" value="00000000"/>
|
||||
<Option name="transport button: led" value="00000000"/>
|
||||
<Option name="transport button: led active" value="00000000"/>
|
||||
<Option name="transport button: led mid" value="00000000"/>
|
||||
<Option name="transport button: text" value="00000000"/>
|
||||
<Option name="transport button: text active" value="00000000"/>
|
||||
<Option name="transport button: text mid" value="00000000"/>
|
||||
<Option name="transport recenable button: border start" value="a06a6aff"/>
|
||||
<Option name="transport recenable button: border end" value="000000ff"/>
|
||||
<Option name="transport recenable button: border start selected" value="000000ff"/>
|
||||
|
|
@ -550,14 +451,10 @@
|
|||
<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 end active" value="b50e0eff"/>
|
||||
<Option name="transport recenable button: fill start mid" value="ffa8a8ff"/>
|
||||
<Option name="transport recenable button: fill end mid" value="f87878ff"/>
|
||||
<Option name="transport recenable button: led" value="00000000"/>
|
||||
<Option name="transport recenable button: led active" value="00000000"/>
|
||||
<Option name="transport recenable button: led mid" value="00000000"/>
|
||||
<Option name="transport recenable button: text" value="00000000"/>
|
||||
<Option name="transport recenable button: text active" value="00000000"/>
|
||||
<Option name="transport recenable button: text mid" value="00000000"/>
|
||||
<Option name="transport option button: border start" value="9597a5ff"/>
|
||||
<Option name="transport option button: border end" value="0f0f0fff"/>
|
||||
<Option name="transport option button: border start selected" value="000000ff"/>
|
||||
|
|
@ -566,14 +463,10 @@
|
|||
<Option name="transport option button: fill end" value="4a4b51ff"/>
|
||||
<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: fill start mid" value="5d5856ff"/>
|
||||
<Option name="transport option button: fill end mid" value="56575eff"/>
|
||||
<Option name="transport option button: led" value="4f3300ff"/>
|
||||
<Option name="transport option button: led active" value="ffa500ff"/>
|
||||
<Option name="transport option button: led mid" value="b87700ff"/>
|
||||
<Option name="transport option button: text" value="c7c7d8ff"/>
|
||||
<Option name="transport option button: text active" value="c8c8d9ff"/>
|
||||
<Option name="transport option button: text mid" value="000000ff"/>
|
||||
<Option name="transport active option button: border start" value="a9b2a9ff"/>
|
||||
<Option name="transport active option button: border end" value="0c0c0cff"/>
|
||||
<Option name="transport active option button: border start selected" value="8a998aff"/>
|
||||
|
|
@ -582,14 +475,10 @@
|
|||
<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 start mid" value="565d56ff"/>
|
||||
<Option name="transport active option button: fill end mid" value="5a6359ff"/>
|
||||
<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: led mid" value="b87700ff"/>
|
||||
<Option name="transport active option button: text" value="c7c7d8ff"/>
|
||||
<Option name="transport active option button: text active" value="000000ff"/>
|
||||
<Option name="transport active option button: text mid" value="000000ff"/>
|
||||
<Option name="plugin bypass button: border start" value="b7b7d2ff"/>
|
||||
<Option name="plugin bypass button: border end" value="000000ff"/>
|
||||
<Option name="plugin bypass button: border start selected" value="9a908eff"/>
|
||||
|
|
@ -598,14 +487,10 @@
|
|||
<Option name="plugin bypass button: fill end" value="564d48ff"/>
|
||||
<Option name="plugin bypass button: fill start active" value="5d5856ff"/>
|
||||
<Option name="plugin bypass button: fill end active" value="564d48ff"/>
|
||||
<Option name="plugin bypass button: fill start mid" value="5d5856ff"/>
|
||||
<Option name="plugin bypass button: fill end mid" value="564d48ff"/>
|
||||
<Option name="plugin bypass button: led" value="660000ff"/>
|
||||
<Option name="plugin bypass button: led active" value="ff0000ff"/>
|
||||
<Option name="plugin bypass button: led mid" value="66000000"/>
|
||||
<Option name="plugin bypass button: text" value="c7c7d8ff"/>
|
||||
<Option name="plugin bypass button: text active" value="c8c8d9ff"/>
|
||||
<Option name="plugin bypass button: text mid" value="000000ff"/>
|
||||
<Option name="punch button: border start" value="a06969ff"/>
|
||||
<Option name="punch button: border end" value="000000ff"/>
|
||||
<Option name="punch button: border start selected" value="000000ff"/>
|
||||
|
|
@ -614,14 +499,10 @@
|
|||
<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 mid" value="ffa8a8ff"/>
|
||||
<Option name="punch button: fill end mid" value="fb7c7cff"/>
|
||||
<Option name="punch button: led" value="00000000"/>
|
||||
<Option name="punch button: led active" value="00000000"/>
|
||||
<Option name="punch button: led mid" value="00000000"/>
|
||||
<Option name="punch button: text" value="a5a5a5ff"/>
|
||||
<Option name="punch button: text active" value="d8d8d8ff"/>
|
||||
<Option name="punch button: text mid" value="333333ff"/>
|
||||
<Option name="mouse mode button: border start" value="b9db9aff"/>
|
||||
<Option name="mouse mode button: border end" value="000000ff"/>
|
||||
<Option name="mouse mode button: border start selected" value="9a908eff"/>
|
||||
|
|
@ -630,14 +511,10 @@
|
|||
<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 end active" value="14ae08ff"/>
|
||||
<Option name="mouse mode button: fill start mid" value="5d5856ff"/>
|
||||
<Option name="mouse mode button: fill end mid" value="564d48ff"/>
|
||||
<Option name="mouse mode button: led" value="4f3300ff"/>
|
||||
<Option name="mouse mode button: led active" value="ffa500ff"/>
|
||||
<Option name="mouse mode button: led mid" value="b87700ff"/>
|
||||
<Option name="mouse mode button: text" value="c7c7d8ff"/>
|
||||
<Option name="mouse mode button: text active" value="000000ff"/>
|
||||
<Option name="mouse mode button: text mid" value="000000ff"/>
|
||||
<Option name="zoom button: border start" value="9092a3ff"/>
|
||||
<Option name="zoom button: border end" value="0a0a0aff"/>
|
||||
<Option name="zoom button: border start selected" value="9a908eff"/>
|
||||
|
|
@ -646,14 +523,10 @@
|
|||
<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 start mid" value="5d5856ff"/>
|
||||
<Option name="zoom button: fill end mid" value="53545eff"/>
|
||||
<Option name="zoom button: led" value="4f3300ff"/>
|
||||
<Option name="zoom button: led active" value="ffa500ff"/>
|
||||
<Option name="zoom button: led mid" value="b87700ff"/>
|
||||
<Option name="zoom button: text" value="c7c7d8ff"/>
|
||||
<Option name="zoom button: text active" value="c8c8d9ff"/>
|
||||
<Option name="zoom button: text mid" value="000000ff"/>
|
||||
<Option name="route button: border start" value="b7b7d2ff"/>
|
||||
<Option name="route button: border end" value="000000ff"/>
|
||||
<Option name="route button: border start selected" value="8e8e9aff"/>
|
||||
|
|
@ -662,14 +535,10 @@
|
|||
<Option name="route button: fill end" value="484856ff"/>
|
||||
<Option name="route button: fill start active" value="4d4d4dff"/>
|
||||
<Option name="route button: fill end active" value="121212ff"/>
|
||||
<Option name="route button: fill start mid" value="57565dff"/>
|
||||
<Option name="route button: fill end mid" value="484856ff"/>
|
||||
<Option name="route button: led" value="4f3300ff"/>
|
||||
<Option name="route button: led active" value="ffa500ff"/>
|
||||
<Option name="route button: led mid" value="b87700ff"/>
|
||||
<Option name="route button: text" value="c7c7d8ff"/>
|
||||
<Option name="route button: text active" value="c8c8d9ff"/>
|
||||
<Option name="route button: text mid" value="000000ff"/>
|
||||
<Option name="mixer strip button: border start" value="b7b7d2ff"/>
|
||||
<Option name="mixer strip button: border end" value="000000ff"/>
|
||||
<Option name="mixer strip button: border start selected" value="9a908eff"/>
|
||||
|
|
@ -678,14 +547,10 @@
|
|||
<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 end active" value="ffa500ff"/>
|
||||
<Option name="mixer strip button: fill start mid" value="5d5856ff"/>
|
||||
<Option name="mixer strip button: fill end mid" value="564d48ff"/>
|
||||
<Option name="mixer strip button: led" value="4f3300ff"/>
|
||||
<Option name="mixer strip button: led active" value="ffa500ff"/>
|
||||
<Option name="mixer strip button: led mid" value="b87700ff"/>
|
||||
<Option name="mixer strip button: text" value="c7c7d7ff"/>
|
||||
<Option name="mixer strip button: text active" value="000000ff"/>
|
||||
<Option name="mixer strip button: text mid" value="000000ff"/>
|
||||
<Option name="mixer strip name button: border start" value="b7b7d2ff"/>
|
||||
<Option name="mixer strip name button: border end" value="000000ff"/>
|
||||
<Option name="mixer strip name button: border start selected" value="8e8e9aff"/>
|
||||
|
|
@ -694,14 +559,10 @@
|
|||
<Option name="mixer strip name button: fill end" value="484856ff"/>
|
||||
<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: fill start mid" value="57565dff"/>
|
||||
<Option name="mixer strip name button: fill end mid" value="484856ff"/>
|
||||
<Option name="mixer strip name button: led" value="4f3300ff"/>
|
||||
<Option name="mixer strip name button: led active" value="ffa500ff"/>
|
||||
<Option name="mixer strip name button: led mid" value="b87700ff"/>
|
||||
<Option name="mixer strip name button: text" value="c7c7d8ff"/>
|
||||
<Option name="mixer strip name button: text active" value="c8c8d9ff"/>
|
||||
<Option name="mixer strip name button: text mid" value="000000ff"/>
|
||||
<Option name="transport clock: background" value="000000ff"/>
|
||||
<Option name="transport clock: text" value="6bb620ff"/>
|
||||
<Option name="transport clock: edited text" value="ffa500ff"/>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,59 @@ using namespace std;
|
|||
ArdourButton::Element ArdourButton::default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text);
|
||||
ArdourButton::Element ArdourButton::led_default_elements = ArdourButton::Element (ArdourButton::default_elements|ArdourButton::Indicator);
|
||||
ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Indicator);
|
||||
cairo_pattern_t* ArdourButton::mid_mask = 0;
|
||||
|
||||
void
|
||||
ArdourButton::create_mid_mask ()
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_A8, 32, 32);
|
||||
|
||||
cairo_t* cr2 = cairo_create (surface);
|
||||
|
||||
cairo_set_source_rgba (cr2, 1.0, 0.0, 0.0, 1.0);
|
||||
cairo_set_line_join (cr2, CAIRO_LINE_JOIN_MITER);
|
||||
|
||||
/* some of these lines extend outside the image surface - we just rely
|
||||
* on cairo clipping them since it makes the math easier to visualize
|
||||
* (at least for paul)
|
||||
*/
|
||||
|
||||
cairo_move_to (cr2, 0.0, 4.0);
|
||||
cairo_line_to (cr2, 4.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 12.0);
|
||||
cairo_line_to (cr2, 12.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 20.0);
|
||||
cairo_line_to (cr2, 20.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 28.0);
|
||||
cairo_line_to (cr2, 28.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 28.0);
|
||||
cairo_line_to (cr2, 28.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 36.0);
|
||||
cairo_line_to (cr2, 36.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 44.0);
|
||||
cairo_line_to (cr2, 44.0, 0.0);
|
||||
|
||||
cairo_move_to (cr2, 0.0, 52.0);
|
||||
cairo_line_to (cr2, 52.0, 0.0);
|
||||
|
||||
cairo_set_line_width (cr2, 3.0);
|
||||
cairo_stroke (cr2);
|
||||
|
||||
mid_mask = cairo_pattern_create_for_surface (surface);
|
||||
cairo_pattern_set_extend (mid_mask, CAIRO_EXTEND_REPEAT);
|
||||
cairo_pattern_set_filter (mid_mask, CAIRO_FILTER_NEAREST);
|
||||
|
||||
cairo_surface_destroy (surface);
|
||||
cairo_destroy (cr2);
|
||||
}
|
||||
|
||||
ArdourButton::ArdourButton (Element e)
|
||||
: _elements (e)
|
||||
|
|
@ -59,7 +112,8 @@ ArdourButton::ArdourButton (Element e)
|
|||
, _corner_radius (9.0)
|
||||
, _corner_mask (0xf)
|
||||
, edge_pattern (0)
|
||||
, fill_pattern (0)
|
||||
, active_pattern (0)
|
||||
, inactive_pattern (0)
|
||||
, led_inset_pattern (0)
|
||||
, reflection_pattern (0)
|
||||
, _led_rect (0)
|
||||
|
|
@ -70,6 +124,9 @@ ArdourButton::ArdourButton (Element e)
|
|||
, _hovering (false)
|
||||
{
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler));
|
||||
if (!mid_mask) {
|
||||
create_mid_mask ();
|
||||
}
|
||||
}
|
||||
|
||||
ArdourButton::ArdourButton (const std::string& str, Element e)
|
||||
|
|
@ -79,7 +136,8 @@ ArdourButton::ArdourButton (const std::string& str, Element e)
|
|||
, _diameter (11.0)
|
||||
, _corner_radius (9.0)
|
||||
, edge_pattern (0)
|
||||
, fill_pattern (0)
|
||||
, active_pattern (0)
|
||||
, inactive_pattern (0)
|
||||
, led_inset_pattern (0)
|
||||
, reflection_pattern (0)
|
||||
, _led_rect (0)
|
||||
|
|
@ -90,11 +148,27 @@ ArdourButton::ArdourButton (const std::string& str, Element e)
|
|||
, _hovering (false)
|
||||
{
|
||||
set_text (str);
|
||||
|
||||
if (!mid_mask) {
|
||||
create_mid_mask ();
|
||||
}
|
||||
}
|
||||
|
||||
ArdourButton::~ArdourButton()
|
||||
{
|
||||
delete _led_rect;
|
||||
|
||||
if (edge_pattern) {
|
||||
cairo_pattern_destroy (edge_pattern);
|
||||
}
|
||||
|
||||
if (active_pattern) {
|
||||
cairo_pattern_destroy (active_pattern);
|
||||
}
|
||||
|
||||
if (inactive_pattern) {
|
||||
cairo_pattern_destroy (inactive_pattern);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -164,8 +238,20 @@ ArdourButton::render (cairo_t* cr)
|
|||
} else {
|
||||
rounded_function (cr, 0, 0, get_width(), get_height(), _corner_radius - 1.0);
|
||||
}
|
||||
cairo_set_source (cr, fill_pattern);
|
||||
cairo_fill (cr);
|
||||
|
||||
if (active_state() == Gtkmm2ext::ImplicitActive) {
|
||||
cairo_set_source (cr, inactive_pattern);
|
||||
cairo_fill_preserve (cr);
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
cairo_set_source (cr, active_pattern);
|
||||
cairo_stroke (cr);
|
||||
} else if (active_state() == Gtkmm2ext::ExplicitActive) {
|
||||
cairo_set_source (cr, active_pattern);
|
||||
cairo_fill (cr);
|
||||
} else {
|
||||
cairo_set_source (cr, inactive_pattern);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
}
|
||||
|
||||
if (_pixbuf) {
|
||||
|
|
@ -191,7 +277,7 @@ ArdourButton::render (cairo_t* cr)
|
|||
|
||||
if ((_elements & Text) && !_text.empty()) {
|
||||
|
||||
cairo_set_source_rgba (cr, text_r, text_g, text_b, text_a);
|
||||
cairo_new_path (cr);
|
||||
|
||||
if (_elements & Indicator) {
|
||||
if (_led_left) {
|
||||
|
|
@ -204,6 +290,7 @@ ArdourButton::render (cairo_t* cr)
|
|||
cairo_move_to (cr, (get_width() - _text_width)/2.0, get_height()/2.0 - _text_height/2.0);
|
||||
}
|
||||
|
||||
cairo_set_source_rgba (cr, text_r, text_g, text_b, text_a);
|
||||
pango_cairo_show_layout (cr, _layout->gobj());
|
||||
}
|
||||
|
||||
|
|
@ -364,32 +451,39 @@ ArdourButton::set_colors ()
|
|||
cairo_pattern_add_color_stop_rgba (edge_pattern, 1, r/255.0,g/255.0,b/255.0, 0.7);
|
||||
}
|
||||
|
||||
if (active_pattern) {
|
||||
cairo_pattern_destroy (active_pattern);
|
||||
active_pattern = 0;
|
||||
}
|
||||
|
||||
/* the fill pattern is used to indicate Normal/Active/Mid state
|
||||
*/
|
||||
|
||||
if (fill_pattern) {
|
||||
cairo_pattern_destroy (fill_pattern);
|
||||
fill_pattern = 0;
|
||||
if (inactive_pattern) {
|
||||
cairo_pattern_destroy (inactive_pattern);
|
||||
inactive_pattern = 0;
|
||||
}
|
||||
|
||||
if (_elements & Body) {
|
||||
fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
|
||||
|
||||
if (active_state() == Gtkmm2ext::Mid) {
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start mid", get_name()));
|
||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end mid", get_name()));
|
||||
} else if (active_state() == Gtkmm2ext::Active) {
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", get_name()));
|
||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", get_name()));
|
||||
} else {
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start", get_name()));
|
||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", get_name()));
|
||||
}
|
||||
|
||||
active_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", get_name()));
|
||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", get_name()));
|
||||
UINT_TO_RGBA (start_color, &r, &g, &b, &a);
|
||||
cairo_pattern_add_color_stop_rgba (fill_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
|
||||
active_r = r/255.0;
|
||||
active_g = g/255.0;
|
||||
active_b = b/255.0;
|
||||
active_a = a/255.0;
|
||||
|
||||
cairo_pattern_add_color_stop_rgba (active_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
UINT_TO_RGBA (end_color, &r, &g, &b, &a);
|
||||
cairo_pattern_add_color_stop_rgba (fill_pattern, 1, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
cairo_pattern_add_color_stop_rgba (active_pattern, 1, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
|
||||
inactive_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
|
||||
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start", get_name()));
|
||||
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", get_name()));
|
||||
UINT_TO_RGBA (start_color, &r, &g, &b, &a);
|
||||
cairo_pattern_add_color_stop_rgba (inactive_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
UINT_TO_RGBA (end_color, &r, &g, &b, &a);
|
||||
cairo_pattern_add_color_stop_rgba (inactive_pattern, 1, r/255.0,g/255.0,b/255.0, a/255.0);
|
||||
}
|
||||
|
||||
if (led_inset_pattern) {
|
||||
|
|
@ -410,14 +504,11 @@ ArdourButton::set_colors ()
|
|||
cairo_pattern_add_color_stop_rgba (reflection_pattern, 1, 1,1,1, 0.0);
|
||||
}
|
||||
|
||||
/* text and LED colors depend on Active/Normal/Mid */
|
||||
/* text and LED colors */
|
||||
|
||||
if (active_state() == Gtkmm2ext::Active) {
|
||||
if (active_state() == Gtkmm2ext::ExplicitActive) {
|
||||
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: text active", get_name()));
|
||||
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: led active", get_name()));
|
||||
} else if (active_state() == Gtkmm2ext::Mid) {
|
||||
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: text mid", get_name()));
|
||||
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: led mid", get_name()));
|
||||
} else {
|
||||
text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: text", get_name()));
|
||||
led_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: led", get_name()));
|
||||
|
|
@ -454,7 +545,7 @@ ArdourButton::on_button_press_event (GdkEventButton *ev)
|
|||
}
|
||||
|
||||
if (_tweaks & ShowClick) {
|
||||
set_active_state (Gtkmm2ext::Active);
|
||||
set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
}
|
||||
|
||||
if (binding_proxy.button_press_handler (ev)) {
|
||||
|
|
@ -547,7 +638,7 @@ ArdourButton::controllable_changed ()
|
|||
float val = binding_proxy.get_controllable()->get_value();
|
||||
|
||||
if (fabs (val) >= 0.5f) {
|
||||
set_active_state (Gtkmm2ext::Active);
|
||||
set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
unset_active_state ();
|
||||
}
|
||||
|
|
@ -581,7 +672,7 @@ ArdourButton::action_toggled ()
|
|||
|
||||
if (tact) {
|
||||
if (tact->get_active()) {
|
||||
set_active_state (Gtkmm2ext::Active);
|
||||
set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
unset_active_state ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
int _corner_mask;
|
||||
|
||||
cairo_pattern_t* edge_pattern;
|
||||
cairo_pattern_t* fill_pattern;
|
||||
cairo_pattern_t* active_pattern;
|
||||
cairo_pattern_t* inactive_pattern;
|
||||
cairo_pattern_t* led_inset_pattern;
|
||||
cairo_pattern_t* reflection_pattern;
|
||||
|
||||
|
|
@ -130,6 +131,11 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
double led_b;
|
||||
double led_a;
|
||||
|
||||
double active_r;
|
||||
double active_g;
|
||||
double active_b;
|
||||
double active_a;
|
||||
|
||||
bool _act_on_release;
|
||||
bool _led_left;
|
||||
bool _fixed_diameter;
|
||||
|
|
@ -145,6 +151,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
|
|||
void action_sensitivity_changed ();
|
||||
void action_visibility_changed ();
|
||||
void action_tooltip_changed ();
|
||||
|
||||
static cairo_pattern_t* mid_mask;
|
||||
static void create_mid_mask ();
|
||||
};
|
||||
|
||||
#endif /* __gtk2_ardour_ardour_button_h__ */
|
||||
|
|
|
|||
|
|
@ -1929,7 +1929,7 @@ ARDOUR_UI::map_transport_state ()
|
|||
auto_loop_button.unset_active_state ();
|
||||
play_selection_button.unset_active_state ();
|
||||
roll_button.unset_active_state ();
|
||||
stop_button.set_active_state (Gtkmm2ext::Active);
|
||||
stop_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1943,37 +1943,37 @@ ARDOUR_UI::map_transport_state ()
|
|||
|
||||
if (_session->get_play_range()) {
|
||||
|
||||
play_selection_button.set_active_state (Gtkmm2ext::Active);
|
||||
play_selection_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
roll_button.unset_active_state ();
|
||||
auto_loop_button.unset_active_state ();
|
||||
|
||||
} else if (_session->get_play_loop ()) {
|
||||
|
||||
auto_loop_button.set_active_state (Gtkmm2ext::Active);
|
||||
play_selection_button.unset_active_state ();
|
||||
roll_button.unset_active_state ();
|
||||
auto_loop_button.set_active (true);
|
||||
play_selection_button.set_active (false);
|
||||
roll_button.set_active (false);
|
||||
|
||||
} else {
|
||||
|
||||
roll_button.set_active_state (Gtkmm2ext::Active);
|
||||
play_selection_button.unset_active_state ();
|
||||
auto_loop_button.unset_active_state ();
|
||||
roll_button.set_active (true);
|
||||
play_selection_button.set_active (false);
|
||||
auto_loop_button.set_active (false);
|
||||
}
|
||||
|
||||
if (Config->get_always_play_range()) {
|
||||
/* light up both roll and play-selection if they are joined */
|
||||
roll_button.set_active_state (Gtkmm2ext::Active);
|
||||
play_selection_button.set_active_state (Gtkmm2ext::Active);
|
||||
roll_button.set_active (true);
|
||||
play_selection_button.set_active (true);
|
||||
}
|
||||
|
||||
stop_button.unset_active_state ();
|
||||
stop_button.set_active (false);
|
||||
|
||||
} else {
|
||||
|
||||
stop_button.set_active_state (Gtkmm2ext::Active);
|
||||
roll_button.unset_active_state ();
|
||||
play_selection_button.unset_active_state ();
|
||||
auto_loop_button.unset_active_state ();
|
||||
stop_button.set_active (true);
|
||||
roll_button.set_active (false);
|
||||
play_selection_button.set_active (false);
|
||||
auto_loop_button.set_active (false);
|
||||
update_disk_space ();
|
||||
}
|
||||
}
|
||||
|
|
@ -2384,12 +2384,12 @@ ARDOUR_UI::transport_rec_enable_blink (bool onoff)
|
|||
|
||||
if (r == Session::Enabled || (r == Session::Recording && !h)) {
|
||||
if (onoff) {
|
||||
rec_button.set_active_state (Active);
|
||||
rec_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
rec_button.set_active_state (Mid);
|
||||
rec_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
}
|
||||
} else if (r == Session::Recording && h) {
|
||||
rec_button.set_active_state (Mid);
|
||||
rec_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
} else {
|
||||
rec_button.unset_active_state ();
|
||||
}
|
||||
|
|
@ -3600,7 +3600,7 @@ ARDOUR_UI::step_edit_status_change (bool yn)
|
|||
// we make insensitive
|
||||
|
||||
if (yn) {
|
||||
rec_button.set_active_state (Mid);
|
||||
rec_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
rec_button.set_sensitive (false);
|
||||
} else {
|
||||
rec_button.unset_active_state ();;
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ ARDOUR_UI::setup_transport ()
|
|||
click_button.set_name ("transport active option button");
|
||||
sync_button.set_name ("transport active option button");
|
||||
|
||||
stop_button.set_active_state (Active);
|
||||
stop_button.set_active (true);
|
||||
|
||||
goto_start_button.set_image (get_icon (X_("transport_start")));
|
||||
goto_end_button.set_image (get_icon (X_("transport_end")));
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ AutomationTimeAxisView::auto_clicked ()
|
|||
MenuList& items (automation_menu->items());
|
||||
|
||||
items.push_back (MenuElem (S_("Automation|Manual"), sigc::bind (sigc::mem_fun(*this,
|
||||
&AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
|
||||
&AutomationTimeAxisView::set_automation_state), (AutoState) ARDOUR::Off)));
|
||||
items.push_back (MenuElem (_("Play"), sigc::bind (sigc::mem_fun(*this,
|
||||
&AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
|
||||
items.push_back (MenuElem (_("Write"), sigc::bind (sigc::mem_fun(*this,
|
||||
|
|
@ -298,11 +298,11 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
assert (_control);
|
||||
state = _control->alist()->automation_state ();
|
||||
} else {
|
||||
state = Off;
|
||||
state = ARDOUR::Off;
|
||||
}
|
||||
|
||||
switch (state & (Off|Play|Touch|Write)) {
|
||||
case Off:
|
||||
switch (state & (ARDOUR::Off|Play|Touch|Write)) {
|
||||
case ARDOUR::Off:
|
||||
auto_button.set_label (S_("Automation|Manual"));
|
||||
if (auto_off_item) {
|
||||
ignore_state_request = true;
|
||||
|
|
@ -505,7 +505,7 @@ AutomationTimeAxisView::build_display_menu ()
|
|||
|
||||
as_items.push_back (CheckMenuElem (S_("Automation|Manual"), sigc::bind (
|
||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||
(AutoState) Off)));
|
||||
(AutoState) ARDOUR::Off)));
|
||||
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
|
||||
|
||||
as_items.push_back (CheckMenuElem (_("Play"), sigc::bind (
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ ButtonJoiner::render (cairo_t* cr)
|
|||
{
|
||||
double h = get_height();
|
||||
|
||||
if (_active_state == Gtkmm2ext::ActiveState (0)) {
|
||||
if (!get_active()) {
|
||||
cairo_set_source (cr, inactive_fill_pattern);
|
||||
} else {
|
||||
cairo_set_source (cr, active_fill_pattern);
|
||||
|
|
@ -169,11 +169,7 @@ ButtonJoiner::action_toggled ()
|
|||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (_action);
|
||||
|
||||
if (tact) {
|
||||
if (tact->get_active()) {
|
||||
set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
unset_active_state ();
|
||||
}
|
||||
set_active (tact->get_active());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -147,20 +147,16 @@ CANVAS_VARIABLE(canvasvar_ ## root ## FillStart, name ": fill start") \
|
|||
CANVAS_VARIABLE(canvasvar_ ## root ## FillEnd, name ": fill end") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## FillStartActive, name ": fill start active") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## FillEndActive, name ": fill end active") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## FillStartMid, name ": fill start mid") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## FillEndMid, name ": fill end mid") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## LED, name ": led") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## LEDActive, name ": led active") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## LEDMid, name ": led mid") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## Text, name ": text") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## TextActive, name ": text active") \
|
||||
CANVAS_VARIABLE(canvasvar_ ## root ## TextMid, name ": text mid")
|
||||
|
||||
BUTTON_VARS(ProcessorPreFader, "processor prefader")
|
||||
BUTTON_VARS(ProcessorFader, "processor fader")
|
||||
BUTTON_VARS(ProcessorPostFader, "processor postfader")
|
||||
BUTTON_VARS(ProcessorControlButton, "processor control button")
|
||||
BUTTON_VARS(MonitorButton, "monitor")
|
||||
BUTTON_VARS(MonitorButton, "monitor button")
|
||||
BUTTON_VARS(SoloIsolateButton, "solo isolate")
|
||||
BUTTON_VARS(SoloSafeButton, "solo safe")
|
||||
BUTTON_VARS(MonitorSectionCutButton, "monitor section cut")
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
// Mute enable toggle
|
||||
CellRendererPixbufMulti* mute_col_renderer = manage (new CellRendererPixbufMulti());
|
||||
|
||||
mute_col_renderer->set_pixbuf (ActiveState(0), ::get_icon("mute-disabled"));
|
||||
mute_col_renderer->set_pixbuf (Mid, ::get_icon("muted-by-others"));
|
||||
mute_col_renderer->set_pixbuf (Active, ::get_icon("mute-enabled"));
|
||||
mute_col_renderer->set_pixbuf (Gtkmm2ext::Off, ::get_icon("mute-disabled"));
|
||||
mute_col_renderer->set_pixbuf (Gtkmm2ext::ImplicitActive, ::get_icon("muted-by-others"));
|
||||
mute_col_renderer->set_pixbuf (Gtkmm2ext::ExplicitActive, ::get_icon("mute-enabled"));
|
||||
mute_col_renderer->signal_changed().connect (sigc::mem_fun (*this, &EditorRoutes::on_tv_mute_enable_toggled));
|
||||
|
||||
TreeViewColumn* mute_state_column = manage (new TreeViewColumn("M", *mute_col_renderer));
|
||||
|
|
@ -137,9 +137,9 @@ EditorRoutes::EditorRoutes (Editor* e)
|
|||
// Solo enable toggle
|
||||
CellRendererPixbufMulti* solo_col_renderer = manage (new CellRendererPixbufMulti());
|
||||
|
||||
solo_col_renderer->set_pixbuf (ActiveState(0), ::get_icon("solo-disabled"));
|
||||
solo_col_renderer->set_pixbuf (Active, ::get_icon("solo-enabled"));
|
||||
solo_col_renderer->set_pixbuf (Mid, ::get_icon("soloed-by-others"));
|
||||
solo_col_renderer->set_pixbuf (Gtkmm2ext::Off, ::get_icon("solo-disabled"));
|
||||
solo_col_renderer->set_pixbuf (Gtkmm2ext::ExplicitActive, ::get_icon("solo-enabled"));
|
||||
solo_col_renderer->set_pixbuf (Gtkmm2ext::ImplicitActive, ::get_icon("soloed-by-others"));
|
||||
solo_col_renderer->signal_changed().connect (sigc::mem_fun (*this, &EditorRoutes::on_tv_solo_enable_toggled));
|
||||
|
||||
TreeViewColumn* solo_state_column = manage (new TreeViewColumn("S", *solo_col_renderer));
|
||||
|
|
@ -641,7 +641,7 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
|
|||
row[_columns.is_midi] = false;
|
||||
}
|
||||
|
||||
row[_columns.mute_state] = (*x)->route()->muted() ? Active : ActiveState (0);
|
||||
row[_columns.mute_state] = (*x)->route()->muted() ? Gtkmm2ext::ExplicitActive : Gtkmm2ext::Off;
|
||||
row[_columns.solo_state] = RouteUI::solo_active_state ((*x)->route());
|
||||
row[_columns.solo_visible] = !(*x)->route()->is_master ();
|
||||
row[_columns.solo_isolate_state] = (*x)->route()->solo_isolated();
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r,
|
|||
|
||||
gain_astate_menu.items().push_back (MenuElem (S_("Automation|Manual"),
|
||||
sigc::bind (sigc::mem_fun (*(amp.get()), &Automatable::set_parameter_automation_state),
|
||||
Evoral::Parameter(GainAutomation), (AutoState) Off)));
|
||||
Evoral::Parameter(GainAutomation), (AutoState) ARDOUR::Off)));
|
||||
gain_astate_menu.items().push_back (MenuElem (_("Play"),
|
||||
sigc::bind (sigc::mem_fun (*(amp.get()), &Automatable::set_parameter_automation_state),
|
||||
Evoral::Parameter(GainAutomation), (AutoState) Play)));
|
||||
|
|
@ -710,7 +710,7 @@ GainMeterBase::_astate_string (AutoState state, bool shrt)
|
|||
string sstr;
|
||||
|
||||
switch (state) {
|
||||
case Off:
|
||||
case ARDOUR::Off:
|
||||
sstr = (shrt ? "M" : _("M"));
|
||||
break;
|
||||
case Play:
|
||||
|
|
@ -780,7 +780,7 @@ GainMeterBase::gain_automation_state_changed ()
|
|||
break;
|
||||
}
|
||||
|
||||
x = (_amp->gain_control()->alist()->automation_state() != Off);
|
||||
x = (_amp->gain_control()->alist()->automation_state() != ARDOUR::Off);
|
||||
|
||||
if (gain_automation_state_button.get_active() != x) {
|
||||
ignore_toggle = true;
|
||||
|
|
|
|||
|
|
@ -127,11 +127,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
|
|||
|
||||
pi->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&GenericPluginUI::processor_active_changed, this, boost::weak_ptr<Processor>(pi)), gui_context());
|
||||
|
||||
if (!pi->active()) {
|
||||
bypass_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
bypass_button.unset_active_state ();
|
||||
}
|
||||
bypass_button.set_active (!pi->active());
|
||||
|
||||
prefheight = 0;
|
||||
build ();
|
||||
|
|
@ -443,9 +439,8 @@ GenericPluginUI::automation_state_changed (ControlUI* cui)
|
|||
|
||||
// don't lock to avoid deadlock because we're triggered by
|
||||
// AutomationControl::Changed() while the automation lock is taken
|
||||
switch (insert->get_parameter_automation_state (cui->parameter())
|
||||
& (Off|Play|Touch|Write)) {
|
||||
case Off:
|
||||
switch (insert->get_parameter_automation_state (cui->parameter()) & (ARDOUR::Off|Play|Touch|Write)) {
|
||||
case ARDOUR::Off:
|
||||
cui->automate_button.set_label (S_("Automation|Manual"));
|
||||
break;
|
||||
case Play:
|
||||
|
|
@ -698,7 +693,7 @@ GenericPluginUI::astate_clicked (ControlUI* cui, uint32_t /*port*/)
|
|||
|
||||
items.clear ();
|
||||
items.push_back (MenuElem (S_("Automation|Manual"),
|
||||
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Off, cui)));
|
||||
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) ARDOUR::Off, cui)));
|
||||
items.push_back (MenuElem (_("Play"),
|
||||
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Play, cui)));
|
||||
items.push_back (MenuElem (_("Write"),
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ LED::render (cairo_t* cr)
|
|||
cairo_fill(cr);
|
||||
|
||||
//knob color
|
||||
cairo_set_source_rgba (cr, _red, _green, _blue, (active_state() == Active) ? 0.8 : 0.2);
|
||||
cairo_set_source_rgba (cr, _red, _green, _blue, (active_state() == Gtkmm2ext::ExplicitActive) ? 0.8 : 0.2);
|
||||
cairo_arc (cr, 0, 0, _diameter/2-3, 0, 2 * M_PI);
|
||||
cairo_fill(cr);
|
||||
|
||||
|
|
|
|||
|
|
@ -959,13 +959,9 @@ MonitorSection::audition_blink (bool onoff)
|
|||
}
|
||||
|
||||
if (_session->is_auditioning()) {
|
||||
if (onoff) {
|
||||
rude_audition_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
rude_audition_button.unset_active_state ();
|
||||
}
|
||||
rude_audition_button.set_active (onoff);
|
||||
} else {
|
||||
rude_audition_button.unset_active_state ();
|
||||
rude_audition_button.set_active (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -977,22 +973,17 @@ MonitorSection::solo_blink (bool onoff)
|
|||
}
|
||||
|
||||
if (_session->soloing() || _session->listening()) {
|
||||
if (onoff) {
|
||||
rude_solo_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
rude_solo_button.unset_active_state ();
|
||||
}
|
||||
rude_solo_button.set_active (onoff);
|
||||
|
||||
if (_session->soloing()) {
|
||||
if (_session->solo_isolated()) {
|
||||
rude_iso_button.set_active_state (Gtkmm2ext::Active);
|
||||
rude_iso_button.set_active (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// rude_solo_button.set_active (false);
|
||||
rude_solo_button.unset_active_state ();
|
||||
rude_iso_button.unset_active_state ();
|
||||
rude_solo_button.set_active (false);
|
||||
rude_iso_button.set_active (false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ PannerUI::build_astate_menu ()
|
|||
*/
|
||||
pan_astate_menu->items().push_back (MenuElem (S_("Automation|Manual"), sigc::bind (
|
||||
sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
|
||||
(AutoState) Off)));
|
||||
(AutoState) ARDOUR::Off)));
|
||||
pan_astate_menu->items().push_back (MenuElem (_("Play"), sigc::bind (
|
||||
sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
|
||||
(AutoState) Play)));
|
||||
|
|
@ -515,7 +515,7 @@ PannerUI::pan_automation_state_changed ()
|
|||
break;
|
||||
}
|
||||
|
||||
bool x = (pannable->automation_state() != Off);
|
||||
bool x = (pannable->automation_state() != ARDOUR::Off);
|
||||
|
||||
if (pan_automation_state_button.get_active() != x) {
|
||||
ignore_toggle = true;
|
||||
|
|
@ -552,7 +552,7 @@ PannerUI::_astate_string (AutoState state, bool shrt)
|
|||
string sstr;
|
||||
|
||||
switch (state) {
|
||||
case Off:
|
||||
case ARDOUR::Off:
|
||||
sstr = (shrt ? "M" : _("M"));
|
||||
break;
|
||||
case Play:
|
||||
|
|
|
|||
|
|
@ -481,13 +481,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
|
|||
|
||||
bypass_button.set_name ("plugin bypass button");
|
||||
bypass_button.set_text (_("Bypass"));
|
||||
|
||||
if (!pi->active()) {
|
||||
bypass_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
bypass_button.unset_active_state ();
|
||||
}
|
||||
|
||||
bypass_button.set_active (!pi->active());
|
||||
bypass_button.signal_button_release_event().connect (sigc::mem_fun(*this, &PlugUIBase::bypass_button_release));
|
||||
focus_button.add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
|
||||
|
||||
|
|
@ -567,11 +561,7 @@ PlugUIBase::processor_active_changed (boost::weak_ptr<Processor> weak_p)
|
|||
boost::shared_ptr<Processor> p (weak_p.lock());
|
||||
|
||||
if (p) {
|
||||
if (!p->active()) {
|
||||
bypass_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
bypass_button.unset_active_state ();
|
||||
}
|
||||
bypass_button.set_active (!p->active());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,10 +115,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
|
|||
|
||||
_vbox.pack_start (_button, true, true);
|
||||
|
||||
if (_processor->active()) {
|
||||
_button.set_active_state (Gtkmm2ext::Active);
|
||||
}
|
||||
|
||||
_button.set_active (_processor->active());
|
||||
_button.show ();
|
||||
|
||||
_processor->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_active_changed, this), gui_context());
|
||||
|
|
@ -225,7 +222,7 @@ void
|
|||
ProcessorEntry::led_clicked()
|
||||
{
|
||||
if (_processor) {
|
||||
if (_button.active_state() == Gtkmm2ext::Active) {
|
||||
if (_button.get_active ()) {
|
||||
_processor->deactivate ();
|
||||
} else {
|
||||
_processor->activate ();
|
||||
|
|
@ -237,11 +234,7 @@ void
|
|||
ProcessorEntry::processor_active_changed ()
|
||||
{
|
||||
if (_processor) {
|
||||
if (_processor->active()) {
|
||||
_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
_button.unset_active_state ();
|
||||
}
|
||||
_button.set_active (_processor->active());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -485,10 +478,10 @@ ProcessorEntry::Control::button_clicked ()
|
|||
return;
|
||||
}
|
||||
|
||||
bool const n = _button.active_state() == Gtkmm2ext::Active ? false : true;
|
||||
|
||||
c->set_value (n ? 1 : 0);
|
||||
_button.set_active_state (n ? Gtkmm2ext::Active : Gtkmm2ext::ActiveState (0));
|
||||
bool const n = _button.get_active ();
|
||||
|
||||
c->set_value (n ? 0 : 1);
|
||||
_button.set_active (!n);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -503,7 +496,7 @@ ProcessorEntry::Control::control_changed ()
|
|||
|
||||
if (c->toggled ()) {
|
||||
|
||||
_button.set_active_state (c->get_value() > 0.5 ? Gtkmm2ext::Active : Gtkmm2ext::ActiveState (0));
|
||||
_button.set_active (c->get_value() > 0.5);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
|
|
@ -129,14 +129,14 @@ RouteUI::init ()
|
|||
show_sends_button->set_name ("send alert button");
|
||||
UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), "");
|
||||
|
||||
monitor_input_button = manage (new ArdourButton (ArdourButton::led_default_elements));
|
||||
monitor_input_button->set_name ("monitor");
|
||||
monitor_input_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_input_button->set_name ("monitor button");
|
||||
monitor_input_button->set_text (_("In"));
|
||||
UI::instance()->set_tip (monitor_input_button, _("Monitor input"), "");
|
||||
monitor_input_button->set_no_show_all (true);
|
||||
|
||||
monitor_disk_button = manage (new ArdourButton (ArdourButton::led_default_elements));
|
||||
monitor_disk_button->set_name ("monitor");
|
||||
|
||||
monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_disk_button->set_name ("monitor button");
|
||||
monitor_disk_button->set_text (_("Disk"));
|
||||
UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), "");
|
||||
monitor_disk_button->set_no_show_all (true);
|
||||
|
|
@ -608,20 +608,20 @@ RouteUI::update_monitoring_display ()
|
|||
MonitorState ms = t->monitoring_state();
|
||||
|
||||
if (t->monitoring_choice() & MonitorInput) {
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::Active);
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
if (ms & MonitoringInput) {
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::Mid);
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
} else {
|
||||
monitor_input_button->unset_active_state ();
|
||||
}
|
||||
}
|
||||
|
||||
if (t->monitoring_choice() & MonitorDisk) {
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::Active);
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
if (ms & MonitoringDisk) {
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::Mid);
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
} else {
|
||||
monitor_disk_button->unset_active_state ();
|
||||
}
|
||||
|
|
@ -744,7 +744,7 @@ RouteUI::step_edit_changed (bool yn)
|
|||
{
|
||||
if (yn) {
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_active_state (Active);
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
}
|
||||
|
||||
start_step_editing ();
|
||||
|
|
@ -923,7 +923,7 @@ RouteUI::send_blink (bool onoff)
|
|||
}
|
||||
|
||||
if (onoff) {
|
||||
show_sends_button->set_active_state (Gtkmm2ext::Active);
|
||||
show_sends_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
show_sends_button->unset_active_state ();
|
||||
}
|
||||
|
|
@ -933,27 +933,27 @@ Gtkmm2ext::ActiveState
|
|||
RouteUI::solo_active_state (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return ActiveState (0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
|
||||
if (Config->get_solo_control_is_listen_control()) {
|
||||
|
||||
if (r->listening_via_monitor()) {
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else {
|
||||
return ActiveState (0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (r->soloed()) {
|
||||
if (!r->self_soloed()) {
|
||||
return Mid;
|
||||
return Gtkmm2ext::ImplicitActive;
|
||||
} else {
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
}
|
||||
} else {
|
||||
return ActiveState(0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -961,13 +961,13 @@ Gtkmm2ext::ActiveState
|
|||
RouteUI::solo_isolate_active_state (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return ActiveState (0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
|
||||
if (r->solo_isolated()) {
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else {
|
||||
return ActiveState(0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -975,13 +975,13 @@ Gtkmm2ext::ActiveState
|
|||
RouteUI::solo_safe_active_state (boost::shared_ptr<Route> r)
|
||||
{
|
||||
if (r->is_master() || r->is_monitor()) {
|
||||
return ActiveState (0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
|
||||
if (r->solo_safe()) {
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else {
|
||||
return ActiveState (0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1004,7 +1004,7 @@ RouteUI::update_solo_display ()
|
|||
|
||||
if (solo_isolated_led) {
|
||||
if (_route->solo_isolated()) {
|
||||
solo_isolated_led->set_active_state (Gtkmm2ext::Active);
|
||||
solo_isolated_led->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
solo_isolated_led->unset_active_state ();
|
||||
}
|
||||
|
|
@ -1012,7 +1012,7 @@ RouteUI::update_solo_display ()
|
|||
|
||||
if (solo_safe_led) {
|
||||
if (_route->solo_safe()) {
|
||||
solo_safe_led->set_active_state (Gtkmm2ext::Active);
|
||||
solo_safe_led->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
solo_safe_led->unset_active_state ();
|
||||
}
|
||||
|
|
@ -1050,23 +1050,23 @@ RouteUI::mute_active_state (Session* s, boost::shared_ptr<Route> r)
|
|||
|
||||
if (r->muted ()) {
|
||||
/* full mute */
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else if (!r->is_master() && s->soloing() && !r->soloed() && !r->solo_isolated()) {
|
||||
/* master is NEVER muted by others */
|
||||
return Mid;
|
||||
return Gtkmm2ext::ImplicitActive;
|
||||
} else {
|
||||
/* no mute at all */
|
||||
return ActiveState(0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (r->muted()) {
|
||||
/* full mute */
|
||||
return Active;
|
||||
return Gtkmm2ext::ExplicitActive;
|
||||
} else {
|
||||
/* no mute at all */
|
||||
return ActiveState(0);
|
||||
return Gtkmm2ext::Off;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1107,12 +1107,12 @@ RouteUI::update_rec_display ()
|
|||
if (_route->record_enabled()) {
|
||||
switch (_session->record_status ()) {
|
||||
case Session::Recording:
|
||||
rec_enable_button->set_active_state (Active);
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
break;
|
||||
|
||||
case Session::Disabled:
|
||||
case Session::Enabled:
|
||||
rec_enable_button->set_active_state (Mid);
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
@ -1907,10 +1907,10 @@ void
|
|||
RouteUI::bus_send_display_changed (boost::shared_ptr<Route> send_to)
|
||||
{
|
||||
if (_route == send_to) {
|
||||
show_sends_button->set_active_state (Gtkmm2ext::Active);
|
||||
show_sends_button->set_active (true);
|
||||
send_blink_connection = ARDOUR_UI::instance()->Blink.connect (sigc::mem_fun (*this, &RouteUI::send_blink));
|
||||
} else {
|
||||
show_sends_button->unset_active_state ();
|
||||
show_sends_button->set_active (false);
|
||||
send_blink_connection.disconnect ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,11 +36,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost:
|
|||
box->pack_end (add_button, false, false);
|
||||
box->pack_end (_preset_combo, false, false);
|
||||
|
||||
if (!insert->active ()) {
|
||||
bypass_button.set_active_state (Gtkmm2ext::Active);
|
||||
} else {
|
||||
bypass_button.unset_active_state ();
|
||||
}
|
||||
bypass_button.set_active (!insert->active ());
|
||||
|
||||
pack_start (*box, false, false);
|
||||
pack_start (_socket, true, true);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
static const char* has_cairo_widget_background_info = "has_cairo_widget_background_info";
|
||||
|
||||
CairoWidget::CairoWidget ()
|
||||
: _active_state (Gtkmm2ext::ActiveState (0))
|
||||
, _visual_state (Gtkmm2ext::VisualState (0))
|
||||
: _active_state (Gtkmm2ext::Off)
|
||||
, _visual_state (Gtkmm2ext::NoVisualState)
|
||||
, _need_bg (true)
|
||||
{
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ CairoWidget::set_active (bool yn)
|
|||
*/
|
||||
|
||||
if (yn) {
|
||||
set_active_state (Gtkmm2ext::Active);
|
||||
set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
unset_active_state ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ public:
|
|||
virtual void set_active_state (Gtkmm2ext::ActiveState);
|
||||
virtual void set_visual_state (Gtkmm2ext::VisualState);
|
||||
|
||||
void unset_active_state () { set_active_state (Gtkmm2ext::ActiveState (0)); }
|
||||
void unset_visual_state () { set_visual_state (Gtkmm2ext::VisualState (0)); }
|
||||
void unset_active_state () { set_active_state (Gtkmm2ext::Off); }
|
||||
void unset_visual_state () { set_visual_state (Gtkmm2ext::NoVisualState); }
|
||||
|
||||
/* this is an API simplification for widgets
|
||||
that only use the Active and Normal active states.
|
||||
*/
|
||||
void set_active (bool);
|
||||
bool get_active () { return active_state() != Gtkmm2ext::ActiveState (0); }
|
||||
bool get_active () { return active_state() != Gtkmm2ext::Off; }
|
||||
|
||||
/* widgets can be told to only draw their "foreground, and thus leave
|
||||
in place whatever background is drawn by their parent. the default
|
||||
|
|
|
|||
|
|
@ -96,11 +96,16 @@ namespace Gtkmm2ext {
|
|||
void rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10);
|
||||
void rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context>, double x, double y, double w, double h, double r=10);
|
||||
|
||||
void rounded_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_left_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
void rounded_top_right_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
|
||||
void rounded_top_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
void rounded_bottom_half_rectangle (cairo_t*, double x, double y, double w, double h, double r=10);
|
||||
};
|
||||
|
||||
#endif /* __gtkmm2ext_utils_h__ */
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@ namespace Gtkmm2ext {
|
|||
*/
|
||||
|
||||
enum ActiveState {
|
||||
Active = 1,
|
||||
Mid,
|
||||
Off,
|
||||
ExplicitActive,
|
||||
ImplicitActive,
|
||||
};
|
||||
|
||||
enum VisualState {
|
||||
/* these can be OR-ed together */
|
||||
NoVisualState = 0x0,
|
||||
Selected = 0x1,
|
||||
Prelight = 0x2,
|
||||
Insensitive = 0x4,
|
||||
|
|
|
|||
|
|
@ -382,36 +382,40 @@ Gtkmm2ext::container_clear (Gtk::Container& c)
|
|||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_top_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_left_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_top_left_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_right_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_top_right_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
void
|
||||
Gtkmm2ext::rounded_top_half_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_top_half_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
void
|
||||
Gtkmm2ext::rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
|
||||
{
|
||||
rounded_bottom_half_rectangle (context->cobj(), x, y, w, h, r);
|
||||
}
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* renders small shapes better than most others */
|
||||
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
|
|
@ -429,11 +433,46 @@ Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double
|
|||
cairo_curve_to (cr, x,y,x,y,x+r,y); // Curve to A
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_top_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* renders small shapes better than most others */
|
||||
|
||||
/* A****BQ
|
||||
H C
|
||||
* *
|
||||
|
|
@ -452,8 +491,6 @@ Gtkmm2ext::rounded_top_rectangle (cairo_t* cr, double x, double y, double w, dou
|
|||
void
|
||||
Gtkmm2ext::rounded_top_left_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* renders small shapes better than most others */
|
||||
|
||||
/* A****B
|
||||
H *
|
||||
* *
|
||||
|
|
@ -471,15 +508,13 @@ Gtkmm2ext::rounded_top_left_rectangle (cairo_t* cr, double x, double y, double w
|
|||
void
|
||||
Gtkmm2ext::rounded_top_right_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
/* renders small shapes better than most others */
|
||||
|
||||
/* A****BQ
|
||||
* C
|
||||
* *
|
||||
* *
|
||||
F****E
|
||||
*/
|
||||
cairo_move_to (cr, x+r,y); // Move to A
|
||||
cairo_move_to (cr, x,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
|
||||
|
|
@ -487,65 +522,6 @@ Gtkmm2ext::rounded_top_right_rectangle (cairo_t* cr, double x, double y, double
|
|||
cairo_line_to (cr, x,y); // Line to A
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double width, double height, double radius)
|
||||
{
|
||||
/* doesn't render small shapes well at all, and does not absolutely honor width & height */
|
||||
|
||||
double x0 = x+radius/2.0;
|
||||
double y0 = y+radius/2.0;
|
||||
double rect_width = width - radius;
|
||||
double rect_height = height - radius;
|
||||
|
||||
context->save();
|
||||
|
||||
double x1=x0+rect_width;
|
||||
double y1=y0+rect_height;
|
||||
|
||||
if (rect_width/2<radius) {
|
||||
if (rect_height/2<radius) {
|
||||
context->move_to (x0, (y0 + y1)/2);
|
||||
context->curve_to (x0 ,y0, x0, y0, (x0 + x1)/2, y0);
|
||||
context->curve_to (x1, y0, x1, y0, x1, (y0 + y1)/2);
|
||||
context->curve_to (x1, y1, x1, y1, (x1 + x0)/2, y1);
|
||||
context->curve_to (x0, y1, x0, y1, x0, (y0 + y1)/2);
|
||||
} else {
|
||||
context->move_to (x0, y0 + radius);
|
||||
context->curve_to (x0 ,y0, x0, y0, (x0 + x1)/2, y0);
|
||||
context->curve_to (x1, y0, x1, y0, x1, y0 + radius);
|
||||
context->line_to (x1 , y1 - radius);
|
||||
context->curve_to (x1, y1, x1, y1, (x1 + x0)/2, y1);
|
||||
context->curve_to (x0, y1, x0, y1, x0, y1- radius);
|
||||
}
|
||||
} else {
|
||||
if (rect_height/2<radius) {
|
||||
context->move_to (x0, (y0 + y1)/2);
|
||||
context->curve_to (x0 , y0, x0 , y0, x0 + radius, y0);
|
||||
context->line_to (x1 - radius, y0);
|
||||
context->curve_to (x1, y0, x1, y0, x1, (y0 + y1)/2);
|
||||
context->curve_to (x1, y1, x1, y1, x1 - radius, y1);
|
||||
context->line_to (x0 + radius, y1);
|
||||
context->curve_to (x0, y1, x0, y1, x0, (y0 + y1)/2);
|
||||
} else {
|
||||
context->move_to (x0, y0 + radius);
|
||||
context->curve_to (x0 , y0, x0 , y0, x0 + radius, y0);
|
||||
context->line_to (x1 - radius, y0);
|
||||
context->curve_to (x1, y0, x1, y0, x1, y0 + radius);
|
||||
context->line_to (x1 , y1 - radius);
|
||||
context->curve_to (x1, y1, x1, y1, x1 - radius, y1);
|
||||
context->line_to (x0 + radius, y1);
|
||||
context->curve_to (x0, y1, x0, y1, x0, y1- radius);
|
||||
}
|
||||
}
|
||||
|
||||
context->close_path ();
|
||||
context->restore();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Glib::RefPtr<Gdk::Window>
|
||||
Gtkmm2ext::window_to_draw_on (Gtk::Widget& w, Gtk::Widget** parent)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue