Project

General

Profile

0004-Use-Oxygen-palette-as-hardwired-sender-colors-for-no.patch

dalbers, 01/29/2009 12:34 PM

View differences:

src/qtui/qtuistyle.cpp
83 83

  
84 84
  /*
85 85
   * Fillup the list of colors used for sender auto coloring In this case
86
   * this are all tango colors without the grey tones 
87
   * See "http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines" for details
86
   * These are Oxygen palette colors
88 87
   */
89
  // Butter
90
  addSenderAutoColor(SenderCol01, "#fce94f");
91
  addSenderAutoColor(SenderCol02, "#edd400");
92
  addSenderAutoColor(SenderCol03,  "#c4a000");
93
  // Orange
94
  addSenderAutoColor(SenderCol04,  "#fcaf3e");
95
  addSenderAutoColor(SenderCol05,  "#f57900");
96
  addSenderAutoColor(SenderCol06,  "#ce5c00");
97
  // Chocolate
98
  addSenderAutoColor(SenderCol07, "#e9b96e");
99
  addSenderAutoColor(SenderCol08, "#c17d11");
100
  addSenderAutoColor(SenderCol09, "#8f5902");
101
  // Chameleon
102
  addSenderAutoColor(SenderCol10, "#8ae234");
103
  addSenderAutoColor(SenderCol11, "#73d216");
104
  addSenderAutoColor(SenderCol12, "#4e9a06");
105
  // Sky Blue
106
  addSenderAutoColor(SenderCol13, "#729fcf");
107
  addSenderAutoColor(SenderCol14, "#3465a4");
108
  addSenderAutoColor(SenderCol15, "#204a87");
109
  // Plum
110
  addSenderAutoColor(SenderCol16, "#ad7fa8");
111
  addSenderAutoColor(SenderCol17, "#75507b");
112
  addSenderAutoColor(SenderCol18, "#5c3566");
113
  // Scarlet Red
114
  addSenderAutoColor(SenderCol19, "#ef2929");
115
  addSenderAutoColor(SenderCol20, "#cc0000");
116
  addSenderAutoColor(SenderCol21, "#a40000");
88
  addSenderAutoColor(SenderCol01, "#989a95");
89
  addSenderAutoColor(SenderCol02, "#ef8440");
90
  addSenderAutoColor(SenderCol03, "#ffe200");
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");
117 100

  
118 101
  QTextCharFormat nick;
119 102
  nick.setAnchor(true);
......
151 134
  s.setHighlightColor(col);
152 135
}
153 136

  
154
void QtUiStyle::addSenderAutoColor(FormatType type, const QString name) 
155
{
137
void QtUiStyle::addSenderAutoColor(FormatType type, const QString name) {
156 138
  QTextCharFormat autoColor;
157 139
  autoColor.setAnchor(true);
158 140
  autoColor.setForeground(QBrush(QColor(name)));
src/qtui/settingspages/colorsettingspage.cpp
170 170
  ui.senderBG->setColor(QColor("white"));
171 171
  ui.senderBG->setEnabled(false);
172 172
  ui.senderUseBG->setChecked(false);
173
  ui.senderAutoColor->setChecked(true);  
173
  ui.senderAutoColor->setChecked(false);
174 174
  ui.newMsgMarkerFG->setColor(Qt::red);
175 175

  
176 176
  /*
src/uisupport/uistyle.cpp
49 49
  }
50 50

  
51 51
  // Check for the sender auto coloring option
52
  _senderAutoColor = s.value("Flags/senderAutoColor", QVariant(true)).toBool();  
52
  _senderAutoColor = s.value("Flags/senderAutoColor", QVariant(true)).toBool();
53 53

  
54 54
  // Now initialize the mapping between FormatCodes and FormatTypes...
55 55
  _formatCodes["%O"] = None;
......
423 423
      // In this case we just use the qt function qChecksum which produces a
424 424
      // CRC16 hash. This should be fast and 16 bits are more than enough.
425 425
      hash = qChecksum(sender().toAscii().data(), sender().toAscii().size());
426
      return (UiStyle::FormatType)((((hash % 21) + 1) << 24) + 0x200);
426
      return (UiStyle::FormatType)((((hash % 12) + 1) << 24) + 0x200); // FIXME: amount of sender colors hardwired
427 427
    case Message::Notice:
428 428
      return UiStyle::NoticeMsg; break;
429 429
    case Message::Server:
430
-