From 66e2c857c2bd85e778c51ae1cb99fb7669c7af17 Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Mon, 6 Dec 2021 11:13:45 +0100 Subject: [PATCH] minor cosmetic to changes of LauncherDialog & ProgressDialog --- src/gui/ProgressDialog.cxx | 5 ++--- src/gui/ProgressDialog.hxx | 1 - src/gui/RomInfoWidget.cxx | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/ProgressDialog.cxx b/src/gui/ProgressDialog.cxx index fc1420705..81ba96a06 100644 --- a/src/gui/ProgressDialog.cxx +++ b/src/gui/ProgressDialog.cxx @@ -29,8 +29,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font, const string& message) - : Dialog(boss->instance(), boss->parent()), - myFont{font} + : Dialog(boss->instance(), boss->parent(), font) { const int lineHeight = Dialog::lineHeight(), fontHeight = Dialog::fontHeight(), @@ -72,7 +71,7 @@ void ProgressDialog::setMessage(const string& message) { const int buttonWidth = Dialog::buttonWidth("Cancel"), HBORDER = Dialog::hBorder(); - const int lwidth = myFont.getStringWidth(message); + const int lwidth = _font.getStringWidth(message); // Recalculate real dimensions _w = HBORDER * 2 + std::max(lwidth, buttonWidth); diff --git a/src/gui/ProgressDialog.hxx b/src/gui/ProgressDialog.hxx index 910094c0f..67050e0e6 100644 --- a/src/gui/ProgressDialog.hxx +++ b/src/gui/ProgressDialog.hxx @@ -41,7 +41,6 @@ class ProgressDialog : public Dialog bool isCancelled() const { return myIsCancelled; } private: - const GUI::Font& myFont; StaticTextWidget* myMessage{nullptr}; SliderWidget* mySlider{nullptr}; diff --git a/src/gui/RomInfoWidget.cxx b/src/gui/RomInfoWidget.cxx index 03fbb2d4f..2a84a1cef 100644 --- a/src/gui/RomInfoWidget.cxx +++ b/src/gui/RomInfoWidget.cxx @@ -244,6 +244,7 @@ void RomInfoWidget::drawWidget(bool hilite) const int yoff = myAvail.h + _font.getFontHeight() / 2; s.fillRect(_x+2, _y+2, _w-4, _h-4, _bgcolor); + s.frameRect(_x, _y, _w, myAvail.h, kColor); s.frameRect(_x, _y+yoff, _w, _h-yoff, kColor); if(!myHaveProperties)