~ubuntu-branches/ubuntu/lucid/ardour/lucid-proposed

« back to all changes in this revision

Viewing changes to gtk2_ardour/time_axis_view_item.cc

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2008-07-29 11:27:04 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20080729112704-x1rmgb4tjotjyu5u
Tags: 1:2.5-0ubuntu1
* New upstream release.
* debian/patches/s390-FTBFS.patch: Dropped, as it fails to apply, and
  Ubuntu doesn't concern itself with s390.
* debian/control:
  - Fix package description, thanks to the patch in Debian bug #485892.
  - Metadata cleanup and sync control/control.in files.
  - Add libaubio-dev to Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 * @param duration the duration of this item
70
70
 */
71
71
TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, 
72
 
                                   nframes_t start, nframes_t duration,
 
72
                                   nframes_t start, nframes_t duration, bool recording,
73
73
                                   Visibility vis)
74
 
        : trackview (tv)
 
74
        : trackview (tv), _recregion(recording)
75
75
{
76
76
        if (!have_name_font) {
77
77
 
150
150
        vestigial_frame->property_x1() = (double) 0.0;
151
151
        vestigial_frame->property_y1() = (double) 1.0;
152
152
        vestigial_frame->property_x2() = 2.0;
153
 
        vestigial_frame->property_y2() = (double) trackview.height;
 
153
        vestigial_frame->property_y2() = (double) trackview.current_height();
154
154
        vestigial_frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
155
155
        vestigial_frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_VestigialFrame.get();
156
156
        vestigial_frame->hide ();
160
160
                frame->property_x1() = (double) 0.0;
161
161
                frame->property_y1() = (double) 1.0;
162
162
                frame->property_x2() = (double) trackview.editor.frame_to_pixel(duration);
163
 
                frame->property_y2() = (double) trackview.height;
 
163
                frame->property_y2() = (double) trackview.current_height();
164
164
                frame->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
165
165
                frame->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get();
166
166
 
195
195
                        name_highlight->property_x1() = (double) 1.0;
196
196
                        name_highlight->property_x2() = (double) (trackview.editor.frame_to_pixel(item_duration)) - 1;
197
197
                }
198
 
                name_highlight->property_y1() = (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
199
 
                name_highlight->property_y2() = (double) (trackview.height - 1);
 
198
                name_highlight->property_y1() = (double) (trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
 
199
                name_highlight->property_y2() = (double) (trackview.current_height() - 1);
200
200
                name_highlight->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_NameHighlightFill.get();
201
201
                name_highlight->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_NameHighlightOutline.get();
202
202
 
209
209
        if (visibility & ShowNameText) {
210
210
                name_text = new ArdourCanvas::Text (*group);
211
211
                name_text->property_x() = (double) TimeAxisViewItem::NAME_X_OFFSET;
212
 
                /* trackview.height is the bottom of the trackview. subtract 1 to get back to the bottom of the highlight,
 
212
                /* trackview.current_height() is the bottom of the trackview. subtract 1 to get back to the bottom of the highlight,
213
213
                   then NAME_Y_OFFSET to position the text in the vertical center of the highlight
214
214
                */
215
 
                name_text->property_y() = (double) trackview.height - 1.0 - TimeAxisViewItem::NAME_Y_OFFSET;
 
215
                name_text->property_y() = (double) trackview.current_height() - 1.0 - TimeAxisViewItem::NAME_Y_OFFSET;
216
216
                name_text->property_font_desc() = *NAME_FONT;
217
217
                name_text->property_anchor() = Gtk::ANCHOR_NW;
218
218
 
798
798
                        UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_SelectedFrameBase.get(), &r, &g, &b, &a); 
799
799
                        frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);// Lets still use the theme's opacity value if Opaque is not set
800
800
                } else {
801
 
                        UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a);
802
 
                        frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);
 
801
                        if (_recregion) {
 
802
                                UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_RecordingRect.get(), &r, &g, &b, &a);
 
803
                                frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, a);
 
804
                        } else {
 
805
                                UINT_TO_RGBA(ARDOUR_UI::config()->canvasvar_FrameBase.get(), &r, &g, &b, &a);
 
806
                                frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity ? fill_opacity : a);
 
807
                        }
803
808
                }
804
809
        }
805
810
}
1043
1048
        item = 0;
1044
1049
        return false;
1045
1050
}
 
1051