summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-06-07 16:42:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-06-07 16:42:48 +0000
commitbe1abb12ffcd8ded8638742e96ac60d754dac8f5 (patch)
tree3383a3c0adcceb602f8f4f492573523ca1e2bb16
parenta91d18414ac7e33889595ee8dfd904177dc3ae94 (diff)
more clock tweaking
git-svn-id: svn://localhost/ardour2/branches/3.0@9680 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour3_ui_dark.rc.in22
-rw-r--r--gtk2_ardour/audio_clock.cc4
-rw-r--r--gtk2_ardour/time_info_box.cc13
-rw-r--r--gtk2_ardour/wscript9
-rw-r--r--libs/gtkmm2ext/cairocell.cc7
5 files changed, 39 insertions, 16 deletions
diff --git a/gtk2_ardour/ardour3_ui_dark.rc.in b/gtk2_ardour/ardour3_ui_dark.rc.in
index c7a736c38e..ecb5aba412 100644
--- a/gtk2_ardour/ardour3_ui_dark.rc.in
+++ b/gtk2_ardour/ardour3_ui_dark.rc.in
@@ -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"
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index e6684e3c23..83a0b8719b 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -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;
diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc
index a58aa071c0..8319db94ef 100644
--- a/gtk2_ardour/time_info_box.cc
+++ b/gtk2_ardour/time_info_box.cc
@@ -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 ();
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript
index a5962f6f7b..9f0262f736 100644
--- a/gtk2_ardour/wscript
+++ b/gtk2_ardour/wscript
@@ -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')
diff --git a/libs/gtkmm2ext/cairocell.cc b/libs/gtkmm2ext/cairocell.cc
index 79b5a673b4..97c806752a 100644
--- a/libs/gtkmm2ext/cairocell.cc
+++ b/libs/gtkmm2ext/cairocell.cc
@@ -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