From 1b89b61370117c908947ca80e04a528bfabc7faa Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 13 Aug 2008 23:47:47 +0100 Subject: [PATCH] Made the selection marquee stylable --- src/gui/lumiera_ui.rc | 3 + src/gui/widgets/timeline/timeline-body.cpp | 90 +++++++++++++------- src/gui/widgets/timeline/timeline-body.hpp | 7 +- src/gui/widgets/timeline/timeline-ruler.cpp | 93 +++++++++++---------- src/gui/widgets/timeline/timeline-ruler.hpp | 5 +- 5 files changed, 123 insertions(+), 75 deletions(-) diff --git a/src/gui/lumiera_ui.rc b/src/gui/lumiera_ui.rc index 428b7bed4..b68407039 100644 --- a/src/gui/lumiera_ui.rc +++ b/src/gui/lumiera_ui.rc @@ -124,6 +124,8 @@ class "GtkProgressBar" style:highest "lumiera_progressbars" style "timeline_body" { gtkmm__CustomObject_TimelineBody::background = "#7E838B" + gtkmm__CustomObject_TimelineBody::selection = "#2D2D90" + gtkmm__CustomObject_TimelineBody::selection_alpha = 0.5 } style "timeline_ruler" = "default_base" @@ -137,6 +139,7 @@ style "timeline_ruler" = "default_base" gtkmm__CustomObject_TimelineRuler::annotation_vert_margin = 0 gtkmm__CustomObject_TimelineRuler::min_division_width = 100 gtkmm__CustomObject_TimelineRuler::mouse_chevron_size = 5 + gtkmm__CustomObject_TimelineRuler::selection_chevron_size = 5 } style "timeline_header_base" = "default_base" diff --git a/src/gui/widgets/timeline/timeline-body.cpp b/src/gui/widgets/timeline/timeline-body.cpp index 50da41348..61703bd29 100644 --- a/src/gui/widgets/timeline/timeline-body.cpp +++ b/src/gui/widgets/timeline/timeline-body.cpp @@ -49,6 +49,7 @@ TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget mouseDownX(0), mouseDownY(0), beginShiftTimeOffset(0), + selectionAlpha(0.5), timelineWidget(timeline_widget) { REQUIRE(timelineWidget != NULL); @@ -60,12 +61,7 @@ TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget sigc::mem_fun(this, &TimelineBody::on_scroll) ); // Install style properties - gtk_widget_class_install_style_property( - GTK_WIDGET_CLASS(G_OBJECT_GET_CLASS(gobj())), - g_param_spec_boxed("background", - "Track Background", - "The background colour of timeline tracks", - GDK_TYPE_COLOR, G_PARAM_READABLE)); + register_styles(); } TimelineBody::~TimelineBody() @@ -254,14 +250,14 @@ TimelineBody::on_expose_event(GdkEventExpose* event) // Prepare to render via cairo Glib::RefPtr