projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change bitmap_path to take a full name with extension.
[dcpomatic.git]
/
src
/
wx
/
wx_util.cc
diff --git
a/src/wx/wx_util.cc
b/src/wx/wx_util.cc
index 62f00b6b2db39f5132f599152fc1321358aeb953..e94f3e512acf03322be4f09032a09d0147cceb1b 100644
(file)
--- a/
src/wx/wx_util.cc
+++ b/
src/wx/wx_util.cc
@@
-34,15
+34,15
@@
#include "lib/job_manager.h"
#include "lib/util.h"
#include "lib/version.h"
#include "lib/job_manager.h"
#include "lib/util.h"
#include "lib/version.h"
-#include "lib/warnings.h"
#include <dcp/locale_convert.h>
#include <dcp/locale_convert.h>
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <wx/spinctrl.h>
#include <wx/splash.h>
#include <wx/progdlg.h>
#include <wx/filepicker.h>
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/splash.h>
#include <wx/progdlg.h>
#include <wx/filepicker.h>
#include <wx/sizer.h>
-
DCPOMATIC
_ENABLE_WARNINGS
+
LIBDCP
_ENABLE_WARNINGS
#include <boost/thread.hpp>
#include <boost/thread.hpp>
@@
-86,7
+86,7
@@
setup_osx_flags (wxSizer* s, bool left, int& flags)
#endif
#endif
-/** Add a wxStaticText to a wxSizer
, aligning it at vertical centre
.
+/** Add a wxStaticText to a wxSizer.
* @param s Sizer to add to.
* @param p Parent window for the wxStaticText.
* @param t Text for the wxStaticText.
* @param s Sizer to add to.
* @param p Parent window for the wxStaticText.
* @param t Text for the wxStaticText.
@@
-101,7
+101,7
@@
add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, bool left, int prop, in
setup_osx_flags (s, left, flags);
#endif
auto m = create_label (p, t, left);
setup_osx_flags (s, left, flags);
#endif
auto m = create_label (p, t, left);
- s->Add (m, prop, flags,
6
);
+ s->Add (m, prop, flags,
DCPOMATIC_SIZER_GAP
);
return m;
}
return m;
}
@@
-116,7
+116,7
@@
add_label_to_sizer (wxSizer* s, wxStaticText* t, bool, int prop, int flags)
#ifdef __WXOSX__
setup_osx_flags (s, left, flags);
#endif
#ifdef __WXOSX__
setup_osx_flags (s, left, flags);
#endif
- s->Add (t, prop, flags,
6
);
+ s->Add (t, prop, flags,
DCPOMATIC_SIZER_GAP
);
return t;
}
return t;
}
@@
-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) {
@@
-517,7
+517,7
@@
maybe_show_splash ()
wxSplashScreen* splash = nullptr;
try {
wxBitmap bitmap;
wxSplashScreen* splash = nullptr;
try {
wxBitmap bitmap;
- if (bitmap.LoadFile(bitmap_path("splash"), wxBITMAP_TYPE_PNG)) {
+ if (bitmap.LoadFile(bitmap_path("splash
.png
"), wxBITMAP_TYPE_PNG)) {
{
/* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */
wxMemoryDC dc(bitmap);
{
/* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */
wxMemoryDC dc(bitmap);
@@
-646,7
+646,7
@@
bitmap_path (string name)
base = resources_path();
#endif
base = resources_path();
#endif
- auto p = base /
String::compose("%1.png", name)
;
+ auto p = base /
name
;
return std_to_wx (p.string());
}
return std_to_wx (p.string());
}
@@
-688,3
+688,15
@@
dpi_scale_factor (wxWindow*)
}
#endif
}
#endif
+
+
+int
+search_ctrl_height ()
+{
+#ifdef __WXGTK3__
+ return 30;
+#else
+ return -1;
+#endif
+}
+