[Scummvm-cvs-logs] SF.net SVN: scummvm:[49133] scummvm/trunk/gui
sev at users.sourceforge.net
sev at users.sourceforge.net
Fri May 21 20:27:14 CEST 2010
Revision: 49133
http://scummvm.svn.sourceforge.net/scummvm/?rev=49133&view=rev
Author: sev
Date: 2010-05-21 18:27:13 +0000 (Fri, 21 May 2010)
Log Message:
-----------
Implement FR #2858270: GUI: List scrollbar actions should focus on list
Modified Paths:
--------------
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/ListWidget.h
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2010-05-21 18:25:01 UTC (rev 49132)
+++ scummvm/trunk/gui/ListWidget.cpp 2010-05-21 18:27:13 UTC (rev 49133)
@@ -36,7 +36,7 @@
namespace GUI {
-ListWidget::ListWidget(GuiObject *boss, const String &name, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, const String &name, uint32 cmd)
: EditableWidget(boss, name), _cmd(cmd) {
_scrollBar = NULL;
@@ -68,7 +68,7 @@
_editColor = ThemeEngine::kFontColorNormal;
}
-ListWidget::ListWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd)
+ListWidget::ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd)
: EditableWidget(boss, x, y, w, h), _cmd(cmd) {
_scrollBar = NULL;
@@ -472,6 +472,10 @@
if (_currentPos != (int)data) {
_currentPos = data;
draw();
+
+ // Scrollbar actions cause list focus (which triggers a redraw)
+ // NOTE: ListWidget's boss is always GUI::Dialog
+ ((GUI::Dialog *)_boss)->setFocusWidget(this);
}
break;
}
Modified: scummvm/trunk/gui/ListWidget.h
===================================================================
--- scummvm/trunk/gui/ListWidget.h 2010-05-21 18:25:01 UTC (rev 49132)
+++ scummvm/trunk/gui/ListWidget.h 2010-05-21 18:27:13 UTC (rev 49133)
@@ -87,8 +87,8 @@
ThemeEngine::FontColor _editColor;
public:
- ListWidget(GuiObject *boss, const String &name, uint32 cmd = 0);
- ListWidget(GuiObject *boss, int x, int y, int w, int h, uint32 cmd = 0);
+ ListWidget(Dialog *boss, const String &name, uint32 cmd = 0);
+ ListWidget(Dialog *boss, int x, int y, int w, int h, uint32 cmd = 0);
virtual ~ListWidget();
virtual Widget *findWidget(int x, int y);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list