diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-17 20:36:55 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-18 20:37:00 +0200 |
| commit | 179685ef5cfb81d362282ee2fae526533e6404a3 (patch) | |
| tree | 354d75141352ab018a7a7020a28c68691ec1a23e /src/wx/timeline_time_axis_view.cc | |
| parent | 63ce266351683a94630d7aba58405301b8a8d993 (diff) | |
Improve timeline view colouring in dark mode.
Diffstat (limited to 'src/wx/timeline_time_axis_view.cc')
| -rw-r--r-- | src/wx/timeline_time_axis_view.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc index 023b42ec7..3b1b3cd99 100644 --- a/src/wx/timeline_time_axis_view.cc +++ b/src/wx/timeline_time_axis_view.cc @@ -67,7 +67,8 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> double const pps = _timeline.pixels_per_second().get (); - gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (0, 0, 0), 1, wxPENSTYLE_SOLID)); + wxColour const colour = gui_is_dark() ? *wxWHITE : *wxBLACK; + gc->SetPen(*wxThePenList->FindOrCreatePen(colour, 1, wxPENSTYLE_SOLID)); double const mark_interval = calculate_mark_interval (rint (128 / pps)); @@ -78,7 +79,7 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> path.AddLineToPoint (_timeline.width(), y); gc->StrokePath (path); - gc->SetFont (gc->CreateFont (*wxNORMAL_FONT)); + gc->SetFont(gc->CreateFont(*wxNORMAL_FONT, colour)); /* Time in seconds */ DCPTime t; |
