Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
723a86f6
Commit
723a86f6
authored
15 years ago
by
richard
Browse files
Options
Downloads
Patches
Plain Diff
fixed layout of items embedded in notecards
parent
83fb99a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llviewertexteditor.cpp
+19
-2
19 additions, 2 deletions
indra/newview/llviewertexteditor.cpp
with
19 additions
and
2 deletions
indra/newview/llviewertexteditor.cpp
+
19
−
2
View file @
723a86f6
...
@@ -188,7 +188,24 @@ class LLEmbeddedItemSegment : public LLTextSegment
...
@@ -188,7 +188,24 @@ class LLEmbeddedItemSegment : public LLTextSegment
/*virtual*/
S32
getNumChars
(
S32
num_pixels
,
S32
segment_offset
,
S32
line_offset
,
S32
max_chars
)
const
/*virtual*/
S32
getNumChars
(
S32
num_pixels
,
S32
segment_offset
,
S32
line_offset
,
S32
max_chars
)
const
{
{
return
1
;
// always draw at beginning of line
if
(
line_offset
==
0
)
{
return
1
;
}
else
{
S32
width
,
height
;
getDimensions
(
mStart
,
1
,
width
,
height
);
if
(
width
>
num_pixels
)
{
return
0
;
}
else
{
return
1
;
}
}
}
}
/*virtual*/
F32
draw
(
S32
start
,
S32
end
,
S32
selection_start
,
S32
selection_end
,
const
LLRect
&
draw_rect
)
/*virtual*/
F32
draw
(
S32
start
,
S32
end
,
S32
selection_start
,
S32
selection_end
,
const
LLRect
&
draw_rect
)
{
{
...
@@ -208,7 +225,7 @@ class LLEmbeddedItemSegment : public LLTextSegment
...
@@ -208,7 +225,7 @@ class LLEmbeddedItemSegment : public LLTextSegment
}
}
F32
right_x
;
F32
right_x
;
mStyle
->
getFont
()
->
render
(
mLabel
,
0
,
image_rect
.
mRight
+
EMBEDDED_ITEM_LABEL_PADDING
,
draw_rect
.
m
Bottom
,
color
,
LLFontGL
::
LEFT
,
LLFontGL
::
BOT
TO
M
,
LLFontGL
::
UNDERLINE
,
LLFontGL
::
NO_SHADOW
,
mLabel
.
length
(),
S32_MAX
,
&
right_x
);
mStyle
->
getFont
()
->
render
(
mLabel
,
0
,
image_rect
.
mRight
+
EMBEDDED_ITEM_LABEL_PADDING
,
draw_rect
.
m
Top
,
color
,
LLFontGL
::
LEFT
,
LLFontGL
::
TO
P
,
LLFontGL
::
UNDERLINE
,
LLFontGL
::
NO_SHADOW
,
mLabel
.
length
(),
S32_MAX
,
&
right_x
);
return
right_x
;
return
right_x
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment