diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-17 00:46:05 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-18 20:37:00 +0200 |
| commit | 63ce266351683a94630d7aba58405301b8a8d993 (patch) | |
| tree | 5bde742eea6e3c9443f5aecbb335bc64ccdead31 /src | |
| parent | de9a0fddc7e44ad9c5985114ee35e4073641005b (diff) | |
Use different icons for the timeline in dark/light modes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/full_config_dialog.cc | 10 | ||||
| -rw-r--r-- | src/wx/timeline_dialog.cc | 10 | ||||
| -rw-r--r-- | src/wx/wx_util.cc | 7 | ||||
| -rw-r--r-- | src/wx/wx_util.h | 1 |
4 files changed, 13 insertions, 15 deletions
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 6b0be4603..1aeacd3ca 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -84,16 +84,6 @@ using namespace boost::placeholders; using dcp::locale_convert; -#ifdef DCPOMATIC_OSX -static -wxString -icon_path(string name) -{ - return gui_is_dark() ? bitmap_path(String::compose("%1_white.png", name)) : bitmap_path(String::compose("%1_black.png", name)); -} -#endif - - class FullGeneralPage : public GeneralPage { public: diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index 91737f204..0d05e66d6 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -63,11 +63,11 @@ TimelineDialog::TimelineDialog(ContentPanel* cp, shared_ptr<Film> film, FilmView { auto sizer = new wxBoxSizer (wxVERTICAL); - wxBitmap select (bitmap_path("select.png"), wxBITMAP_TYPE_PNG); - wxBitmap zoom (bitmap_path("zoom.png"), wxBITMAP_TYPE_PNG); - wxBitmap zoom_all (bitmap_path("zoom_all.png"), wxBITMAP_TYPE_PNG); - wxBitmap snap (bitmap_path("snap.png"), wxBITMAP_TYPE_PNG); - wxBitmap sequence (bitmap_path("sequence.png"), wxBITMAP_TYPE_PNG); + wxBitmap select(icon_path("select"), wxBITMAP_TYPE_PNG); + wxBitmap zoom(icon_path("zoom"), wxBITMAP_TYPE_PNG); + wxBitmap zoom_all(icon_path("zoom_all"), wxBITMAP_TYPE_PNG); + wxBitmap snap(icon_path("snap"), wxBITMAP_TYPE_PNG); + wxBitmap sequence(icon_path("sequence"), wxBITMAP_TYPE_PNG); _toolbar = new wxToolBar (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL); _toolbar->SetMargins (4, 4); diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 9d9d4c599..074f47d61 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -651,6 +651,13 @@ bitmap_path (string name) } +wxString +icon_path(string name) +{ + return gui_is_dark() ? bitmap_path(String::compose("%1_white.png", name)) : bitmap_path(String::compose("%1_black.png", name)); +} + + wxSize small_button_size (wxWindow* parent, wxString text) { diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index fb1a3a001..50fb7268f 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -119,6 +119,7 @@ extern double calculate_mark_interval (double start); extern bool display_progress (wxString title, wxString task); extern bool report_errors_from_last_job (wxWindow* parent); extern wxString bitmap_path (std::string name); +extern wxString icon_path(std::string name); extern wxSize small_button_size (wxWindow* parent, wxString text); extern bool gui_is_dark (); extern double dpi_scale_factor (wxWindow* window); |
