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:
Brendan Hagan
2022-06-15 20:39:05 -04:00
parent f83aeec40d
commit 61be347976
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -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
#endif
Image bitmap = load_resource_tool_image(resource);
#if defined(__WXMSW__)
Image disabled_bitmap = generate_disabled_image(bitmap);
item->SetBitmaps(bitmap, bitmap);
item->SetDisabledBitmap(disabled_bitmap);
#else
item->SetBitmap(bitmap);
#endif
item->SetBitmap(bitmap);
}
wxMenuItem* make_menu_item(wxMenu* menu, int id, const char* resource, const String& text, const String& help, wxItemKind kind, wxMenu* submenu) {
+1 -1
View File
@@ -134,7 +134,7 @@ void DropDownChoiceListBase::drawIcon(DC& dc, int x, int y, size_t item, bool se
image_id = getChoice(item)->first_id;
}
// draw image
if (image_id < style().thumbnails.size()) {
if ((unsigned int) image_id < style().thumbnails.size()) {
auto const& thumbnail = style().thumbnails[image_id];
if (thumbnail.status == THUMB_OK)
dc.DrawBitmap(thumbnail.bitmap, x, y);