Mercurial > hg > easyhg
diff 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 |
line wrap: on
line diff
--- a/uncommitteditem.cpp Wed Dec 01 11:54:01 2010 +0000 +++ b/uncommitteditem.cpp Wed Dec 01 17:41:14 2010 +0000 @@ -113,10 +113,21 @@ QRectF r(x0, 0, width - 3, height); paint->drawRect(r); - paint->drawLine(x0 + width/2, height, x0 + width/2, height + 40); - - QString label = tr("Uncommitted changes"); - paint->drawText(-(fm.width(label) - 50)/2, 25 - fm.height()/2 + fm.ascent(), label); + if (m_wide) { + QString label = tr("Uncommitted changes"); + paint->drawText(-(fm.width(label) - 50)/2, + 25 - fm.height()/2 + fm.ascent(), + label); + } else { + QString label = tr("Uncommitted"); + paint->drawText(-(fm.width(label) - 50)/2, + 25 - fm.height() + fm.ascent(), + label); + label = tr("changes"); + paint->drawText(-(fm.width(label) - 50)/2, + 25 + fm.ascent(), + label); + } paint->restore(); return;