mirror of https://github.com/stella-emu/stella.git
minor cosmetic to changes of LauncherDialog & ProgressDialog
This commit is contained in:
parent
4462492be8
commit
66e2c857c2
|
@ -29,8 +29,7 @@
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font,
|
ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font,
|
||||||
const string& message)
|
const string& message)
|
||||||
: Dialog(boss->instance(), boss->parent()),
|
: Dialog(boss->instance(), boss->parent(), font)
|
||||||
myFont{font}
|
|
||||||
{
|
{
|
||||||
const int lineHeight = Dialog::lineHeight(),
|
const int lineHeight = Dialog::lineHeight(),
|
||||||
fontHeight = Dialog::fontHeight(),
|
fontHeight = Dialog::fontHeight(),
|
||||||
|
@ -72,7 +71,7 @@ void ProgressDialog::setMessage(const string& message)
|
||||||
{
|
{
|
||||||
const int buttonWidth = Dialog::buttonWidth("Cancel"),
|
const int buttonWidth = Dialog::buttonWidth("Cancel"),
|
||||||
HBORDER = Dialog::hBorder();
|
HBORDER = Dialog::hBorder();
|
||||||
const int lwidth = myFont.getStringWidth(message);
|
const int lwidth = _font.getStringWidth(message);
|
||||||
// Recalculate real dimensions
|
// Recalculate real dimensions
|
||||||
_w = HBORDER * 2 + std::max(lwidth, buttonWidth);
|
_w = HBORDER * 2 + std::max(lwidth, buttonWidth);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ class ProgressDialog : public Dialog
|
||||||
bool isCancelled() const { return myIsCancelled; }
|
bool isCancelled() const { return myIsCancelled; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const GUI::Font& myFont;
|
|
||||||
StaticTextWidget* myMessage{nullptr};
|
StaticTextWidget* myMessage{nullptr};
|
||||||
SliderWidget* mySlider{nullptr};
|
SliderWidget* mySlider{nullptr};
|
||||||
|
|
||||||
|
|
|
@ -244,6 +244,7 @@ void RomInfoWidget::drawWidget(bool hilite)
|
||||||
const int yoff = myAvail.h + _font.getFontHeight() / 2;
|
const int yoff = myAvail.h + _font.getFontHeight() / 2;
|
||||||
|
|
||||||
s.fillRect(_x+2, _y+2, _w-4, _h-4, _bgcolor);
|
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);
|
s.frameRect(_x, _y+yoff, _w, _h-yoff, kColor);
|
||||||
|
|
||||||
if(!myHaveProperties)
|
if(!myHaveProperties)
|
||||||
|
|
Loading…
Reference in New Issue