summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-03 21:53:40 +0000
committerDavid Robillard <d@drobilla.net>2007-06-03 21:53:40 +0000
commit5ee467790081b90b929bbeafda6b6d1f593929b5 (patch)
tree7c9c14938154b2e40b3fa0ba49a0922d281a37c9 /gtk2_ardour
parentb0e91bfa0899435c7b798ebd35363147eb1b2823 (diff)
Moved some colours from hardcoded to ardour.colour (hopefully for canvas themeing?).
Fixed marker canvas separator lines (didn't work, use rect outlines instead). Fiddle with separator line colours. git-svn-id: svn://localhost/ardour2/trunk@1948 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.colors10
-rw-r--r--gtk2_ardour/colors.h6
-rw-r--r--gtk2_ardour/editor.h7
-rw-r--r--gtk2_ardour/editor_canvas.cc39
-rw-r--r--gtk2_ardour/marker.cc3
5 files changed, 32 insertions, 33 deletions
diff --git a/gtk2_ardour/ardour.colors b/gtk2_ardour/ardour.colors
index 181896589f..c247195c7e 100644
--- a/gtk2_ardour/ardour.colors
+++ b/gtk2_ardour/ardour.colors
@@ -9,11 +9,17 @@ cAudioBusBase 0.86 0.82 0.92 0.41
cMidiTrackOutline 0.00 0.00 0.00 1.00
cMidiTrackBase 1.0 0.85 0.85 0.5
cMidiBusBase 0.75 0.65 0.65 0.41
+cMarkerLabel 0.0 0.0 0.0 1.0
cMeterBar 0.40 0.40 0.45 1.0
+cMeterSeparator 0.05 0.05 0.10 1.0
cTempoBar 0.45 0.45 0.50 1.0
+cTempoSeparator 0.10 0.10 0.15 1.0
cMarkerBar 0.50 0.50 0.55 1.0
-cRangeMarkerBar 0.55 0.55 0.59 1.0
-cTransportMarkerBar 0.60 0.60 0.64 1.0
+cMarkerSeparator 0.15 0.15 0.20 1.0
+cRangeMarkerBar 0.55 0.55 0.60 1.0
+cRangeMarkerSeparator 0.20 0.20 0.25 1.0
+cTransportMarkerBar 0.60 0.60 0.65 1.0
+cTransportMarkerSeparator 0.25 0.25 0.30 1.0
cTimeStretchFill 0.89 0.71 0.71 0.59
cTimeStretchOutline 0.39 0.39 0.39 0.59
cAutomationLine 0.27 0.74 0.35 1.0
diff --git a/gtk2_ardour/colors.h b/gtk2_ardour/colors.h
index 0888b6f9e0..05571f4af7 100644
--- a/gtk2_ardour/colors.h
+++ b/gtk2_ardour/colors.h
@@ -62,11 +62,17 @@ COLORID(cLocationCDMarker)
COLORID(cLocationLoop)
COLORID(cLocationPunch)
COLORID(cVerboseCanvasCursor)
+COLORID(cMarkerLabel)
COLORID(cTempoBar)
+COLORID(cTempoSeparator)
COLORID(cMeterBar)
+COLORID(cMeterSeparator)
COLORID(cMarkerBar)
+COLORID(cMarkerSeparator)
COLORID(cRangeMarkerBar)
+COLORID(cRangeMarkerSeparator)
COLORID(cTransportMarkerBar)
+COLORID(cTransportMarkerSeparator)
COLORID(cRangeDragBarRect)
COLORID(cRangeDragBarRectFill)
COLORID(cRangeDragRect)
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index dd433c77a2..5bb6ee4426 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -574,13 +574,6 @@ class Editor : public PublicEditor
ArdourCanvas::SimpleRect* range_marker_bar;
ArdourCanvas::SimpleRect* transport_marker_bar;
-
- ArdourCanvas::SimpleLine* tempo_line;
- ArdourCanvas::SimpleLine* meter_line;
- ArdourCanvas::SimpleLine* marker_line;
- ArdourCanvas::SimpleLine* range_marker_line;
- ArdourCanvas::SimpleLine* transport_marker_line;
-
Gtk::Label minsec_label;
Gtk::Label bbt_label;
Gtk::Label smpte_label;
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 704c87ca33..c3a5cb6e9b 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -161,24 +161,34 @@ Editor::initialize_canvas ()
tempo_bar = new ArdourCanvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
tempo_bar->property_fill_color_rgba() = color_map[cTempoBar];
- tempo_bar->property_outline_pixels() = 0;
+ tempo_bar->property_outline_what() = (0x1 | 0x8);
+ tempo_bar->property_outline_pixels() = 1;
+ tempo_bar->property_outline_color_rgba() = color_map[cTempoSeparator];
meter_bar = new ArdourCanvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
meter_bar->property_fill_color_rgba() = color_map[cMeterBar];
- meter_bar->property_outline_pixels() = 0;
+ meter_bar->property_outline_what() = (0x1 | 0x8);
+ meter_bar->property_outline_pixels() = 1;
+ meter_bar->property_outline_color_rgba() = color_map[cMeterSeparator];
marker_bar = new ArdourCanvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
marker_bar->property_fill_color_rgba() = color_map[cMarkerBar];
- marker_bar->property_outline_pixels() = 0;
+ marker_bar->property_outline_what() = (0x1 | 0x8);
+ marker_bar->property_outline_pixels() = 1;
+ marker_bar->property_outline_color_rgba() = color_map[cMarkerSeparator];
range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
range_marker_bar->property_fill_color_rgba() = color_map[cRangeMarkerBar];
- range_marker_bar->property_outline_pixels() = 0;
+ range_marker_bar->property_outline_what() = (0x1 | 0x8);
+ range_marker_bar->property_outline_pixels() = 1;
+ range_marker_bar->property_outline_color_rgba() = color_map[cRangeMarkerSeparator];
transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
transport_marker_bar->property_fill_color_rgba() = color_map[cTransportMarkerBar];
- transport_marker_bar->property_outline_pixels() = 0;
-
+ transport_marker_bar->property_outline_what() = (0x1 | 0x8);
+ transport_marker_bar->property_outline_pixels() = 1;
+ transport_marker_bar->property_outline_color_rgba() = color_map[cTransportMarkerSeparator];
+
range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height-1.0);
range_bar_drag_rect->property_fill_color_rgba() = color_map[cRangeDragBarRectFill];
range_bar_drag_rect->property_outline_color_rgba() = color_map[cRangeDragBarRect];
@@ -257,23 +267,6 @@ Editor::initialize_canvas ()
range_marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_range_marker_bar_event), range_marker_bar));
transport_marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_transport_marker_bar_event), transport_marker_bar));
- /* separator lines */
-
- tempo_line = new ArdourCanvas::SimpleLine (*tempo_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
- tempo_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
-
- meter_line = new ArdourCanvas::SimpleLine (*meter_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
- meter_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
-
- marker_line = new ArdourCanvas::SimpleLine (*marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
- marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
-
- range_marker_line = new ArdourCanvas::SimpleLine (*range_marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
- range_marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
-
- transport_marker_line = new ArdourCanvas::SimpleLine (*transport_marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
- transport_marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
-
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_loop_range_view), false));
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_punch_range_view), false));
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index 918a2786c9..244079af41 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -24,6 +24,7 @@
#include "public_editor.h"
#include "utils.h"
#include "canvas_impl.h"
+#include "color.h"
#include "i18n.h"
@@ -252,7 +253,7 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
}
text->property_y() = 0.0;
text->property_anchor() = Gtk::ANCHOR_NW;
- text->property_fill_color() = "black";
+ text->property_fill_color_rgba() = color_map[cMarkerLabel];
editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));