mirror of https://github.com/stella-emu/stella.git
parent
b8e53d76af
commit
06c20103af
|
@ -58,6 +58,7 @@ class ListWidget : public EditableWidget
|
||||||
const string& getSelectedString() const;
|
const string& getSelectedString() const;
|
||||||
|
|
||||||
void scrollTo(int item);
|
void scrollTo(int item);
|
||||||
|
void scrollToEnd() { scrollToCurrent(int(_list.size())); }
|
||||||
|
|
||||||
// Account for the extra width of embedded scrollbar
|
// Account for the extra width of embedded scrollbar
|
||||||
int getWidth() const override;
|
int getWidth() const override;
|
||||||
|
|
|
@ -89,6 +89,7 @@ void LoggerDialog::loadConfig()
|
||||||
StringParser parser(instance().logMessages());
|
StringParser parser(instance().logMessages());
|
||||||
myLogInfo->setList(parser.stringList());
|
myLogInfo->setList(parser.stringList());
|
||||||
myLogInfo->setSelected(0);
|
myLogInfo->setSelected(0);
|
||||||
|
myLogInfo->scrollToEnd();
|
||||||
|
|
||||||
myLogLevel->setSelected(instance().settings().getString("loglevel"), "1");
|
myLogLevel->setSelected(instance().settings().getString("loglevel"), "1");
|
||||||
myLogToConsole->setState(instance().settings().getBool("logtoconsole"));
|
myLogToConsole->setState(instance().settings().getBool("logtoconsole"));
|
||||||
|
|
|
@ -104,7 +104,7 @@ void StringListWidget::drawWidget(bool hilite)
|
||||||
GUI::Rect StringListWidget::getEditRect() const
|
GUI::Rect StringListWidget::getEditRect() const
|
||||||
{
|
{
|
||||||
GUI::Rect r(2, 1, _w - 2, _fontHeight);
|
GUI::Rect r(2, 1, _w - 2, _fontHeight);
|
||||||
const int offset = (_selectedItem - _currentPos) * _fontHeight;
|
const int offset = std::max(0, (_selectedItem - _currentPos) * _fontHeight);
|
||||||
r.top += offset;
|
r.top += offset;
|
||||||
r.bottom += offset;
|
r.bottom += offset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue