mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added some ifdefs around the vc9 fixes so that mse still compiles with msvc7 and wxWidget 2.6
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1568 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -48,9 +48,10 @@ Image generateDisabledImage(const Image& imgIn) {
|
||||
// ----------------------------------------------------------------------------- : set_menu_item_image
|
||||
|
||||
void set_menu_item_image(wxMenuItem* item, const String& resource) {
|
||||
if(item->GetId() != wxID_NEW)return;//@@@
|
||||
// load bitmap
|
||||
Bitmap bitmap = load_resource_tool_image(resource);
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__)
|
||||
// make greyed bitmap
|
||||
bitmap = bitmap.GetSubBitmap(wxRect(0,0,16,16));
|
||||
Image disabledImage = generateDisabledImage(bitmap.ConvertToImage());
|
||||
|
||||
+8
-1
@@ -266,7 +266,7 @@ void draw_control_box(Window* win, DC& dc, const wxRect& rect, bool focused, boo
|
||||
}
|
||||
|
||||
void draw_button(Window* win, DC& dc, const wxRect& rect, bool focused, bool down, bool enabled) {
|
||||
#if 1
|
||||
#if wxVERSION >= 2700
|
||||
wxRendererNative& rn = wxRendererNative::GetDefault();
|
||||
rn.DrawPushButton(win, dc, rect, (focused ? wxCONTROL_FOCUSED : 0) | (down ? wxCONTROL_PRESSED : 0) | (enabled ? 0 : wxCONTROL_DISABLED));
|
||||
#else
|
||||
@@ -341,6 +341,13 @@ void draw_radiobox(Window* win, DC& dc, const wxRect& rect, bool checked, bool e
|
||||
|
||||
void draw_selection_rectangle(Window* win, DC& dc, const wxRect& rect, bool selected, bool focused, bool hot) {
|
||||
#if wxUSE_UXTHEME && defined(__WXMSW__)
|
||||
#if WINVER <= 0x0500
|
||||
#define LISS_NORMAL LIS_NORMAL
|
||||
#define LISS_SELECTED LIS_SELECTED
|
||||
#define LISS_SELECTEDNOTFOCUS LIS_SELECTEDNOTFOCUS
|
||||
#define LISS_HOT LISS_NORMAL
|
||||
#define LISS_HOTSELECTED LISS_SELECTED
|
||||
#endif
|
||||
wxUxThemeEngine *themeEngine = wxUxThemeEngine::Get();
|
||||
if (themeEngine && themeEngine->IsAppThemed()) {
|
||||
wxUxThemeHandle hTheme(win, L"LISTVIEW");
|
||||
|
||||
Reference in New Issue
Block a user