mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 23:47:39 +01:00
Infrastructure for customized SAE ui themes. Some performance improvements for osx-visible momentary solo gui glitches, allow solo all even when solo not latched (see comments).
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4093 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5b25697c28
commit
09581e07d3
10 changed files with 3247 additions and 24 deletions
|
|
@ -401,6 +401,8 @@ for style in ['', 'BOLD', 'ITALIC']:
|
|||
|
||||
ardour_dark_theme = env.SubstInFile ('ardour2_ui_dark.rc', 'ardour2_ui_dark.rc.in', SUBST_DICT = my_font_dict)
|
||||
ardour_light_theme = env.SubstInFile ('ardour2_ui_light.rc', 'ardour2_ui_light.rc.in', SUBST_DICT = my_font_dict)
|
||||
ardour_dark_sae_theme = env.SubstInFile ('ardour2_ui_dark_sae.rc', 'ardour2_ui_dark_sae.rc.in', SUBST_DICT = my_font_dict)
|
||||
ardour_light_sae_theme = env.SubstInFile ('ardour2_ui_light_sae.rc', 'ardour2_ui_light_sae.rc.in', SUBST_DICT = my_font_dict)
|
||||
|
||||
my_subst_dict = { }
|
||||
|
||||
|
|
@ -452,6 +454,8 @@ Default(ardourdev)
|
|||
Default(ardoursh)
|
||||
Default(ardour_dark_theme)
|
||||
Default(ardour_light_theme)
|
||||
Default(ardour_dark_sae_theme)
|
||||
Default(ardour_light_sae_theme)
|
||||
|
||||
if env['VST']:
|
||||
Default(ardourlib)
|
||||
|
|
@ -477,6 +481,8 @@ if env['NLS']:
|
|||
# configuration files
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_dark_theme))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_light_theme))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_dark_sae_theme))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), ardour_light_sae_theme))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_default.conf'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
|
||||
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour-sae.menus'))
|
||||
|
|
@ -535,7 +541,7 @@ env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
|||
'ardour.sh.in',
|
||||
'ardev_common.sh.in',
|
||||
'ardev', 'ardbg',
|
||||
'ardour2_ui_dark.rc.in', 'ardour2_ui_light.rc.in', 'splash.png',
|
||||
'ardour2_ui_dark.rc.in', 'ardour2_ui_light.rc.in', 'ardour2_ui_dark_sae.rc.in', 'ardour2_ui_light_sae.rc.in', 'splash.png',
|
||||
'ardour.menus', 'ardour-sae.menus',
|
||||
'mnemonic-us.bindings.in',
|
||||
'ergonomic-us.bindings.in',
|
||||
|
|
|
|||
1581
gtk2_ardour/ardour2_ui_dark_sae.rc.in
Normal file
1581
gtk2_ardour/ardour2_ui_dark_sae.rc.in
Normal file
File diff suppressed because it is too large
Load diff
1583
gtk2_ardour/ardour2_ui_light_sae.rc.in
Normal file
1583
gtk2_ardour/ardour2_ui_light_sae.rc.in
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -2,8 +2,9 @@
|
|||
<Ardour>
|
||||
<Canvas>
|
||||
<Option name="active crossfade" value="e8ed3d77"/>
|
||||
<Option name="audio bus base" value="dbd1ea68"/>
|
||||
<Option name="audio track base" value="c6d3d868"/>
|
||||
<Option name="audio bus base" value="abe1aa68"/>
|
||||
<Option name="audio master bus base" value="ebd1ea68"/>
|
||||
<Option name="audio track base" value="c3c3c868"/>
|
||||
<Option name="automation line" value="44bc59ff"/>
|
||||
<Option name="automation track fill" value="a0a0ce68"/>
|
||||
<Option name="automation track outline" value="282828ff"/>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <ardour/playlist_templates.h>
|
||||
#include <ardour/source.h>
|
||||
#include <ardour/region_factory.h>
|
||||
#include <ardour/profile.h>
|
||||
|
||||
#include "audio_streamview.h"
|
||||
#include "audio_region_view.h"
|
||||
|
|
@ -789,8 +790,11 @@ AudioStreamView::color_handler ()
|
|||
}
|
||||
|
||||
if (!_trackview.is_track()) {
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioBusBase.get();
|
||||
if (Profile->get_sae() && _trackview.route()->master()) {
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioMasterBusBase.get();
|
||||
} else {
|
||||
canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_AudioBusBase.get();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
CANVAS_VARIABLE(canvasvar_ActiveCrossfade, "active crossfade")
|
||||
CANVAS_VARIABLE(canvasvar_AudioBusBase, "audio bus base")
|
||||
CANVAS_VARIABLE(canvasvar_AudioMasterBusBase, "audio master bus base")
|
||||
CANVAS_VARIABLE(canvasvar_AudioTrackBase, "audio track base")
|
||||
CANVAS_VARIABLE(canvasvar_AutomationLine, "automation line")
|
||||
CANVAS_VARIABLE(canvasvar_AutomationTrackFill, "automation track fill")
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ RouteUI::init ()
|
|||
was_solo_safe = false;
|
||||
polarity_menu_item = 0;
|
||||
denormal_menu_item = 0;
|
||||
multiple_mute_change = false;
|
||||
multiple_solo_change = false;
|
||||
|
||||
mute_button = manage (new BindableToggleButton (0, ""));
|
||||
mute_button->set_self_managed (true);
|
||||
|
|
@ -206,7 +208,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
multiple_mute_change = false;
|
||||
if (!ignore_toggle) {
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
|
@ -242,6 +244,7 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
cmd->mark();
|
||||
_session.add_command(cmd);
|
||||
_session.commit_reversible_command ();
|
||||
multiple_mute_change = true;
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
|
|
@ -256,8 +259,11 @@ RouteUI::mute_press(GdkEventButton* ev)
|
|||
} else {
|
||||
|
||||
/* plain click applies change to this route */
|
||||
|
||||
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !_route->muted(), this);
|
||||
if (wait_for_release) {
|
||||
_route->set_mute (!_route->muted(), this);
|
||||
} else {
|
||||
reversibly_apply_route_boolean ("mute change", &Route::set_mute, !_route->muted(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -273,9 +279,14 @@ RouteUI::mute_release(GdkEventButton* ev)
|
|||
if (!ignore_toggle) {
|
||||
if (wait_for_release){
|
||||
wait_for_release = false;
|
||||
// undo the last op
|
||||
// because the press was the last undoable thing we did
|
||||
_session.undo (1U);
|
||||
if (multiple_mute_change) {
|
||||
multiple_mute_change = false;
|
||||
// undo the last op
|
||||
// because the press was the last undoable thing we did
|
||||
_session.undo (1U);
|
||||
} else {
|
||||
_route->set_mute (!_route->muted(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
@ -289,7 +300,7 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
multiple_solo_change = false;
|
||||
if (!ignore_toggle) {
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
|
@ -319,13 +330,26 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
/* Primary-Tertiary-click applies change to all routes */
|
||||
|
||||
bool was_not_latched = false;
|
||||
if (!Config->get_solo_latched ()) {
|
||||
was_not_latched = true;
|
||||
/*
|
||||
XXX it makes no sense to solo all tracks if we're
|
||||
not in latched mode, but doing nothing feels like a bug,
|
||||
so do it anyway
|
||||
*/
|
||||
Config->set_solo_latched (true);
|
||||
}
|
||||
_session.begin_reversible_command (_("solo change"));
|
||||
Session::GlobalSoloStateCommand *cmd = new Session::GlobalSoloStateCommand(_session, this);
|
||||
_session.set_all_solo (!_route->soloed());
|
||||
cmd->mark();
|
||||
_session.add_command (cmd);
|
||||
_session.commit_reversible_command ();
|
||||
multiple_solo_change = true;
|
||||
if (was_not_latched) {
|
||||
Config->set_solo_latched (false);
|
||||
}
|
||||
|
||||
} else if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
|
||||
|
||||
|
|
@ -368,7 +392,11 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
} else {
|
||||
|
||||
/* click: solo this route */
|
||||
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route->soloed(), this);
|
||||
if (wait_for_release) {
|
||||
_route->set_solo (!_route->soloed(), this);
|
||||
} else {
|
||||
reversibly_apply_route_boolean ("solo change", &Route::set_solo, !_route->soloed(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -383,10 +411,16 @@ RouteUI::solo_release(GdkEventButton* ev)
|
|||
if (!ignore_toggle) {
|
||||
if (wait_for_release) {
|
||||
wait_for_release = false;
|
||||
// undo the last op
|
||||
// because the press was the last undoable thing we did
|
||||
|
||||
_session.undo (1U);
|
||||
if (multiple_solo_change) {
|
||||
multiple_solo_change = false;
|
||||
// undo the last op
|
||||
// because the press was the last undoable thing we did
|
||||
_session.undo (1U);
|
||||
} else {
|
||||
// we don't use "undo the last op"
|
||||
// here because its expensive for the GUI
|
||||
_route->set_solo (!_route->soloed(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ class RouteUI : public virtual AxisView
|
|||
|
||||
bool ignore_toggle;
|
||||
bool wait_for_release;
|
||||
bool multiple_mute_change;
|
||||
bool multiple_solo_change;
|
||||
|
||||
BindableToggleButton* mute_button;
|
||||
BindableToggleButton* solo_button;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <gtkmm/settings.h>
|
||||
|
||||
#include <ardour/profile.h>
|
||||
|
||||
#include "theme_manager.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -195,8 +197,11 @@ void
|
|||
ThemeManager::on_dark_theme_button_toggled()
|
||||
{
|
||||
if (!dark_button.get_active()) return;
|
||||
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark.rc");
|
||||
if (Profile->get_sae()) {
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark_sae.rc");
|
||||
} else {
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_dark.rc");
|
||||
}
|
||||
load_rc_file (ARDOUR_UI::config()->ui_rc_file.get(), true);
|
||||
}
|
||||
|
||||
|
|
@ -204,8 +209,11 @@ void
|
|||
ThemeManager::on_light_theme_button_toggled()
|
||||
{
|
||||
if (!light_button.get_active()) return;
|
||||
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc");
|
||||
if (Profile->get_sae()) {
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light_sae.rc");
|
||||
} else {
|
||||
ARDOUR_UI::config()->ui_rc_file.set("ardour2_ui_light.rc");
|
||||
}
|
||||
load_rc_file (ARDOUR_UI::config()->ui_rc_file.get(), true);
|
||||
}
|
||||
|
||||
|
|
@ -242,9 +250,9 @@ ThemeManager::setup_theme ()
|
|||
rcfile = ARDOUR_UI::config()->ui_rc_file.get();
|
||||
}
|
||||
|
||||
if (rcfile == "ardour2_ui_dark.rc") {
|
||||
if (rcfile == "ardour2_ui_dark.rc" || rcfile == "ardour2_ui_dark_sae.rc") {
|
||||
dark_button.set_active();
|
||||
} else if (rcfile == "ardour2_ui_light.rc") {
|
||||
} else if (rcfile == "ardour2_ui_light.rc" || "ardour2_ui_light_sae.rc") {
|
||||
light_button.set_active();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ if test x$SAE != x ; then
|
|||
#
|
||||
env="$env<key>ARDOUR_KEYBOARD_LAYOUT</key><string>de</string>"
|
||||
env="$env<key>ARDOUR_UI_CONF</key><string>ardour2_ui_sae.conf</string>"
|
||||
env="$env<key>ARDOUR2_UI_RC</key><string>ardour2_ui_dark_sae.rc</string>"
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
@ -216,6 +217,8 @@ cp ../../gtk2_ardour/ardour2_ui_sae.conf $Resources
|
|||
cp ../../gtk2_ardour/ardour2_ui_default.conf $Resources
|
||||
cp ../../gtk2_ardour/ardour2_ui_light.rc $Resources
|
||||
cp ../../gtk2_ardour/ardour2_ui_dark.rc $Resources
|
||||
cp ../../gtk2_ardour/ardour2_ui_light_sae.rc $Resources
|
||||
cp ../../gtk2_ardour/ardour2_ui_dark_sae.rc $Resources
|
||||
|
||||
cp -r ../../gtk2_ardour/icons $Resources
|
||||
cp -r ../../gtk2_ardour/pixmaps $Resources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue