impr: Make hyperlink icons gray
This commit is contained in:
parent
a907550567
commit
f6e3ede178
@ -330,16 +330,21 @@ namespace ImGuiExt {
|
||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
|
||||
|
||||
// Render
|
||||
BeginGroup();
|
||||
TextDisabled("%s", icon);
|
||||
SameLine();
|
||||
|
||||
const ImU32 col = hovered ? GetColorU32(ImGuiCol_ButtonHovered) : GetColorU32(ImGuiCol_ButtonActive);
|
||||
PushStyleColor(ImGuiCol_Text, ImU32(col));
|
||||
|
||||
Text("%s %s", icon, label);
|
||||
TextUnformatted(label);
|
||||
|
||||
if (hovered)
|
||||
GetWindowDrawList()->AddLine(ImVec2(pos.x, pos.y + size.y), pos + size, ImU32(col));
|
||||
|
||||
PopStyleColor();
|
||||
|
||||
EndGroup();
|
||||
|
||||
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
|
||||
return pressed;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ namespace hex::plugin::builtin::recent {
|
||||
icon = ICON_VS_FILE_BINARY;
|
||||
}
|
||||
|
||||
if (ImGuiExt::Hyperlink(hex::format("{} {}", icon, hex::limitStringLength(recentEntry.displayName, 32)).c_str())) {
|
||||
if (ImGuiExt::IconHyperlink(icon, hex::limitStringLength(recentEntry.displayName, 32).c_str())) {
|
||||
loadRecentEntry(recentEntry);
|
||||
break;
|
||||
}
|
||||
@ -341,7 +341,7 @@ namespace hex::plugin::builtin::recent {
|
||||
|
||||
if (s_autoBackupsFound) {
|
||||
ImGui::Separator();
|
||||
if (ImGuiExt::Hyperlink(hex::format("{} {}", ICON_VS_ARCHIVE, "hex.builtin.welcome.start.recent.auto_backups"_lang).c_str()))
|
||||
if (ImGuiExt::IconHyperlink(ICON_VS_ARCHIVE, "hex.builtin.welcome.start.recent.auto_backups"_lang))
|
||||
PopupAutoBackups::open();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user