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 47b381562aa375a93e02bcc2b731b9099f8023e2..266989a4dd275f9fc139ddaacffe21eb2f4bd2ca 100644
(file)
--- a/
src/wx/wx_util.cc
+++ b/
src/wx/wx_util.cc
@@
-673,3
+673,18
@@
gui_is_dark ()
#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
+