From 189615bf48c37213e754e37d14047bbb62df1627 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 24 Sep 2012 21:21:33 -0700 Subject: [PATCH] Don't use a full-size subbitmap for icons for no apparent reason --- aegisub/src/toolbar.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aegisub/src/toolbar.cpp b/aegisub/src/toolbar.cpp index f14be0cb0..117a6c784 100644 --- a/aegisub/src/toolbar.cpp +++ b/aegisub/src/toolbar.cpp @@ -137,9 +137,6 @@ namespace { last_was_sep = false; - wxBitmap const& bitmap = command->Icon(icon_size); - // this hack is needed because ??? - wxBitmap icon = bitmap.GetSubBitmap(wxRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight())); int flags = command->Type(); wxItemKind kind = @@ -147,7 +144,8 @@ namespace { flags & cmd::COMMAND_TOGGLE ? wxITEM_CHECK : wxITEM_NORMAL; - AddTool(TOOL_ID_BASE + commands.size(), command->StrDisplay(context), icon, GetTooltip(command), kind); + wxBitmap const& bitmap = command->Icon(icon_size); + AddTool(TOOL_ID_BASE + commands.size(), command->StrDisplay(context), bitmap, GetTooltip(command), kind); commands.push_back(command); needs_onidle = needs_onidle || flags != cmd::COMMAND_NORMAL;