Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
321de447
Commit
321de447
authored
Jan 03, 2020
by
Rye Mutt
🍞
Browse files
Reduce round calls
parent
5e95a3e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/llui/llfloater.cpp
View file @
321de447
...
...
@@ -2080,19 +2080,21 @@ void LLFloater::updateTitleButtons()
LLRect
btn_rect
;
if
(
mDragOnLeft
)
{
const
S32
size
=
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
);
btn_rect
.
setLeftTopAndSize
(
LLPANEL_BORDER_WIDTH
,
getRect
().
getHeight
()
-
close_box_from_top
-
(
floater_close_box_size
+
1
)
*
button_count
,
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
)
,
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
)
);
size
,
size
);
}
else
{
const
S32
size
=
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
);
btn_rect
.
setLeftTopAndSize
(
getRect
().
getWidth
()
-
LLPANEL_BORDER_WIDTH
-
(
floater_close_box_size
+
1
)
*
button_count
,
getRect
().
getHeight
()
-
close_box_from_top
,
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
)
,
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
)
);
size
,
size
);
}
// first time here, init 'buttons_rect'
...
...
@@ -2140,19 +2142,21 @@ void LLFloater::buildButtons(const Params& floater_params)
LLRect
btn_rect
;
if
(
mDragOnLeft
)
{
const
S32
size
=
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
);
btn_rect
.
setLeftTopAndSize
(
LLPANEL_BORDER_WIDTH
,
getRect
().
getHeight
()
-
close_box_from_top
-
(
floater_close_box_size
+
1
)
*
(
i
+
1
),
ll_round
(
floater_close_box_size
*
mButtonScale
)
,
ll_round
(
floater_close_box_size
*
mButtonScale
)
);
size
,
size
);
}
else
{
const
S32
size
=
ll_round
((
F32
)
floater_close_box_size
*
mButtonScale
);
btn_rect
.
setLeftTopAndSize
(
getRect
().
getWidth
()
-
LLPANEL_BORDER_WIDTH
-
(
floater_close_box_size
+
1
)
*
(
i
+
1
),
getRect
().
getHeight
()
-
close_box_from_top
,
ll_round
(
floater_close_box_size
*
mButtonScale
)
,
ll_round
(
floater_close_box_size
*
mButtonScale
)
);
size
,
size
);
}
LLButton
::
Params
p
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment