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
c2eec5b1
Commit
c2eec5b1
authored
1 year ago
by
Ansariel
Committed by
Guru
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't hardcode UI text plus layout fixes and removing some needless checks
parent
e246e811
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfloateremojipicker.cpp
+22
-32
22 additions, 32 deletions
indra/newview/llfloateremojipicker.cpp
indra/newview/skins/default/xui/en/floater_emoji_picker.xml
+13
-12
13 additions, 12 deletions
indra/newview/skins/default/xui/en/floater_emoji_picker.xml
with
35 additions
and
44 deletions
indra/newview/llfloateremojipicker.cpp
+
22
−
32
View file @
c2eec5b1
...
...
@@ -80,7 +80,7 @@ LLFloaterEmojiPicker* LLFloaterEmojiPicker::getInstance()
LLFloaterEmojiPicker
*
LLFloaterEmojiPicker
::
showInstance
(
pick_callback_t
pick_callback
,
close_callback_t
close_callback
)
{
LLFloaterEmojiPicker
*
floater
=
getInstance
();
if
(
LLFloaterEmojiPicker
*
floater
=
getInstance
()
)
if
(
floater
)
floater
->
show
(
pick_callback
,
close_callback
);
return
floater
;
}
...
...
@@ -101,41 +101,31 @@ LLFloaterEmojiPicker::LLFloaterEmojiPicker(const LLSD& key)
BOOL
LLFloaterEmojiPicker
::
postBuild
()
{
// Should be initialized first
if
((
mPreviewEmoji
=
getChild
<
LLButton
>
(
"PreviewEmoji"
)))
mPreviewEmoji
=
getChild
<
LLButton
>
(
"PreviewEmoji"
);
mPreviewEmoji
->
setClickedCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onPreviewEmojiClick
,
this
));
mCategory
=
getChild
<
LLComboBox
>
(
"Category"
);
mCategory
->
setCommitCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onCategoryCommit
,
this
));
const
auto
&
cat2Descrs
=
LLEmojiDictionary
::
instance
().
getCategory2Descrs
();
mCategory
->
clearRows
();
for
(
const
auto
&
item
:
cat2Descrs
)
{
mPreviewEmoji
->
setClickedCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onPreviewEmojiClick
,
this
));
std
::
string
value
=
item
.
first
;
std
::
string
name
=
value
;
LLStringUtil
::
capitalize
(
name
);
mCategory
->
add
(
name
,
value
);
}
mCategory
->
setSelectedByValue
(
mSelectedCategory
,
true
);
if
((
mCategory
=
getChild
<
LLComboBox
>
(
"Category"
)))
{
mCategory
->
setCommitCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onCategoryCommit
,
this
));
mCategory
->
setLabel
(
LLStringExplicit
(
"Choose a category"
));
const
auto
&
cat2Descrs
=
LLEmojiDictionary
::
instance
().
getCategory2Descrs
();
mCategory
->
clearRows
();
for
(
const
auto
&
item
:
cat2Descrs
)
{
std
::
string
value
=
item
.
first
;
std
::
string
name
=
value
;
LLStringUtil
::
capitalize
(
name
);
mCategory
->
add
(
name
,
value
);
}
mCategory
->
setSelectedByValue
(
mSelectedCategory
,
true
);
}
if
((
mSearch
=
getChild
<
LLLineEditor
>
(
"Search"
)))
{
mSearch
->
setKeystrokeCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onSearchKeystroke
,
this
,
_1
,
_2
),
NULL
);
mSearch
->
setLabel
(
LLStringExplicit
(
"Type to search an emoji"
));
mSearch
->
setFont
(
LLViewerChat
::
getChatFont
());
mSearch
->
setText
(
mSearchPattern
);
}
mSearch
=
getChild
<
LLLineEditor
>
(
"Search"
);
mSearch
->
setKeystrokeCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onSearchKeystroke
,
this
,
_1
,
_2
),
NULL
);
mSearch
->
setFont
(
LLViewerChat
::
getChatFont
());
mSearch
->
setText
(
mSearchPattern
);
if
((
mEmojis
=
getChild
<
LLScrollListCtrl
>
(
"Emojis"
)))
{
mEmojis
->
setCommitCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onEmojiSelect
,
this
));
mEmojis
->
setDoubleClickCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onEmojiPick
,
this
));
fillEmojis
();
}
mEmojis
=
getChild
<
LLScrollListCtrl
>
(
"Emojis"
);
mEmojis
->
setCommitCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onEmojiSelect
,
this
));
mEmojis
->
setDoubleClickCallback
(
boost
::
bind
(
&
LLFloaterEmojiPicker
::
onEmojiPick
,
this
));
fillEmojis
();
return
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/floater_emoji_picker.xml
+
13
−
12
View file @
c2eec5b1
...
...
@@ -11,23 +11,23 @@
width=
"200"
>
<line_editor
name=
"Search"
label=
"Type to search an emoji"
layout=
"bottomleft"
follows=
"bottom|left|right"
text_tentative_color=
"TextFgTentativeColor"
max_length_bytes=
"63"
left_pad=
"5"
bottom=
"14"
left=
"34"
bottom=
"5"
left=
"39"
height=
"29"
width=
"1
62
"
/>
width=
"1
58
"
/>
<button
name=
"PreviewEmoji"
layout=
"bottomleft"
follows=
"bottom|left"
font=
"EmojiHuge"
use_font_color=
"true"
bottom=
"
14
"
left=
"
0
"
bottom=
"
5
"
left=
"
5
"
height=
"29"
width=
"29"
/>
<scroll_list
...
...
@@ -39,26 +39,27 @@
commit_on_selection_change=
"true"
draw_heading=
"true"
heading_height=
"25"
left=
"5"
row_padding=
"0"
top=
"25"
height=
"33
0
"
width=
"
200
"
>
height=
"33
8
"
width=
"
192
"
>
<columns
label=
"Look"
name=
"look"
width=
"
4
0"
/>
width=
"
5
0"
/>
<columns
label=
"Name"
name=
"name"
/>
</scroll_list>
<combo_box
name=
"Category"
label=
"Choose a category"
layout=
"topleft"
follows=
"top|left|right"
allow_text_entry=
"true"
left_pad=
"4"
top=
"0"
left=
"
4
"
height=
"2
7
"
left=
"
5
"
height=
"2
5
"
width=
"192"
/>
</floater>
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