summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-12-22 15:04:01 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-12 23:41:00 +0100
commit0adb508ce5fbc69a4324b7278ac245f28095d38c (patch)
tree50f0b4dc9047466327d5909cefa7514b54ea3e98
parent63b1442519ce5032a7fd85d9585aa203de639f27 (diff)
Extract timeline content colours to a header.
-rw-r--r--src/wx/colours.h25
-rw-r--r--src/wx/content_timeline_atmos_view.cc3
-rw-r--r--src/wx/content_timeline_audio_view.cc3
-rw-r--r--src/wx/content_timeline_text_view.cc3
-rw-r--r--src/wx/content_timeline_video_view.cc5
5 files changed, 34 insertions, 5 deletions
diff --git a/src/wx/colours.h b/src/wx/colours.h
new file mode 100644
index 000000000..0d33208e0
--- /dev/null
+++ b/src/wx/colours.h
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 2023 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#define VIDEO_CONTENT_COLOUR (wxColour(242, 92, 120, 255))
+#define AUDIO_CONTENT_COLOUR (wxColour(149, 121, 232, 255))
+#define TEXT_CONTENT_COLOUR (wxColour(163, 255, 154, 255))
+#define ATMOS_CONTENT_COLOUR (wxColour(149, 121, 232, 255))
diff --git a/src/wx/content_timeline_atmos_view.cc b/src/wx/content_timeline_atmos_view.cc
index 4b78a8aee..2352ba5dc 100644
--- a/src/wx/content_timeline_atmos_view.cc
+++ b/src/wx/content_timeline_atmos_view.cc
@@ -19,6 +19,7 @@
*/
+#include "colours.h"
#include "content_timeline_atmos_view.h"
@@ -39,7 +40,7 @@ ContentTimelineAtmosView::ContentTimelineAtmosView(ContentTimeline& tl, shared_p
wxColour
ContentTimelineAtmosView::background_colour() const
{
- return wxColour (149, 121, 232, 255);
+ return ATMOS_CONTENT_COLOUR;
}
diff --git a/src/wx/content_timeline_audio_view.cc b/src/wx/content_timeline_audio_view.cc
index 9604ee7cc..600e39057 100644
--- a/src/wx/content_timeline_audio_view.cc
+++ b/src/wx/content_timeline_audio_view.cc
@@ -19,6 +19,7 @@
*/
+#include "colours.h"
#include "content_timeline_audio_view.h"
#include "wx_util.h"
#include "lib/audio_content.h"
@@ -44,7 +45,7 @@ ContentTimelineAudioView::ContentTimelineAudioView(ContentTimeline& tl, shared_p
wxColour
ContentTimelineAudioView::background_colour () const
{
- return wxColour (149, 121, 232, 255);
+ return AUDIO_CONTENT_COLOUR;
}
wxColour
diff --git a/src/wx/content_timeline_text_view.cc b/src/wx/content_timeline_text_view.cc
index 3b7eeebce..f22f47850 100644
--- a/src/wx/content_timeline_text_view.cc
+++ b/src/wx/content_timeline_text_view.cc
@@ -19,6 +19,7 @@
*/
+#include "colours.h"
#include "content_timeline_text_view.h"
#include "lib/text_content.h"
#include "lib/content.h"
@@ -41,7 +42,7 @@ ContentTimelineTextView::background_colour() const
return wxColour (210, 210, 210, 128);
}
- return wxColour (163, 255, 154, 255);
+ return TEXT_CONTENT_COLOUR;
}
wxColour
diff --git a/src/wx/content_timeline_video_view.cc b/src/wx/content_timeline_video_view.cc
index 63b26a570..d907627cd 100644
--- a/src/wx/content_timeline_video_view.cc
+++ b/src/wx/content_timeline_video_view.cc
@@ -19,9 +19,10 @@
*/
+#include "colours.h"
+#include "content_timeline_video_view.h"
#include "lib/image_content.h"
#include "lib/video_content.h"
-#include "content_timeline_video_view.h"
using std::dynamic_pointer_cast;
@@ -41,7 +42,7 @@ ContentTimelineVideoView::background_colour() const
return wxColour (210, 210, 210, 128);
}
- return wxColour (242, 92, 120, 255);
+ return VIDEO_CONTENT_COLOUR;
}
wxColour