From 5ffc2c9018aee8b11750a956e9228ed70b3413ae Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 28 Nov 2007 23:43:30 +0000 Subject: [PATCH 1/1] Fix a glitch in the style engine (which mis-parsed %O), make the default text color black for QuasselTopia, and fix message input. --- src/qtopia/qtopiauistyle.cpp | 1 + src/uisupport/inputline.cpp | 3 +++ src/uisupport/uistyle.cpp | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qtopia/qtopiauistyle.cpp b/src/qtopia/qtopiauistyle.cpp index 5168ee48..a643f5a5 100644 --- a/src/qtopia/qtopiauistyle.cpp +++ b/src/qtopia/qtopiauistyle.cpp @@ -23,6 +23,7 @@ QtopiaUiStyle::QtopiaUiStyle() : UiStyle() { QTextCharFormat def; + def.setForeground(QBrush("#000000")); def.setFont(QFont("Verdana",5)); setFormat(None, def); diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 535b3c27..dbfb61cb 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -47,6 +47,9 @@ void InputLine::keyPressEvent(QKeyEvent * event) { if(idx < history.count()) setText(history[idx]); else setText(""); event->accept(); + } else if(event->key() == Qt::Key_Select) { // for Qtopia + emit returnPressed(); + QLineEdit::keyPressEvent(event); } else { QLineEdit::keyPressEvent(event); } diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 8c3afaab..c81131f8 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -160,11 +160,11 @@ UiStyle::StyledText UiStyle::styleString(QString s) { fmtList.clear(); fmtList.append(None); curFmtRng.format = format(None); fgCol = bgCol = -1; - length = 1; + length = 2; } else if(s[pos+1] == 'R') { // reverse // TODO: implement reverse formatting - length = 1; + length = 2; } else { // all others are toggles QString code = QString("%") + s[pos+1]; if(s[pos+1] == 'D') code += s[pos+2]; -- 2.20.1