4
1
mirror of https://github.com/QuasarApp/Snake.git synced 2025-05-08 23:49:42 +00:00

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

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

@ -19,7 +19,7 @@ void GuiObject::render() {
}
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) {

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