diff --git a/escher/src/editable_text_cell.cpp b/escher/src/editable_text_cell.cpp index e80fd7947..76f2d7da3 100644 --- a/escher/src/editable_text_cell.cpp +++ b/escher/src/editable_text_cell.cpp @@ -39,10 +39,7 @@ View * EditableTextCell::subviewAtIndex(int index) { } void EditableTextCell::layoutSubviews() { - KDCoordinate width = bounds().width(); - KDCoordinate height = bounds().height(); - KDCoordinate textHeight = m_textField.minimalSizeForOptimalDisplay().height(); - m_textField.setFrame(KDRect(k_separatorThickness, (height - textHeight)/2, width - k_separatorThickness, textHeight)); + m_textField.setFrame(bounds()); } void EditableTextCell::didBecomeFirstResponder() { diff --git a/escher/src/text_field.cpp b/escher/src/text_field.cpp index 1f91561ff..5ddabb1a0 100644 --- a/escher/src/text_field.cpp +++ b/escher/src/text_field.cpp @@ -21,11 +21,15 @@ TextField::ContentView::ContentView(char * textBuffer, char * draftTextBuffer, s } void TextField::ContentView::drawRect(KDContext * ctx, KDRect rect) const { - ctx->fillRect(rect, m_backgroundColor); + KDColor bckCol = m_backgroundColor; + if (m_isEditing) { + bckCol = KDColorWhite; + } + ctx->fillRect(rect, bckCol); KDSize textSize = KDText::stringSize(text(), m_fontSize); KDPoint origin(m_horizontalAlignment*(m_frame.width() - textSize.width()-m_cursorView.minimalSizeForOptimalDisplay().width()), m_verticalAlignment*(m_frame.height() - textSize.height())); - ctx->drawString(text(), origin, m_fontSize, m_textColor, m_backgroundColor); + ctx->drawString(text(), origin, m_fontSize, m_textColor, bckCol); } void TextField::ContentView::reload() {