provide global prelight option (its in Edit -> Preferences->Interface)

git-svn-id: svn://localhost/ardour2/branches/3.0@10514 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-11-09 20:10:05 +00:00
parent 9d56b190ad
commit 244eaa55fb
7 changed files with 18 additions and 15 deletions

View File

@ -392,4 +392,4 @@ widget "*MonitorSectionLabel" style:highest "very_small_text"
widget "*mute button" style:highest "small_text"
widget "*send alert button" style:highest "small_text"
widget "*solo button" style:highest "small_text"
widget "*transport option button" style:highest "small_text"
widget "*transport option button" style:highest "very_small_text"

View File

@ -30,6 +30,8 @@
#include "gtkmm2ext/rgb_macros.h"
#include "gtkmm2ext/gui_thread.h"
#include "ardour/rc_configuration.h" // for widget prelight preference
#include "ardour_button.h"
#include "ardour_ui.h"
#include "global_signals.h"
@ -246,7 +248,7 @@ ArdourButton::render (cairo_t* cr)
/* if requested, show hovering */
if ((_tweaks & ShowHover)) {
if (ARDOUR::Config->get_widget_prelight()) {
if (_hovering) {
Gtkmm2ext::rounded_rectangle (cr, 0, 0, _width, _height, _corner_radius);
cairo_set_source_rgba (cr, 0.905, 0.917, 0.925, 0.2);
@ -634,7 +636,7 @@ ArdourButton::on_enter_notify_event (GdkEventCrossing* ev)
{
_hovering = true;
if (_tweaks & ShowHover) {
if (ARDOUR::Config->get_widget_prelight()) {
queue_draw ();
}
@ -646,7 +648,7 @@ ArdourButton::on_leave_notify_event (GdkEventCrossing* ev)
{
_hovering = false;
if (_tweaks & ShowHover) {
if (ARDOUR::Config->get_widget_prelight()) {
queue_draw ();
}

View File

@ -50,7 +50,6 @@ class ArdourButton : public CairoWidget
enum Tweaks {
ShowClick = 0x1,
ShowHover = 0x2,
NoModel = 0x4,
};

View File

@ -237,15 +237,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
rec_button.set_name ("transport recenable button");
join_play_range_button.set_name ("transport button");
roll_button.set_tweaks (ArdourButton::ShowHover);
stop_button.set_tweaks (ArdourButton::ShowHover);
auto_loop_button.set_tweaks (ArdourButton::ShowHover);
play_selection_button.set_tweaks (ArdourButton::ShowHover);
rec_button.set_tweaks (ArdourButton::ShowHover);
join_play_range_button.set_tweaks (ArdourButton::ShowHover);
goto_start_button.set_tweaks (ArdourButton::Tweaks(ArdourButton::ShowClick|ArdourButton::ShowHover));
goto_end_button.set_tweaks (ArdourButton::Tweaks(ArdourButton::ShowClick|ArdourButton::ShowHover));
goto_start_button.set_tweaks (ArdourButton::ShowClick);
goto_end_button.set_tweaks (ArdourButton::ShowClick);
last_configure_time= 0;
last_peak_grab = 0;

View File

@ -1493,6 +1493,14 @@ RCOptionEditor::RCOptionEditor ()
/* INTERFACE */
add_option (_("Interface"),
new BoolOption (
"widget_prelight",
_("Graphically indicate mouse pointer hovering over various widgets"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_widget_prelight),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight)
));
#ifndef GTKOSX
/* font scaling does nothing with GDK/Quartz */
add_option (_("Interface"), new FontScalingOptions (_rc_config));

View File

@ -177,4 +177,5 @@ CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone)
/* visibility of various things */
CONFIG_VARIABLE (bool, show_zoom_tools, "show-zoom-tools", true)
CONFIG_VARIABLE (bool, widget_prelight, "widget-prelight", true)
CONFIG_VARIABLE (std::string, mixer_strip_visibility, "mixer-strip-visibility", "PhaseInvert,SoloSafe,SoloIsolated,Group,MeterPoint")

View File

@ -18,7 +18,7 @@ $group_number = 0;
%merge_bindings;
$platform = linux;
$winkey = 'Mod4><Super';
$winkey = 'Mod4\>\<Super';
$make_cheatsheet = 1;
$make_accelmap = 0;
$merge_from = "";