Pin Tool: Improve adjustment (#352)

Fix pin widget adjustment position
This commit is contained in:
Ahmed Zetao Yang
2018-09-21 19:55:16 +08:00
committed by Dharkael
parent 415b059fb2
commit 503de1be04
2 changed files with 1 additions and 5 deletions

View File

@@ -45,11 +45,7 @@ QString PinTool::description() const {
QWidget* PinTool::widget() {
PinWidget *w = new PinWidget(m_pixmap);
const int &&m = w->margin();
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
QRect adjusted_pos = m_geometry + QMargins(m,-m,-m,-m);
#else
QRect adjusted_pos = m_geometry + QMargins(m, m, m, m);
#endif
w->setGeometry(adjusted_pos);
return w;
}