From 004b34f51e5e61305cec92f90f335df73ce292b3 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Mon, 16 Nov 2020 20:00:51 +0100 Subject: [PATCH] fixed tool tip font for Launcher added a few more tool tips --- src/gui/LauncherDialog.cxx | 3 ++- src/gui/ToolTip.cxx | 5 +++-- src/gui/VideoAudioDialog.cxx | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index abae25742..93361b9f5 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -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"); diff --git a/src/gui/ToolTip.cxx b/src/gui/ToolTip.cxx index 30100009a..82c0df10b 100644 --- a/src/gui/ToolTip.cxx +++ b/src/gui/ToolTip.cxx @@ -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); diff --git a/src/gui/VideoAudioDialog.cxx b/src/gui/VideoAudioDialog.cxx index 8d2c3be6d..d34f0a330 100644 --- a/src/gui/VideoAudioDialog.cxx +++ b/src/gui/VideoAudioDialog.cxx @@ -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);