projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Supporters update.
[dcpomatic.git]
/
src
/
wx
/
timeline_video_content_view.cc
diff --git
a/src/wx/timeline_video_content_view.cc
b/src/wx/timeline_video_content_view.cc
index 731108c93ac7e890414c838b41c48174c00caeef..b0f4b4f5d34dd255a8a5083b7ca883f96b5d160d 100644
(file)
--- a/
src/wx/timeline_video_content_view.cc
+++ b/
src/wx/timeline_video_content_view.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013-201
5
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-201
9
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,11
+18,12
@@
*/
*/
-#include "timeline_video_content_view.h"
#include "lib/image_content.h"
#include "lib/image_content.h"
+#include "lib/video_content.h"
+#include "timeline_video_content_view.h"
-using
boost
::dynamic_pointer_cast;
-using
boost
::shared_ptr;
+using
std
::dynamic_pointer_cast;
+using
std
::shared_ptr;
TimelineVideoContentView::TimelineVideoContentView (Timeline& tl, shared_ptr<Content> c)
: TimelineContentView (tl, c)
TimelineVideoContentView::TimelineVideoContentView (Timeline& tl, shared_ptr<Content> c)
: TimelineContentView (tl, c)
@@
-33,12
+34,27
@@
TimelineVideoContentView::TimelineVideoContentView (Timeline& tl, shared_ptr<Con
wxColour
TimelineVideoContentView::background_colour () const
{
wxColour
TimelineVideoContentView::background_colour () const
{
+ if (!active()) {
+ return wxColour (210, 210, 210, 128);
+ }
+
return wxColour (242, 92, 120, 255);
}
wxColour
TimelineVideoContentView::foreground_colour () const
{
return wxColour (242, 92, 120, 255);
}
wxColour
TimelineVideoContentView::foreground_colour () const
{
+ if (!active()) {
+ return wxColour (180, 180, 180, 128);
+ }
+
return wxColour (0, 0, 0, 255);
}
return wxColour (0, 0, 0, 255);
}
+bool
+TimelineVideoContentView::active () const
+{
+ shared_ptr<Content> c = _content.lock ();
+ DCPOMATIC_ASSERT (c);
+ return c->video && c->video->use();
+}