mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-13 14:07:01 -04:00
misc: remove resource tool image bitmap block
This was giving me issues on Win10, right click context menus were failing to get text.
This commit is contained in:
+1
-7
@@ -245,13 +245,7 @@ void set_menu_item_image(wxMenuItem* item, const String& resource) {
|
|||||||
if (item->GetKind() == wxITEM_CHECK) return; // check items can't have icons
|
if (item->GetKind() == wxITEM_CHECK) return; // check items can't have icons
|
||||||
#endif
|
#endif
|
||||||
Image bitmap = load_resource_tool_image(resource);
|
Image bitmap = load_resource_tool_image(resource);
|
||||||
#if defined(__WXMSW__)
|
item->SetBitmap(bitmap);
|
||||||
Image disabled_bitmap = generate_disabled_image(bitmap);
|
|
||||||
item->SetBitmaps(bitmap, bitmap);
|
|
||||||
item->SetDisabledBitmap(disabled_bitmap);
|
|
||||||
#else
|
|
||||||
item->SetBitmap(bitmap);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItem* make_menu_item(wxMenu* menu, int id, const char* resource, const String& text, const String& help, wxItemKind kind, wxMenu* submenu) {
|
wxMenuItem* make_menu_item(wxMenu* menu, int id, const char* resource, const String& text, const String& help, wxItemKind kind, wxMenu* submenu) {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ void DropDownChoiceListBase::drawIcon(DC& dc, int x, int y, size_t item, bool se
|
|||||||
image_id = getChoice(item)->first_id;
|
image_id = getChoice(item)->first_id;
|
||||||
}
|
}
|
||||||
// draw image
|
// draw image
|
||||||
if (image_id < style().thumbnails.size()) {
|
if ((unsigned int) image_id < style().thumbnails.size()) {
|
||||||
auto const& thumbnail = style().thumbnails[image_id];
|
auto const& thumbnail = style().thumbnails[image_id];
|
||||||
if (thumbnail.status == THUMB_OK)
|
if (thumbnail.status == THUMB_OK)
|
||||||
dc.DrawBitmap(thumbnail.bitmap, x, y);
|
dc.DrawBitmap(thumbnail.bitmap, x, y);
|
||||||
|
|||||||
Reference in New Issue
Block a user