aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorEugene Sandulenko2013-08-22 05:31:23 -0700
committerEugene Sandulenko2013-08-22 05:31:23 -0700
commit8a340007ea66983dd2f754c63dbf1afdc5892969 (patch)
treedb62d012f398250eadcbfb05e13d3f01ac1766cd /gui/widgets
parent76fde715df9fc22917243520ab0a6226337e6a43 (diff)
parent94792d2063b261846b72f7e9c61da52eb59febe4 (diff)
downloadscummvm-rg350-8a340007ea66983dd2f754c63dbf1afdc5892969.tar.gz
scummvm-rg350-8a340007ea66983dd2f754c63dbf1afdc5892969.tar.bz2
scummvm-rg350-8a340007ea66983dd2f754c63dbf1afdc5892969.zip
Merge pull request #361 from rundfunk47/guiimprovements
GUI: Various GUI Improvements
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/editable.cpp2
-rw-r--r--gui/widgets/edittext.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 6fae9346b2..667850d6cc 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -277,7 +277,7 @@ void EditableWidget::drawCaret(bool erase) {
int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font);
const uint last = (_caretPos > 0) ? _editString[_caretPos - 1] : 0;
x += g_gui.getKerningOffset(last, _editString[_caretPos], _font);
- g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font);
+ g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
}
}
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 3677f02e47..52527effd8 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -93,11 +93,15 @@ void EditTextWidget::drawWidget() {
// Draw the text
adjustOffset();
- g_gui.theme()->drawText(Common::Rect(_x+2+ _leftPadding,_y+2, _x+_leftPadding+getEditRect().width()+2, _y+_h-2), _editString, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, -_editScrollOffset, false, _font);
+
+ const Common::Rect &r = Common::Rect(_x + 2 + _leftPadding, _y + 2, _x + _leftPadding + getEditRect().width() + 8, _y + _h);
+ setTextDrawableArea(r);
+
+ g_gui.theme()->drawText(Common::Rect(_x + 2 + _leftPadding, _y + 2, _x + _leftPadding + getEditRect().width() + 2, _y + _h), _editString, _state, Graphics::kTextAlignLeft, ThemeEngine::kTextInversionNone, -_editScrollOffset, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
}
Common::Rect EditTextWidget::getEditRect() const {
- Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h-1);
+ Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h - 1);
return r;
}