Mercurial > hg > easyhg
comparison changesetitem.cpp @ 124:1f27f71a7034
* Fixes to changeset details display; show on right instead of below to avoid disrupting flow
author | Chris Cannam |
---|---|
date | Mon, 29 Nov 2010 11:38:25 +0000 |
parents | 005a54380502 |
children | 63c2f3f61c79 |
comparison
equal
deleted
inserted
replaced
123:3afa1ce339ec | 124:1f27f71a7034 |
---|---|
50 m_detail = new ChangesetDetailItem(m_changeset); | 50 m_detail = new ChangesetDetailItem(m_changeset); |
51 m_detail->setZValue(zValue() + 1); | 51 m_detail->setZValue(zValue() + 1); |
52 scene()->addItem(m_detail); | 52 scene()->addItem(m_detail); |
53 int w = 100; | 53 int w = 100; |
54 if (m_wide) w = 180; | 54 if (m_wide) w = 180; |
55 m_detail->moveBy(x() - (m_detail->boundingRect().width() - 50) / 2, | 55 int h = 80; |
56 y() + 60); | 56 // m_detail->moveBy(x() - (m_detail->boundingRect().width() - 50) / 2, |
57 // y() + 60); | |
58 m_detail->moveBy(x() + (w + 50) / 2 + 10 + 0.5, | |
59 y() - (m_detail->boundingRect().height() - h) / 2 + 0.5); | |
57 emit detailShown(); | 60 emit detailShown(); |
58 } | 61 } |
59 | 62 |
60 void | 63 void |
61 ChangesetItem::hideDetail() | 64 ChangesetItem::hideDetail() |
62 { | 65 { |
66 if (!m_detail) return; | |
67 scene()->removeItem(m_detail); | |
63 delete m_detail; | 68 delete m_detail; |
64 m_detail = 0; | 69 m_detail = 0; |
65 emit detailHidden(); | 70 emit detailHidden(); |
66 } | 71 } |
67 | 72 |