more clock tweaking
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Jun 2011 16:42:48 +0000 (16:42 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Jun 2011 16:42:48 +0000 (16:42 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9680 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour3_ui_dark.rc.in
gtk2_ardour/audio_clock.cc
gtk2_ardour/time_info_box.cc
gtk2_ardour/wscript
libs/gtkmm2ext/cairocell.cc

index c7a736c38ecca60b4729688affbc4ae224270cd0..ecb5aba41237662bf89b28fd051f837e89b2e470 100644 (file)
@@ -90,7 +90,7 @@ style "medium_text"
 
 style "medium_monospace_text"
 {
-        font_name = "monospace @FONT_NORMAL@"
+        font_name = "monospace @FONT_SIZE_NORMAL@"
 }
 
 style "red_medium_text" = "medium_text"
@@ -919,25 +919,27 @@ style "small_red_on_black_entry"  = "small_bold_text"
        bg[ACTIVE] = @@COLPREFIX@_base
 }
 
+#
+# Clocks: "text" is the clock digits; "base" is the bg
+#
+
 style "non_recording_big_clock_display" = "medium_entry"
 {
        font_name = "@FONT_MASSIVE@"
 
-       fg[NORMAL] = @@COLPREFIX@_control_text
-       fg[ACTIVE] = @@COLPREFIX@_bright_indicator
-       fg[SELECTED] = @@COLPREFIX@_bright_indicator
-       fg[PRELIGHT] = @@COLPREFIX@_bright_indicator
-       fg[INSENSITIVE] = @@COLPREFIX@_bright_indicator
+       text[NORMAL] = @@COLPREFIX@_control_text
+       text[ACTIVE] = @@COLPREFIX@_bright_indicator
+       text[SELECTED] = @@COLPREFIX@_bright_indicator
+       text[PRELIGHT] = @@COLPREFIX@_bright_indicator
+       text[INSENSITIVE] = @@COLPREFIX@_bright_indicator
        
        base[NORMAL] = @@COLPREFIX@_base
-       base[ACTIVE] = @@COLPREFIX@_base
-       bg[NORMAL] = @@COLPREFIX@_base
-       bg[ACTIVE] = shade(0.5,@@COLPREFIX@_bright_indicator)
+       base[ACTIVE] = shade(0.5,@@COLPREFIX@_bright_indicator)
 }
 
 style "recording_big_clock_display" = "non_recording_big_clock_display"
 {
-       fg[NORMAL] = darker(@@COLPREFIX@_arm)
+       text[NORMAL] = darker(@@COLPREFIX@_arm)
 }
 
 style "transport_clock_display"
index e6684e3c23624dc4456f15484a01bde146efbfd4..83a0b8719bff04aba8f25d22d956562b90aaff75 100644 (file)
@@ -915,8 +915,10 @@ AudioClock::button_press (GdkEventButton *ev, CairoCell* cell)
 }
 
 bool
-AudioClock::button_release (GdkEventButton *ev, CairoCell*)
+AudioClock::button_release (GdkEventButton *ev, CairoCell* cell)
 {
+       cerr << "button press, cell = " << cell << endl;
+
        if (dragging) {
                gdk_pointer_ungrab (GDK_CURRENT_TIME);
                dragging = false;
index a58aa071c0f2e184c8423b56509eb672ecbf1939..8319db94efded7132ceb0cd174137f418d66adc2 100644 (file)
@@ -82,6 +82,10 @@ TimeInfoBox::TimeInfoBox ()
 
        set_homogeneous (false);
        set_spacings (0);
+       set_border_width (2);
+
+       /* a bit more spacing between the two "sides" */
+       set_col_spacing (1, 10);
 
        Gtk::Label* l;
 
@@ -199,12 +203,13 @@ TimeInfoBox::on_expose_event (GdkEventExpose* ev)
                if (win) {
                
                        Cairo::RefPtr<Cairo::Context> context = win->create_cairo_context();
-                       
-                       translate_coordinates (*window_parent, 0, 0, x, y);
-                       
+
+#if 0                  
+                       translate_coordinates (*window_parent, ev->area.x, ev->area.y, x, y);
                        context->rectangle (x, y, ev->area.width, ev->area.height);
                        context->clip ();
-                       
+#endif
+                       translate_coordinates (*window_parent, 0, 0, x, y);
                        context->set_source_rgba (0.149, 0.149, 0.149, 1.0);
                        Gtkmm2ext::rounded_rectangle (context, x, y, get_allocation().get_width(), get_allocation().get_height(), 5);
                        context->fill ();
index a5962f6f7bcbb7836e9793dc4d0b904c18cd7953..9f0262f736e1075db492447f6ff037edc5207460 100644 (file)
@@ -430,7 +430,8 @@ def build(bld):
                 'MASSIVE' : '60'
         }
 
- # Set up font substitution dictionary
+    # Set up font substitution dictionary
+    # @FONT_XXXX@
     for style in ['', 'BOLD', 'ITALIC']:
         for sizename,points in iter(font_sizes.items()):
             if (len (style)):
@@ -443,6 +444,12 @@ def build(bld):
             dark_rc_subst_dict[key] = fontstyle
             light_rc_subst_dict[key] = fontstyle
 
+    # @FONT_SIZE_XXXX@
+    for sizename,points in iter(font_sizes.items()):
+            key = "_".join (['FONT_SIZE',sizename])
+            dark_rc_subst_dict[key] = points
+            light_rc_subst_dict[key] = points
+
     # RC files
     dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
         'gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
index 79b5a673b45ccc9422fc6c10eb6f2d899b40d68e..97c806752ad8af99371b002fb0e99606307347d9 100644 (file)
@@ -116,9 +116,16 @@ CairoTextCell::render (Cairo::RefPtr<Cairo::Context>& context)
                return;
        }
 
+       context->save ();
+
+       context->rectangle (bbox.x, bbox.y, bbox.width, bbox.height);
+       context->clip ();
+
        _font->apply (context);
        context->move_to (bbox.x, bbox.y + bbox.height + y_offset);
        context->show_text (_text);
+
+       context->restore ();
 }
 
 void