HiDPI support -- fractional scaling is a bit broken, sometimes crashes, is a bit blurry

This commit is contained in:
2026-03-25 23:32:08 +01:00
parent e8867e4b01
commit 103f17b8e9
6 changed files with 94 additions and 9 deletions

View File

@@ -123,7 +123,9 @@ void Cursors::draw(const SpectrumDisplay& specDisplay,
fmtFreqDB(deltaBuf, sizeof(deltaBuf), "D", dFreq, dDB);
ImVec2 dSz = ImGui::CalcTextSize(deltaBuf);
float tx = posX + sizeX - dSz.x - 168;
// Reserve space for hover label to the right.
float reserveW = ImGui::CalcTextSize(" 00.000 kHz 000.0 dB").x;
float tx = posX + sizeX - dSz.x - reserveW;
float lineH = ImGui::GetTextLineHeight();
float ty = posY + 4;
ImU32 col = IM_COL32(255, 200, 100, 255);