~ubuntu-branches/ubuntu/karmic/quassel/karmic-backports

« back to all changes in this revision

Viewing changes to src/qtui/qtuistyle.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2009-02-15 19:46:44 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20090215194644-dr40bbv9rxmtzxh4
Tags: 0.4.0~git090215-0ubuntu1
* New upstream git snapshot
  - Show identities and network settings on first start
  - Multi-line paste protection
  - Settings usability improvments
  - Continued bug fixing
* Adjust quassel-data.install for new and removed icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
  ts.setForeground(QBrush("grey"));
76
76
  setFormat(Timestamp, ts, Settings::Default);
77
77
 
 
78
  // Set the default sender color
78
79
  QTextCharFormat sender;
79
80
  sender.setAnchor(true);
80
81
  sender.setForeground(QBrush("navy"));
81
82
  setFormat(Sender, sender, Settings::Default);
82
83
 
 
84
  /*
 
85
   * Fillup the list of colors used for sender auto coloring In this case
 
86
   * These are Oxygen palette colors
 
87
   */
 
88
  addSenderAutoColor(SenderCol01, "#989a95");
 
89
  addSenderAutoColor(SenderCol02, "#ef8440");
 
90
  addSenderAutoColor(SenderCol03, "#ffbf00");
 
91
  addSenderAutoColor(SenderCol04, "#49b13b");
 
92
  addSenderAutoColor(SenderCol05, "#00a778");
 
93
  addSenderAutoColor(SenderCol06, "#008b90");
 
94
  addSenderAutoColor(SenderCol07, "#0069ba");
 
95
  addSenderAutoColor(SenderCol08, "#563696");
 
96
  addSenderAutoColor(SenderCol09, "#ad3597");
 
97
  addSenderAutoColor(SenderCol10, "#e70083");
 
98
  addSenderAutoColor(SenderCol11, "#e70f00");
 
99
  addSenderAutoColor(SenderCol12, "#866127");
 
100
 
83
101
  QTextCharFormat nick;
84
102
  nick.setAnchor(true);
85
103
  nick.setFontWeight(QFont::Bold);
115
133
  QtUiStyleSettings s;
116
134
  s.setHighlightColor(col);
117
135
}
 
136
 
 
137
void QtUiStyle::addSenderAutoColor(FormatType type, const QString name) {
 
138
  QTextCharFormat autoColor;
 
139
  autoColor.setAnchor(true);
 
140
  autoColor.setForeground(QBrush(QColor(name)));
 
141
  setFormat(type, autoColor, Settings::Default);
 
142
}