mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
make fine-tuning modifiers for PixFader platform specific
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3063 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6f0f3d7056
commit
0c71b89a15
2 changed files with 13 additions and 2 deletions
|
|
@ -61,6 +61,9 @@ class PixFader : public Gtk::DrawingArea {
|
|||
void adjustment_changed ();
|
||||
|
||||
int display_height ();
|
||||
|
||||
static uint fine_scale_modifier;
|
||||
static uint extra_fine_scale_modifier;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ using namespace Gtk;
|
|||
using namespace Gdk;
|
||||
using namespace std;
|
||||
|
||||
#ifdef GTKOSX
|
||||
uint PixFader::fine_scale_modifier = GDK_META_MASK;
|
||||
#else
|
||||
uint PixFader::fine_scale_modifier = GDK_CONTROL_MASK;
|
||||
#endif
|
||||
|
||||
uint PixFader::extra_fine_scale_modifier = GDK_MOD1_MASK;
|
||||
|
||||
PixFader::PixFader (Glib::RefPtr<Pixbuf> belt, Gtk::Adjustment& adj)
|
||||
: adjustment (adj),
|
||||
pixbuf (belt)
|
||||
|
|
@ -205,8 +213,8 @@ PixFader::on_motion_notify_event (GdkEventMotion* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (ev->state & GDK_CONTROL_MASK) {
|
||||
if (ev->state & GDK_MOD1_MASK) {
|
||||
if (ev->state & fine_scale_modifier) {
|
||||
if (ev->state & extra_fine_scale_modifier) {
|
||||
scale = 0.05;
|
||||
} else {
|
||||
scale = 0.1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue