ibeam column select tweaks, fix title alpha fader value popup, title bar border color...
authorGood Guy <[email protected]>
Sat, 22 Dec 2018 20:36:50 +0000 (13:36 -0700)
committerGood Guy <[email protected]>
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 76bde5e8da7d67e9312523f4ff765fcc39c0730a..44c85cbaae4cff094326df73bbcc5a2b729ca85c 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 79a4e94374d1c53ff03d22f0b4f00ed388c2699e..86fb5023d384252047453b4b89918e035dad38dd 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 ca9c1004da1a2d11290e36df857b435e011b1a5d..c377a8477136fba49275e2692cc45017815d4a6f 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 274961c0473df18b7d21dd1742a4d40ae9baa296..38f18aeb4b5b8cde6b942f6b5d0ed6d19811ad54 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 7a60a1f44ee423a3c953b92d71cb0ffd8949803d..882e5c9cfd3b470a2a48d2f0f0a80b3175f7f3ee 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 ef7332ace4ac1b4419f283eeac3d6e9346af2db1..18bb5181f7aaad435738e51bbf4e43936a58ef4f 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 686f258d04fe88586f0516be86181d08a0333dc9..ac9362dcd269659f7f285d2cd5ef4f717f3ba99e 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:"