The frame of the graphics text widget match the real text size

preferencesAboutTextFull
Claudio Valerio 10 years ago
parent 0b35b36ae4
commit 2f7521beb1
  1. 2
      src/domain/UBGraphicsDelegateFrame.cpp
  2. 3
      src/domain/UBGraphicsScene.cpp

@ -824,7 +824,7 @@ void UBGraphicsDelegateFrame::positionHandles()
if (mVisible) if (mVisible)
{ {
setRect(center.x() - mFrameWidth - width / 2, center.y() - mFrameWidth - mTitleBarHeight - h / 2, width + 2 * mFrameWidth, h + 2 * (mFrameWidth + mTitleBarHeight)); setRect(center.x() - mFrameWidth - width / 2, center.y() - mFrameWidth - mTitleBarHeight - h / 2, width + 2 * mFrameWidth, h + (2 * mFrameWidth) + mTitleBarHeight);
} }
else else
{ {

@ -1599,8 +1599,7 @@ UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString, const Q
UBApplication::undoStack->push(uc); UBApplication::undoStack->push(uc);
} }
connect(textItem, SIGNAL(textUndoCommandAdded(UBGraphicsTextItem *)), connect(textItem, SIGNAL(textUndoCommandAdded(UBGraphicsTextItem *)), this, SLOT(textUndoCommandAdded(UBGraphicsTextItem *)));
this, SLOT(textUndoCommandAdded(UBGraphicsTextItem *)));
textItem->setFocus(); textItem->setFocus();

Loading…
Cancel
Save