Moving action palette to the correct place

preferencesAboutTextFull
Ilia Ryabokon 13 years ago
parent 653201b63a
commit 24741f2e1b
  1. 13
      src/board/UBBoardPaletteManager.cpp

@ -665,11 +665,8 @@ void UBBoardPaletteManager::addItem(const QUrl& pUrl)
mAddItemPalette->show(); mAddItemPalette->show();
mAddItemPalette->adjustSizeAndPosition(); mAddItemPalette->adjustSizeAndPosition();
QRect controlGeo = UBApplication::applicationController->displayManager()->controlGeometry(); mAddItemPalette->move((mContainer->width() - mAddItemPalette->width()) / 2,
(mContainer->height() - mAddItemPalette->height()) / 5);
mAddItemPalette->move(controlGeo.x() + ((controlGeo.width() - mAddItemPalette->geometry().width()) / 2),
(controlGeo.y() + (controlGeo.height() - mAddItemPalette->geometry().height()) / 5));
} }
void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool isInit) void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool isInit)
@ -831,13 +828,11 @@ void UBBoardPaletteManager::addItem(const QPixmap& pPixmap, const QPointF& pos,
mPos = pos; mPos = pos;
mScaleFactor = scaleFactor; mScaleFactor = scaleFactor;
QRect controlGeo = UBApplication::applicationController->displayManager()->controlGeometry();
mAddItemPalette->show(); mAddItemPalette->show();
mAddItemPalette->adjustSizeAndPosition(); mAddItemPalette->adjustSizeAndPosition();
mAddItemPalette->move(controlGeo.x() + ((controlGeo.width() - mAddItemPalette->geometry().width()) / 2), mAddItemPalette->move((mContainer->width() - mAddItemPalette->width()) / 2,
(controlGeo.y() + (controlGeo.height() - mAddItemPalette->geometry().height()) / 5)); (mContainer->height() - mAddItemPalette->height()) / 5);
} }

Loading…
Cancel
Save