fixed tool tip font for Launcher

added a few more tool tips
This commit is contained in:
thrust26 2020-11-16 20:00:51 +01:00
parent c6068104d9
commit 004b34f51e
3 changed files with 10 additions and 3 deletions

View File

@ -56,7 +56,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
: Dialog(osystem, parent, osystem.frameBuffer().launcherFont(), "",
x, y, w, h)
{
myUseMinimalUI = instance().settings().getBool("minimal_ui");

View File

@ -48,8 +48,10 @@ void ToolTip::request(Widget* widget)
}
if(myTimer == DELAY_TIME)
{
myWidget = widget;
const uInt32 VGAP = 1;
const uInt32 hCursor = 19; // TODO: query cursor height
const uInt32 hCursor = 18;
string text = widget->getToolTip();
uInt32 width = std::min(myWidth, myFont.getStringWidth(text) + myTextXOfs * 2);
// Note: These include HiDPI scaling:
@ -69,7 +71,6 @@ void ToolTip::request(Widget* widget)
width = imageRect.w() / myScale;
}
myWidget = widget;
mySurface->setSrcSize(width, myHeight);
mySurface->setDstSize(width * myScale, myHeight * myScale);
mySurface->setDstPos(x * myScale, y * myScale);

View File

@ -129,6 +129,7 @@ void VideoAudioDialog::addDisplayTab()
// TIA interpolation
myTIAInterpolate = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Interpolation ");
myTIAInterpolate->setToolTip("Blur the emulated display.");
wid.push_back(myTIAInterpolate);
ypos += lineHeight + VGAP * 4;
@ -146,12 +147,14 @@ void VideoAudioDialog::addDisplayTab()
// FS stretch
myUseStretch = new CheckboxWidget(myTab, _font, xpos + INDENT, ypos + 1, "Stretch");
myUseStretch->setToolTip("Stretch the emulated display to fill the whole screen.");
wid.push_back(myUseStretch);
#ifdef ADAPTABLE_REFRESH_SUPPORT
// Adapt refresh rate
ypos += lineHeight + VGAP;
myRefreshAdapt = new CheckboxWidget(myTab, _font, xpos + INDENT, ypos + 1, "Adapt display refresh rate");
myRefreshAdapt->setToolTip("Select the optimal display refresh rate for each ROM.");
wid.push_back(myRefreshAdapt);
#else
myRefreshAdapt = nullptr;
@ -168,6 +171,7 @@ void VideoAudioDialog::addDisplayTab()
// Aspect ratio correction
ypos += lineHeight + VGAP * 4;
myCorrectAspect = new CheckboxWidget(myTab, _font, xpos, ypos + 1, "Correct aspect ratio (*)");
myCorrectAspect->setToolTip("Uncheck to disable real world aspect ratio correction.");
wid.push_back(myCorrectAspect);
// Vertical size
@ -177,6 +181,7 @@ void VideoAudioDialog::addDisplayTab()
"V-Size adjust", lwidth, kVSizeChanged, fontWidth * 7, "%", 0, true);
myVSizeAdjust->setMinValue(-5); myVSizeAdjust->setMaxValue(5);
myVSizeAdjust->setTickmarkIntervals(2);
myVSizeAdjust->setToolTip("Adapt vertical size to emulated TV display.");
wid.push_back(myVSizeAdjust);