summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-16 22:21:34 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-18 20:37:00 +0200
commitfecfda4c913da3f60ab4329d1f4f412bc27d19a7 (patch)
treedbf98f66d23dd6677e487e4efdbdad8d7650923e /src
parente983d424808894dc9b036c46cd61d8fa39487dfd (diff)
Use slightly better icons for macOS prefs in dark mode.
Diffstat (limited to 'src')
-rw-r--r--src/wx/config_dialog.cc2
-rw-r--r--src/wx/config_dialog.h6
-rw-r--r--src/wx/full_config_dialog.cc28
3 files changed, 23 insertions, 13 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 7148fd173..07ab2d8aa 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -1054,7 +1054,7 @@ LocationsPage::GetName () const
wxBitmap
LocationsPage::GetLargeIcon () const
{
- return wxBitmap(bitmap_path("locations.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("locations"), wxBITMAP_TYPE_PNG);
}
#endif
diff --git a/src/wx/config_dialog.h b/src/wx/config_dialog.h
index c767929f7..a258e1fe2 100644
--- a/src/wx/config_dialog.h
+++ b/src/wx/config_dialog.h
@@ -88,7 +88,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("general.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("general"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -166,7 +166,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("keys.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("keys"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -197,7 +197,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("sound.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("sound"), wxBITMAP_TYPE_PNG);
}
#endif
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc
index 40cb0c285..6b0be4603 100644
--- a/src/wx/full_config_dialog.cc
+++ b/src/wx/full_config_dialog.cc
@@ -84,6 +84,16 @@ 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:
@@ -257,7 +267,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("defaults.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("defaults"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -615,7 +625,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("servers.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("servers"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -678,7 +688,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("tms.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("tms"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -789,7 +799,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("email.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("email"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -961,7 +971,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("kdm_email.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("kdm_email"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -1086,7 +1096,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("notifications.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("notifications"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -1262,7 +1272,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("cover_sheet.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("cover_sheet"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -1321,7 +1331,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("identifiers.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("identifiers"), wxBITMAP_TYPE_PNG);
}
#endif
@@ -1439,7 +1449,7 @@ public:
#ifdef DCPOMATIC_OSX
wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("advanced.png"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("advanced"), wxBITMAP_TYPE_PNG);
}
#endif