mirror of https://github.com/stella-emu/stella.git
fixed size of `BrowserDialog` (may be refactored)
This commit is contained in:
parent
79fd588f8a
commit
7dd433a116
|
@ -23,6 +23,7 @@
|
||||||
#include "LauncherDialog.hxx"
|
#include "LauncherDialog.hxx"
|
||||||
#include "PopUpWidget.hxx"
|
#include "PopUpWidget.hxx"
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
#include "ConfigPathDialog.hxx"
|
#include "ConfigPathDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -292,11 +293,12 @@ void ConfigPathDialog::createBrowser(const string& title)
|
||||||
{
|
{
|
||||||
uInt32 w = 0, h = 0;
|
uInt32 w = 0, h = 0;
|
||||||
getResizableBounds(w, h);
|
getResizableBounds(w, h);
|
||||||
|
const GUI::Rect& r = instance().frameBuffer().imageRect();
|
||||||
|
|
||||||
// Create file browser dialog
|
// Create file browser dialog
|
||||||
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
||||||
uInt32(myBrowser->getHeight()) != h)
|
uInt32(myBrowser->getHeight()) != h)
|
||||||
myBrowser = make_unique<BrowserDialog>(this, myFont, w, h, title);
|
myBrowser = make_unique<BrowserDialog>(this, myFont, r.width()*0.95, r.height()*0.95, title);
|
||||||
else
|
else
|
||||||
myBrowser->setTitle(title);
|
myBrowser->setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "Font.hxx"
|
#include "Font.hxx"
|
||||||
#include "LauncherDialog.hxx"
|
#include "LauncherDialog.hxx"
|
||||||
#include "Settings.hxx"
|
#include "Settings.hxx"
|
||||||
|
#include "FrameBuffer.hxx"
|
||||||
#include "SnapshotDialog.hxx"
|
#include "SnapshotDialog.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -181,11 +182,12 @@ void SnapshotDialog::createBrowser(const string& title)
|
||||||
{
|
{
|
||||||
uInt32 w = 0, h = 0;
|
uInt32 w = 0, h = 0;
|
||||||
getResizableBounds(w, h);
|
getResizableBounds(w, h);
|
||||||
|
const GUI::Rect& r = instance().frameBuffer().imageRect();
|
||||||
|
|
||||||
// Create file browser dialog
|
// Create file browser dialog
|
||||||
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
||||||
uInt32(myBrowser->getHeight()) != h)
|
uInt32(myBrowser->getHeight()) != h)
|
||||||
myBrowser = make_unique<BrowserDialog>(this, myFont, w, h, title);
|
myBrowser = make_unique<BrowserDialog>(this, myFont, r.width()*0.95, r.height()*0.95, title);
|
||||||
else
|
else
|
||||||
myBrowser->setTitle(title);
|
myBrowser->setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -397,11 +397,12 @@ void UIDialog::createBrowser(const string& title)
|
||||||
{
|
{
|
||||||
uInt32 w = 0, h = 0;
|
uInt32 w = 0, h = 0;
|
||||||
getResizableBounds(w, h);
|
getResizableBounds(w, h);
|
||||||
|
const GUI::Rect& r = instance().frameBuffer().imageRect();
|
||||||
|
|
||||||
// Create file browser dialog
|
// Create file browser dialog
|
||||||
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
if(!myBrowser || uInt32(myBrowser->getWidth()) != w ||
|
||||||
uInt32(myBrowser->getHeight()) != h)
|
uInt32(myBrowser->getHeight()) != h)
|
||||||
myBrowser = make_unique<BrowserDialog>(this, myFont, w, h, title);
|
myBrowser = make_unique<BrowserDialog>(this, myFont, r.width()*0.95, r.height()*0.95, title);
|
||||||
else
|
else
|
||||||
myBrowser->setTitle(title);
|
myBrowser->setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue