1
0
mirror of synced 2024-11-28 09:30:51 +01:00

impr: Make menu bar items collapse less quickly

This commit is contained in:
WerWolv 2024-05-17 22:14:15 +02:00
parent 964d98dd7b
commit 2ed5381f5a

View File

@ -292,7 +292,9 @@ namespace hex::plugin::builtin {
auto menuName = Lang(menuItem.unlocalizedName);
const auto padding = ImGui::GetStyle().FramePadding.x;
auto width = ImGui::CalcTextSize(menuName).x + padding * 4;
bool lastItem = (fittingItems + 1) == menuItems.size();
auto width = ImGui::CalcTextSize(menuName).x + padding * (lastItem ? -3.0F : 4.0F);
if ((cursorPos + width) > (s_searchBarPosition - ImGui::CalcTextSize(ICON_VS_ELLIPSIS).x - padding * 2))
break;