From 983820d51aaec483ed11756b7d7d8b6bffaf97b7 Mon Sep 17 00:00:00 2001 From: Jeremy Bullock Date: Oct 12 2017 03:11:04 +0000 Subject: Merge pull request #1514 from shun-iwasawa/fix_numpad_label Fix Position of Style Shortcuts Label --- diff --git a/toonz/sources/toonzqt/paletteviewergui.cpp b/toonz/sources/toonzqt/paletteviewergui.cpp index b2e01cf..b3f01c4 100644 --- a/toonz/sources/toonzqt/paletteviewergui.cpp +++ b/toonz/sources/toonzqt/paletteviewergui.cpp @@ -844,7 +844,9 @@ void PageViewer::paintEvent(QPaintEvent *e) { p.drawChord(ssRect, 0, -180 * 16); tmpFont.setPointSize(6); p.setFont(tmpFont); - p.drawText(ssRect.adjusted(0, 10, 0, 0), Qt::AlignCenter, + // make sure the text is visible with any font + static int rectTopAdjust = 19 - QFontMetrics(tmpFont).overlinePos(); + p.drawText(ssRect.adjusted(0, rectTopAdjust, 0, 0), Qt::AlignCenter, QString().setNum(shortcut)); }