ibeam column select tweaks, fix title alpha fader value popup, title bar border color...
authorGood Guy <good1.2guy@gmail.com>
Sat, 22 Dec 2018 20:36:50 +0000 (13:36 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 22 Dec 2018 20:36:50 +0000 (13:36 -0700)
cinelerra-5.1/cinelerra/interfaceprefs.C
cinelerra-5.1/cinelerra/resourcepixmap.C
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/zoombar.C
cinelerra-5.1/guicast/bcslider.C
cinelerra-5.1/guicast/bcslider.h
cinelerra-5.1/po/fr.po

index 76bde5e..44c85cb 100644 (file)
@@ -176,12 +176,12 @@ void InterfacePrefs::create_objects()
        y += 30;
 
        add_subwindow(title = new BC_Title(x1=x, y + 5, _("Min DB for meter:")));
-       x1 += title->get_w() + 10;
+       x1 += title->get_w() + 4;
        sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
        add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y));
-       x1 += min_db->get_w() + 10;
+       x1 += min_db->get_w() + 4;
        add_subwindow(title = new BC_Title(x1, y + 5, _("Max:")));
-       x1 += title->get_w() + 10;
+       x1 += title->get_w() + 4;
        sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
        add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y));
        y += 30;
index 79a4e94..86fb502 100644 (file)
@@ -238,10 +238,11 @@ VFrame *ResourcePixmap::change_title_color(VFrame *title_bg, int color)
        VFrame *title_bar = new VFrame(tw, th, colormodel);
        uint8_t cr = (color>>16), cg = (color>>8), cb = (color>>0);
        uint8_t **bar_rows = title_bar->get_rows();
+       const uint8_t gap_grey = 0x4a;
        if( th > 0 ) {
                uint8_t *cp = bar_rows[0];
                for( int x=0; x<tw; ++x ) {
-                       cp[0] = cp[1] = cp[2] = 0;
+                       cp[0] = cp[1] = cp[2] = gap_grey;
                        if( bpp > 3 ) cp[3] = 0xff;
                        cp += bpp;
                }
@@ -249,7 +250,7 @@ VFrame *ResourcePixmap::change_title_color(VFrame *title_bg, int color)
        for( int y=1; y<th; ++y ) {
                uint8_t *cp = bar_rows[y];
                if( tw > 0 ) {
-                       cp[0] = cp[1] = cp[2] = 0;
+                       cp[0] = cp[1] = cp[2] = gap_grey;
                        if( bpp > 3 ) cp[3] = 0xff;
                        cp += bpp;
                }
@@ -259,7 +260,7 @@ VFrame *ResourcePixmap::change_title_color(VFrame *title_bg, int color)
                        cp += bpp;
                }
                if( tw > 1 ) {
-                       cp[0] = cp[1] = cp[2] = 0;
+                       cp[0] = cp[1] = cp[2] = gap_grey;
                        if( bpp > 3 ) cp[3] = 0xff;
                }
        }
index ca9c100..c377a84 100644 (file)
@@ -2283,13 +2283,13 @@ void TrackCanvas::draw_keyframe_reticle()
        int autoidx = dragging && keyframe_hairline != HAIRLINE_ALWAYS ?
                mwindow->session->drag_auto->autos->autoidx : -1;
 
-       if( get_buttonpress() == 1 && dragging &&
+       if( get_buttonpress() == LEFT_BUTTON && dragging &&
             keyframe_hairline == HAIRLINE_DRAGGING ) {
                draw_hairline(mwindow->session->drag_auto, RED, 1);
                return;
        }
 
-       if( keyframe_hairline == HAIRLINE_ALWAYS || ( get_buttonpress() == 2 &&
+       if( keyframe_hairline == HAIRLINE_ALWAYS || ( get_buttonpress() == MIDDLE_BUTTON &&
            keyframe_hairline == HAIRLINE_DRAGGING && dragging ) ) {
                int show = dragging || keyframe_hairline == HAIRLINE_ALWAYS ? 1 : 0;
                for( Track *track = mwindow->edl->tracks->first; track; track=track->next ) {
@@ -4841,7 +4841,7 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
 // Cursor inside an edit
                        if(cursor_x >= edit_x && cursor_x < edit_x + edit_w &&
                                cursor_y >= edit_y && cursor_y < edit_y + edit_h) {
-                               if( button_press ) {
+                               if( button_press && get_buttonpress() == LEFT_BUTTON ) {
                                        if( mwindow->edl->session->editing_mode == EDITING_IBEAM &&
                                            get_double_click() ) {
 // Select duration of edit
@@ -4857,9 +4857,12 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                                        edit->track, 1);
                                                result = 1;
                                        }
-                                       else if( mwindow->edl->session->editing_mode == EDITING_ARROW ) {
+                                       else if( mwindow->edl->session->editing_mode == EDITING_ARROW ||
+                                               (mwindow->edl->session->editing_mode == EDITING_IBEAM &&
+                                                ctrl_down()) ) {
                                                mwindow->session->drag_edit = edit;
                                                mwindow->session->current_operation = DRAG_BUTTON_DOWN;
+                                               result = 1;
                                        }
                                        if( result ) {
                                                rerender = 1;
@@ -4867,7 +4870,9 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                        }
                                }
                                else if( drag_start && track->record ) {
-                                       if( mwindow->edl->session->editing_mode == EDITING_ARROW ) {
+                                       if( mwindow->edl->session->editing_mode == EDITING_ARROW ||
+                                           ( mwindow->edl->session->editing_mode == EDITING_IBEAM &&
+                                             ctrl_down() ) ) {
 // Need to create drag window
                                                mwindow->session->drag_edit = edit;
                                                mwindow->session->drag_origin_x = cursor_x;
@@ -4925,6 +4930,7 @@ int TrackCanvas::test_track_group(EDL *group, Track *first_track, double &pos)
 
 int TrackCanvas::edit_intersects(Track *track, Edit *src_edit, double &pos)
 {
+       if( pos < 0 ) { pos = 0;  return 1; }
        int64_t src_start = src_edit->startproject;
        int64_t src_end = src_start + src_edit->length;
        double new_start = src_edit->track->from_units(src_start) + pos;
@@ -4992,7 +4998,7 @@ int TrackCanvas::do_plugins(int cursor_x, int cursor_y, int drag_start,
        if(plugin) {
 // Start plugin popup
                if(button_press) {
-                       if(get_buttonpress() == 3) {
+                       if(get_buttonpress() == RIGHT_BUTTON ) {
                                gui->plugin_menu->update(plugin);
                                gui->plugin_menu->activate_menu();
                                result = 1;
@@ -5100,7 +5106,7 @@ int TrackCanvas::do_transitions(int cursor_x, int cursor_y,
                if(!button_press) {
                        new_cursor = UPRIGHT_ARROW_CURSOR;
                }
-               else if(get_buttonpress() == 3) {
+               else if(get_buttonpress() == RIGHT_BUTTON ) {
                        gui->transition_menu->update(transition);
                        gui->transition_menu->activate_menu();
                }
index 274961c..38f18ae 100644 (file)
@@ -201,7 +201,7 @@ TitleAlphaBar::TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
        this->mwindow = mwindow;
        this->zoombar = zoombar;
        set_precision(0.01);
-       set_tooltip(_("Title Alpha"));
+       enable_show_value(0);
 }
 
 int TitleAlphaBar::handle_event()
@@ -224,7 +224,7 @@ TitleAlphaText::TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
 
 int TitleAlphaText::handle_event()
 {
-       float v = atof(get_text())*100;
+       float v = atof(get_text());
        mwindow->session->title_bar_alpha = v;
        zoombar->title_alpha_bar->update(v);
        mwindow->gui->draw_trackmovement();
index 7a60a1f..882e5c9 100644 (file)
@@ -171,6 +171,7 @@ int BC_Slider::get_button_pixels()
 
 void BC_Slider::show_value_tooltip()
 {
+       if( !show_number ) return;
 //printf("BC_Slider::show_value_tooltip %s\n", get_caption());
        set_tooltip(get_caption());
        keypress_tooltip_timer = 2000;
@@ -195,7 +196,7 @@ int BC_Slider::repeat_event(int64_t duration)
                        }
                }
                else
-               if(status == SLIDER_HI && tooltip_text)
+               if(status == SLIDER_HI && tooltip_text && show_number)
                {
                        if(!tooltip_text[0] || isdigit(tooltip_text[0]))
                        {
@@ -298,6 +299,11 @@ void BC_Slider::disable()
        draw_face(1);
 }
 
+void BC_Slider::enable_show_value(int v)
+{
+       show_number = v;
+}
+
 int BC_Slider::button_press_event()
 {
        int result = 0;
index ef7332a..18bb518 100644 (file)
@@ -51,6 +51,7 @@ public:
        int initialize();
        void enable();
        void disable();
+       void enable_show_value(int v);
        static int get_span(int vertical);
        int get_button_pixels();
        virtual int value_to_pixel() { return 0; };
index 686f258..ac9362d 100644 (file)
@@ -3996,7 +3996,7 @@ msgstr "Keyframe reticle:"
 
 #: cinelerra//interfaceprefs.C:209
 msgid "PIN:"
-msgstr "ÉPINGLE:"
+msgstr "PIN:"
 
 #: cinelerra//interfaceprefs.C:232
 msgid "Clicking on edit boundaries does what:"
@@ -4019,8 +4019,8 @@ msgid "Min DB for meter:"
 msgstr "Valeur minimale en dB de l'indicateur :"
 
 #: cinelerra//interfaceprefs.C:267
-msgid "Max DB:"
-msgstr "Valeur max en dB :"
+#msgid "Max:"
+#msgstr "Valeur max en dB :"
 
 #: cinelerra//interfaceprefs.C:275
 msgid "Theme:"