fix rectangel on guiObject

This commit is contained in:
Andrei Yankovich 2019-02-12 10:50:18 +03:00
parent 6456a2d26b
commit 17bfeb1ce7
3 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@ -14,6 +14,8 @@
# Qt-es # Qt-es
/Build* /Build*
/build* /build*
Snake/build/
SnakeServer/Client/build/
SnakeServer/serverProtocolTests/build/ SnakeServer/serverProtocolTests/build/
*.stash *.stash
/Release* /Release*

View File

@ -19,7 +19,7 @@ void GuiObject::render() {
} }
QRectF GuiObject::rect() const { QRectF GuiObject::rect() const {
return QRectF(m_x, m_y, m_w, m_h); return QRectF(m_x - m_w / 2, m_y - m_h / 2, m_w, m_h);
} }
void GuiObject::setAngle(double angle) { void GuiObject::setAngle(double angle) {

View File

@ -34,7 +34,7 @@ BasePopUp {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0 anchors.topMargin: 0
font.pointSize: 14 font.pointSize: 13
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
renderType: Text.QtRendering renderType: Text.QtRendering
textFormat: Text.AutoText textFormat: Text.AutoText
@ -85,6 +85,4 @@ BasePopUp {
} }
} }
} }
} }