Skip to content

Commit

Permalink
Fix - ensure hist title height
Browse files Browse the repository at this point in the history
Should not be less then configured in gStlye font size
  • Loading branch information
linev committed Oct 7, 2024
1 parent b0d82eb commit 3d77403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/hist/TPavePainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,10 +1389,10 @@ class TPavePainter extends ObjectPainter {
} else if ((opt === 'postitle') || painter.isDummyPos(pave)) {
const st = gStyle, fp = painter.getFramePainter();
if (st && fp) {
const midx = st.fTitleX, y2 = st.fTitleY;
const midx = st.fTitleX, y2 = st.fTitleY, fsz = st.fTitleFontSize;
let w = st.fTitleW, h = st.fTitleH;

if (!h) h = (y2 - fp.fY2NDC) * 0.7;
if (!h) h = Math.max((y2 - fp.fY2NDC) * 0.7, (fsz < 1) ? 1.1 * fsz : 1.1 * fsz / fp.getFrameWidth());
if (!w) w = fp.fX2NDC - fp.fX1NDC;
if (!Number.isFinite(h) || (h <= 0)) h = 0.06;
if (!Number.isFinite(w) || (w <= 0)) w = 0.44;
Expand Down

0 comments on commit 3d77403

Please sign in to comment.