comparison uncommitteditem.cpp @ 145:644bd31e8301

* Include the uncommitted item in general graph layout (in case it is not at the head, when other items will need to avoid it)
author Chris Cannam
date Wed, 01 Dec 2010 17:41:14 +0000
parents e6c6b88d19b9
children 70fe12873106
comparison
equal deleted inserted replaced
143:f61f032b06f9 145:644bd31e8301
111 111
112 int height = 49; 112 int height = 49;
113 QRectF r(x0, 0, width - 3, height); 113 QRectF r(x0, 0, width - 3, height);
114 paint->drawRect(r); 114 paint->drawRect(r);
115 115
116 paint->drawLine(x0 + width/2, height, x0 + width/2, height + 40); 116 if (m_wide) {
117 117 QString label = tr("Uncommitted changes");
118 QString label = tr("Uncommitted changes"); 118 paint->drawText(-(fm.width(label) - 50)/2,
119 paint->drawText(-(fm.width(label) - 50)/2, 25 - fm.height()/2 + fm.ascent(), label); 119 25 - fm.height()/2 + fm.ascent(),
120 label);
121 } else {
122 QString label = tr("Uncommitted");
123 paint->drawText(-(fm.width(label) - 50)/2,
124 25 - fm.height() + fm.ascent(),
125 label);
126 label = tr("changes");
127 paint->drawText(-(fm.width(label) - 50)/2,
128 25 + fm.ascent(),
129 label);
130 }
120 131
121 paint->restore(); 132 paint->restore();
122 return; 133 return;
123 } 134 }