projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract dpi_scale_factor() to a function.
[dcpomatic.git]
/
src
/
wx
/
wx_util.cc
diff --git
a/src/wx/wx_util.cc
b/src/wx/wx_util.cc
index a0beb8f72d0f4e7ac92b7be74e2b06ae52b756af..266989a4dd275f9fc139ddaacffe21eb2f4bd2ca 100644
(file)
--- a/
src/wx/wx_util.cc
+++ b/
src/wx/wx_util.cc
@@
-297,7
+297,7
@@
checked_set (wxChoice* widget, string value)
void
void
-checked_set (wxChoice* widget, vector<pair<string, string>
> items)
+checked_set (wxChoice* widget, vector<pair<string, string>> items)
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
@@
-673,3
+673,18
@@
gui_is_dark ()
#endif
}
#endif
}
+
+#if wxCHECK_VERSION(3,1,0)
+double
+dpi_scale_factor (wxWindow* window)
+{
+ return window->GetDPIScaleFactor();
+}
+#else
+double
+dpi_scale_factor (wxWindow*)
+{
+ return 1;
+}
+#endif
+