diff options
author | Roopesh Chander <roop@forwardbias.in> | 2009-11-04 15:55:25 +0530 |
---|---|---|
committer | Roopesh Chander <roop@forwardbias.in> | 2009-11-04 15:55:25 +0530 |
commit | 3bded6e9f0a711cee9dbd4a0d56c68a7b2def777 (patch) | |
tree | 1d109d0a8d8f40d356c97c4b307ef3630464f51a /webscrap.cpp | |
parent | a979ef1508e281b1b90f217c08841b51ec67c7d8 (diff) |
make positioning of edit bar work with scaled scraps
Diffstat (limited to 'webscrap.cpp')
-rw-r--r-- | webscrap.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webscrap.cpp b/webscrap.cpp index 451b0b8..687d68f 100644 --- a/webscrap.cpp +++ b/webscrap.cpp @@ -351,7 +351,7 @@ void WebScrapContainer::createEditToolbar() { m_editToolbar->setParentItem(this); m_editToolbar->setZValue(901); m_editToolbar->layout()->activate(); - m_editToolbar->setPos(m_scrap->pos() + m_scrap->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 5, -5)); + m_editToolbar->setPos(m_frame->pos() + m_frame->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 30, -30)); m_editToolbar->setFlag(QGraphicsItem::ItemIsMovable, false); m_editToolbar->setVisible(false); @@ -399,7 +399,8 @@ void WebScrapContainer::handleResetZoomClicked() { path.addRoundedRect(0, 0, scrapSize.width() + 10, scrapSize.height() + 30, 10, 10); m_frame->setPath(path); m_toolbar->setPos(m_frame->pos() + m_frame->boundingRect().topRight() - QPointF(m_toolbar->rect().width(), 0)); - m_editToolbar->setPos(m_scrap->pos() + m_scrap->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 5, -5)); + m_editToolbar->setPos(m_frame->pos() + m_frame->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 30, -30)); + m_resizer->setRect(m_scrap->boundingRect()); } void WebScrapContainer::handleRectResized(QRectF rect) { @@ -418,7 +419,7 @@ void WebScrapContainer::handleRectResized(QRectF rect) { path.addRoundedRect(0, 0, scrapSize.width() + 10, scrapSize.height() + 30, 10, 10); m_frame->setPath(path); m_toolbar->setPos(m_frame->pos() + m_frame->boundingRect().topRight() - QPointF(m_toolbar->rect().width(), 0)); - m_editToolbar->setPos(m_scrap->pos() + m_scrap->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 5, -5)); + m_editToolbar->setPos(m_frame->pos() + m_frame->boundingRect().topRight() - QPointF(m_editToolbar->boundingRect().width() + 30, -30)); } WebScrap* WebScrapContainer::webScrap() const { |