mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:30:35 +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;
|
int text_y = -_displayNameBoundingRect.height() / 2;
|
||||||
|
|
||||||
// draw a gray background
|
// draw a gray background
|
||||||
QRect rect = textRenderer(DISPLAYNAME)->metrics().tightBoundingRect(_displayName);
|
int left = text_x + _displayNameBoundingRect.x();
|
||||||
|
int right = left + _displayNameBoundingRect.width();
|
||||||
int left = text_x + rect.x();
|
int bottom = text_y + _displayNameBoundingRect.y();
|
||||||
int right = left + rect.width();
|
int top = bottom + _displayNameBoundingRect.height();
|
||||||
int bottom = text_y + rect.y();
|
|
||||||
int top = bottom + rect.height();
|
|
||||||
const int border = 8;
|
const int border = 8;
|
||||||
bottom -= border;
|
bottom -= border;
|
||||||
left -= border;
|
left -= border;
|
||||||
|
|
Loading…
Reference in a new issue