Mercurial > hg > easyhg
comparison changesetitem.cpp @ 147:465c8d51c6d5
* Don't show tip tag; return to using incremental log on commit
author | Chris Cannam |
---|---|
date | Wed, 01 Dec 2010 20:19:21 +0000 |
parents | 644bd31e8301 |
children | 2fef6b0dfbe8 |
comparison
equal
deleted
inserted
replaced
146:5e16b83374fd | 147:465c8d51c6d5 |
---|---|
202 QString person = TextAbbrev::abbreviate(m_changeset->authorName(), fm, wid); | 202 QString person = TextAbbrev::abbreviate(m_changeset->authorName(), fm, wid); |
203 paint->drawText(x0 + 3, fm.ascent(), person); | 203 paint->drawText(x0 + 3, fm.ascent(), person); |
204 | 204 |
205 paint->setPen(QPen(Qt::black)); | 205 paint->setPen(QPen(Qt::black)); |
206 | 206 |
207 QString tags = m_changeset->tags().join(" ").trimmed(); | 207 QStringList tags = m_changeset->tags(); |
208 if (tags != "") { | 208 if (!tags.empty()) { |
209 int tw = fm.width(tags); | 209 QStringList nonTipTags; |
210 paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), | 210 foreach (QString t, tags) { |
211 QBrush(Qt::yellow)); | 211 // I'm not convinced that showing the tip tag really |
212 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tags); | 212 // works; I think perhaps it confuses as much as it |
213 // illuminates. But also, our current implementation | |
214 // doesn't interact well with it because it moves -- it's | |
215 // the one thing that can actually (in normal use) change | |
216 // inside an existing changeset record even during an | |
217 // incremental update | |
218 if (t != "tip") nonTipTags.push_back(t); | |
219 } | |
220 if (!nonTipTags.empty()) { | |
221 QString tagText = nonTipTags.join(" ").trimmed(); | |
222 int tw = fm.width(tagText); | |
223 paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), | |
224 QBrush(Qt::yellow)); | |
225 paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText); | |
226 } | |
213 } | 227 } |
214 | 228 |
215 if (m_showBranch) { | 229 if (m_showBranch) { |
216 // write branch name | 230 // write branch name |
217 f.setBold(true); | 231 f.setBold(true); |