Fix a glitch in the style engine (which mis-parsed %O), make the default
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 28 Nov 2007 23:43:30 +0000 (23:43 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 28 Nov 2007 23:43:30 +0000 (23:43 +0000)
text color black for QuasselTopia, and fix message input.

src/qtopia/qtopiauistyle.cpp
src/uisupport/inputline.cpp
src/uisupport/uistyle.cpp

index 5168ee4..a643f5a 100644 (file)
@@ -23,6 +23,7 @@
 QtopiaUiStyle::QtopiaUiStyle() : UiStyle() {
 
   QTextCharFormat def;
 QtopiaUiStyle::QtopiaUiStyle() : UiStyle() {
 
   QTextCharFormat def;
+  def.setForeground(QBrush("#000000"));
   def.setFont(QFont("Verdana",5));
   setFormat(None, def);
 
   def.setFont(QFont("Verdana",5));
   setFormat(None, def);
 
index 535b3c2..dbfb61c 100644 (file)
@@ -47,6 +47,9 @@ void InputLine::keyPressEvent(QKeyEvent * event) {
       if(idx < history.count()) setText(history[idx]);
       else setText("");
       event->accept();
       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);
     }
     } else {
       QLineEdit::keyPressEvent(event);
     }
index 8c3afaa..c81131f 100644 (file)
@@ -160,11 +160,11 @@ UiStyle::StyledText UiStyle::styleString(QString s) {
       fmtList.clear(); fmtList.append(None);
       curFmtRng.format = format(None);
       fgCol = bgCol = -1;
       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
 
     } 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];
     } else { // all others are toggles
       QString code = QString("%") + s[pos+1];
       if(s[pos+1] == 'D') code += s[pos+2];