mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-05-12 01:19:46 +00:00
fix rectangel on guiObject
This commit is contained in:
parent
6456a2d26b
commit
17bfeb1ce7
2
.gitignore
vendored
2
.gitignore
vendored
@ -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*
|
||||||
|
@ -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) {
|
||||||
|
@ -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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user