mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
impr: Further cleanup hex editor footer
This commit is contained in:
@@ -573,8 +573,13 @@ namespace ImGuiExt {
|
||||
bool result = false;
|
||||
if (IsItemHovered() && (currTime - lastMoveTime) >= 0.5 && hoveredID == lastHoveredID) {
|
||||
if (!std::string_view(text).empty()) {
|
||||
const auto width = 300 * hex::ImHexApi::System::getGlobalScale();
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(width / 2, 0), ImVec2(width, FLT_MAX));
|
||||
const auto textWidth = CalcTextSize(text).x;
|
||||
|
||||
auto width = 150 * hex::ImHexApi::System::getGlobalScale();
|
||||
if (textWidth < width)
|
||||
width = textWidth;
|
||||
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(width, 0), ImVec2(width * 2, FLT_MAX));
|
||||
if (BeginTooltip()) {
|
||||
if (isSeparator)
|
||||
SeparatorText(text);
|
||||
|
||||
Reference in New Issue
Block a user