[Summary] Progressing time info box for tracks

This commit is contained in:
VKamyshniy 2014-08-13 10:22:21 +03:00
parent 11d1c23b93
commit 25d9b2693c
7 changed files with 41 additions and 39 deletions

View file

@ -413,10 +413,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
Gtk::VBox transport_button_vbox;
Gtk::HBox transport_option_button_hbox;
Gtk::VBox transport_option_button_vbox;
Gtk::HBox transport_clock_hbox;
Gtk::VBox transport_clock_vbox;
Gtk::HBox primary_clock_hbox;
Gtk::HBox secondary_clock_hbox;
struct TransportControllable : public PBD::Controllable {
enum ToggleType {

View file

@ -392,6 +392,8 @@ ARDOUR_UI::setup_transport ()
tbox->pack_start (*a1, false, false);
tbox->pack_start (*a2, false, false);
primary_clock->set_draw_background (false);
primary_clock->set_visible_window (false);
editor->get_box ("primary_clock_home").pack_start (*primary_clock, false, false);
shuttle_box = new ShuttleControl;

View file

@ -290,17 +290,19 @@ AudioClock::render (cairo_t* cr)
cairo_set_source_rgba (cr, bg_r, bg_g, bg_b, bg_a);
if (corner_radius) {
if (_left_layout) {
Gtkmm2ext::rounded_top_half_rectangle (cr, 0, 0, get_width(), upper_height, corner_radius);
Gtkmm2ext::rounded_top_half_rectangle (cr, _current_event_expose->area.x, _current_event_expose->area.y, get_width(), upper_height, corner_radius);
} else {
Gtkmm2ext::rounded_rectangle (cr, 0, 0, get_width(), upper_height, corner_radius);
Gtkmm2ext::rounded_rectangle (cr, _current_event_expose->area.x, _current_event_expose->area.y, get_width(), upper_height, corner_radius);
}
} else {
cairo_rectangle (cr, 0, 0, get_width(), upper_height);
cairo_rectangle (cr, _current_event_expose->area.x, _current_event_expose->area.y, get_width(), upper_height);
}
cairo_fill (cr);
}
cairo_move_to (cr, (get_width() - layout_width) / 2.0, (upper_height - layout_height) / 2.0);
cairo_move_to (cr,
(get_width() - layout_width) / 2.0 + _current_event_expose->area.x,
(upper_height - layout_height) / 2.0 + _current_event_expose->area.y);
pango_cairo_show_layout (cr, _layout->gobj());

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -68,7 +68,9 @@ TimeInfoBox::TimeInfoBox ()
selection_length.set_draw_background (false);
selection_length.set_visible_window (false);
punch_start.set_draw_background (false);
punch_start.set_visible_window (false);
punch_end.set_draw_background (false);
punch_end.set_visible_window (false);
//left.set_homogeneous (false);
//left.set_spacings (0);

View file

@ -26,8 +26,16 @@
normalicon="tracks"
activeicon="tracks_active"
prelighticon="tracks_prelight"/>
<HBox id="time_info_box_home" width="300"/>
<HBox id="primary_clock_home"/>
<Layout width="407" height="51">
<icon source="top_bar_background.png"
tooltip="--------------------&#xA;This is a mockup&#xA;--------------------" />
<HBox id="time_info_box_home"
x="60"
y="4"/>
<HBox id="primary_clock_home"
x="132"
y="6"/>
</Layout>
<Layout box.pack="end" width="114">
<Adjustment id="dsp_load_adjustment"
minvalue="1"

View file

@ -1,33 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<TimeInfoBox>
<Layout bgnormal="#7f6f5f" width="404" height="51">
<icon source="time_info_start_end_length.png"/>
<EventBox bgnormal="#7f0000"
x="52"
y="5">
<HBox id="selection_start_home"/>
</EventBox>
<EventBox bgnormal="#9f0000"
x="52"
y="21"
visiblewindow="false">
<HBox id="selection_end_home"/>
</EventBox>
<EventBox bgnormal="#bf0000"
x="52"
y="37">
<HBox id="selection_length_home"/>
</EventBox>
<HBox id="punch_start_home"
width="66"
height="10"
x="118"
y="0"/>
<HBox id="punch_end_home"
width="66"
height="10"
x="118"
y="10"/>
</Layout>
<HBox id="selection_start_home"
x="52"
y="5"/>
<HBox height="6"/>
<HBox id="selection_end_home"
x="52"
y="21"/>
<HBox height="5"/>
<HBox id="selection_length_home"
x="52"
y="37"/>
<HBox id="punch_start_home"
width="66"
height="10"
x="118"
y="0" ui.orphan="true"/>
<HBox id="punch_end_home"
width="66"
height="10"
x="118"
y="10" ui.orphan="true"/>
</TimeInfoBox>