mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Removed duplicated calculation of bounding rect for display name
This commit is contained in:
parent
354c9bff09
commit
10c9b902b9
1 changed files with 4 additions and 6 deletions
|
@ -349,12 +349,10 @@ void Avatar::renderDisplayName() {
|
|||
int text_y = -_displayNameBoundingRect.height() / 2;
|
||||
|
||||
// draw a gray background
|
||||
QRect rect = textRenderer(DISPLAYNAME)->metrics().tightBoundingRect(_displayName);
|
||||
|
||||
int left = text_x + rect.x();
|
||||
int right = left + rect.width();
|
||||
int bottom = text_y + rect.y();
|
||||
int top = bottom + rect.height();
|
||||
int left = text_x + _displayNameBoundingRect.x();
|
||||
int right = left + _displayNameBoundingRect.width();
|
||||
int bottom = text_y + _displayNameBoundingRect.y();
|
||||
int top = bottom + _displayNameBoundingRect.height();
|
||||
const int border = 8;
|
||||
bottom -= border;
|
||||
left -= border;
|
||||
|
|
Loading…
Reference in a new issue