Skip to content

Commit 74a64d2

Browse files
Merge branch 'develop' into maxim/voice-moderation
2 parents c39135c + c8d08ee commit 74a64d2

File tree

83 files changed

+5517
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5517
-203
lines changed

.github/labeler.yaml

Lines changed: 64 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,109 @@
11
llappearance:
2-
- indra/llappearance/**/*
2+
- changed-files:
3+
- any-glob-to-any-file: indra/llappearance/**
34

45
llaudio:
5-
- indra/llaudio/**/*
6+
- changed-files:
7+
- any-glob-to-any-file: indra/llaudio/**
68

79
llcharacter:
8-
- indra/llcharacter/**/*
10+
- changed-files:
11+
- any-glob-to-any-file: indra/llcharacter/**
912

1013
llcommon:
11-
- indra/llcommon/**/*
14+
- changed-files:
15+
- any-glob-to-any-file: indra/llcommon/**
1216

1317
llcorehttp:
14-
- indra/llcorehttp/**/*
18+
- changed-files:
19+
- any-glob-to-any-file: indra/llcorehttp/**
1520

1621
llcrashlogger:
17-
- indra/llcrashlogger/**/*
22+
- changed-files:
23+
- any-glob-to-any-file: indra/llcrashlogger/**
1824

1925
llfilesystem:
20-
- indra/llfilesystem/**/*
26+
- changed-files:
27+
- any-glob-to-any-file: indra/llfilesystem/**
2128

2229
llimage:
23-
- indra/llimage/**/*
30+
- changed-files:
31+
- any-glob-to-any-file: indra/llimage/**
2432

2533
llimagej2coj:
26-
- indra/llimagej2coj/**/*
34+
- changed-files:
35+
- any-glob-to-any-file: indra/llimagej2coj/**
2736

2837
llinventory:
29-
- indra/llinventory/**/*
38+
- changed-files:
39+
- any-glob-to-any-file: indra/llinventory/**
3040

3141
llkdu:
32-
- indra/llkdu/**/*
42+
- changed-files:
43+
- any-glob-to-any-file: indra/llkdu/**
3344

3445
llmath:
35-
- indra/llmath/**/*
46+
- changed-files:
47+
- any-glob-to-any-file: indra/llmath/**
3648

3749
llmeshoptimizer:
38-
- indra/llmeshoptimizer/**/*
50+
- changed-files:
51+
- any-glob-to-any-file: indra/llmeshoptimizer/**
3952

4053
llmessage:
41-
- indra/llmessage/**/*
54+
- changed-files:
55+
- any-glob-to-any-file: indra/llmessage/**
4256

4357
llplugin:
44-
- indra/llplugin/**/*
58+
- changed-files:
59+
- any-glob-to-any-file: indra/llplugin/**
4560

4661
llprimitive:
47-
- indra/llprimitive/**/*
62+
- changed-files:
63+
- any-glob-to-any-file: indra/llprimitive/**
4864

4965
llrender:
50-
- indra/llrender/**/*
66+
- changed-files:
67+
- any-glob-to-any-file: indra/llrender/**
5168

5269
llui:
53-
- indra/llui/**/*
70+
- changed-files:
71+
- any-glob-to-any-file: indra/llui/**
5472

5573
llwindow:
56-
- indra/llwindow/**/*
74+
- changed-files:
75+
- any-glob-to-any-file: indra/llwindow/**
5776

5877
llxml:
59-
- indra/llxml/**/*
78+
- changed-files:
79+
- any-glob-to-any-file: indra/llxml/**
6080

6181
cmake:
62-
- '**/*.cmake'
63-
- '**/*/cmake/*'
64-
- '**/CMakeLists.txt'
82+
- changed-files:
83+
- any-glob-to-any-file:
84+
- '**/*.cmake'
85+
- '**/*/cmake/*'
86+
- '**/CMakeLists.txt'
6587

6688
python:
67-
- '**/*.py'
89+
- changed-files:
90+
- any-glob-to-any-file: '**/*.py'
6891

6992
c/cpp:
70-
- '**/*.c'
71-
- '**/*.cpp'
72-
- '**/*.cxx'
73-
- '**/*.h'
74-
- '**/*.hpp'
75-
- '**/*.hxx'
76-
- '**/*.i'
77-
- '**/*.inl'
78-
- '**/*.y'
79-
80-
'team:viewer':
81-
- '*'
93+
- changed-files:
94+
- any-glob-to-any-file:
95+
- '**/*.c'
96+
- '**/*.cpp'
97+
- '**/*.cxx'
98+
- '**/*.h'
99+
- '**/*.hpp'
100+
- '**/*.hxx'
101+
- '**/*.i'
102+
- '**/*.inl'
103+
- '**/*.y'
104+
105+
objc:
106+
- changed-files:
107+
- any-glob-to-any-file:
108+
- '**/*.m'
109+
- '**/*.mm'

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
ref: ${{ github.event.pull_request.head.sha || github.sha }}
9292

9393
- name: Setup python
94-
uses: actions/setup-python@v5
94+
uses: actions/setup-python@v6
9595
with:
9696
python-version: "3.11"
9797
- name: Checkout build variables

.github/workflows/check-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check PR description
15-
uses: actions/github-script@v7
15+
uses: actions/github-script@v8
1616
with:
1717
script: |
1818
const description = context.payload.pull_request.body || '';

.github/workflows/cla.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
path-to-signatures: signatures.json
2424
remote-organization-name: secondlife
2525
remote-repository-name: cla-signatures
26-
26+

.github/workflows/label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v4
12+
- uses: actions/labeler@v6
1313
with:
1414
configuration-path: .github/labeler.yaml
1515
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v5
15-
- uses: actions/setup-python@v4
15+
- uses: actions/setup-python@v6
1616
with:
1717
python-version: 3.x
1818
- uses: pre-commit/[email protected]

.github/workflows/tag-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
echo NIGHTLY_DATE=${NIGHTLY_DATE} >> ${GITHUB_ENV}
3636
echo TAG_ID="$(echo ${{ github.sha }} | cut -c1-8)-${{ inputs.project || '${NIGHTLY_DATE}' }}" >> ${GITHUB_ENV}
3737
- name: Update Tag
38-
uses: actions/github-script@v7.0.1
38+
uses: actions/github-script@v8
3939
with:
4040
# use a real access token instead of GITHUB_TOKEN default.
4141
# required so that the results of this tag creation can trigger the build workflow

indra/llui/llscrolllistcell.cpp

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const LLSD LLScrollListCell::getAltValue() const
9898
LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p)
9999
: LLScrollListCell(p),
100100
mIcon(LLUI::getUIImage(p.value().asString())),
101+
mIconSize(0),
101102
mColor(p.color),
102103
mAlignment(p.font_halign)
103104
{}
@@ -140,37 +141,56 @@ void LLScrollListIcon::setValue(const LLSD& value)
140141
}
141142
}
142143

143-
144144
void LLScrollListIcon::setColor(const LLColor4& color)
145145
{
146146
mColor = color;
147147
}
148148

149+
void LLScrollListIcon::setIconSize(S32 size)
150+
{
151+
mIconSize = size;
152+
}
153+
149154
S32 LLScrollListIcon::getWidth() const
150155
{
151156
// if no specified fix width, use width of icon
152-
if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
157+
if (LLScrollListCell::getWidth() != 0)
158+
{
159+
return LLScrollListCell::getWidth();
160+
}
161+
if (mIconSize != 0)
162+
{
163+
return mIconSize;
164+
}
165+
if (mIcon.notNull())
153166
{
154167
return mIcon->getWidth();
155168
}
156-
return LLScrollListCell::getWidth();
169+
return 0;
157170
}
158171

159172

160173
void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)
161174
{
162175
if (mIcon)
163176
{
177+
S32 draw_width = mIcon->getWidth();
178+
S32 draw_height = mIcon->getHeight();
179+
if (mIconSize != 0)
180+
{
181+
draw_width = mIconSize;
182+
draw_height = mIconSize;
183+
} // else will draw full icon even if cell is smaller
164184
switch(mAlignment)
165185
{
166186
case LLFontGL::LEFT:
167-
mIcon->draw(0, 0, mColor);
187+
mIcon->draw(0, 0, draw_width, draw_height, mColor);
168188
break;
169189
case LLFontGL::RIGHT:
170-
mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor);
190+
mIcon->draw(getWidth() - draw_width, 0, draw_width, draw_height, mColor);
171191
break;
172192
case LLFontGL::HCENTER:
173-
mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor);
193+
mIcon->draw((getWidth() - draw_width) / 2, 0, draw_width, draw_height, mColor);
174194
break;
175195
default:
176196
break;

indra/llui/llscrolllistcell.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,13 @@ class LLScrollListIcon : public LLScrollListCell
197197
/*virtual*/ const LLSD getValue() const;
198198
/*virtual*/ void setColor(const LLColor4&);
199199
/*virtual*/ void setValue(const LLSD& value);
200+
void setIconSize(S32 size);
200201

201202
private:
202203
LLPointer<LLUIImage> mIcon;
203204
LLColor4 mColor;
204205
LLFontGL::HAlign mAlignment;
206+
S32 mIconSize;
205207
};
206208

207209

indra/llui/lltextbase.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,8 +1038,37 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s
10381038
{
10391039
LLStyleSP emoji_style;
10401040
LLEmojiDictionary* ed = LLEmojiDictionary::instanceExists() ? LLEmojiDictionary::getInstance() : NULL;
1041+
LLTextSegment* segmentp = nullptr;
1042+
segment_vec_t::iterator seg_iter;
1043+
if (segments && segments->size() > 0)
1044+
{
1045+
seg_iter = segments->begin();
1046+
segmentp = *seg_iter;
1047+
}
10411048
for (S32 text_kitty = 0, text_len = static_cast<S32>(wstr.size()); text_kitty < text_len; text_kitty++)
10421049
{
1050+
if (segmentp)
1051+
{
1052+
if (segmentp->getEnd() <= pos + text_kitty)
1053+
{
1054+
seg_iter++;
1055+
if (seg_iter != segments->end())
1056+
{
1057+
segmentp = *seg_iter;
1058+
}
1059+
else
1060+
{
1061+
segmentp = nullptr;
1062+
}
1063+
}
1064+
if (segmentp && !segmentp->getPermitsEmoji())
1065+
{
1066+
// Some segments, like LLInlineViewSegment do not permit splitting
1067+
// and should not be interrupted by emoji segments
1068+
continue;
1069+
}
1070+
}
1071+
10431072
llwchar code = wstr[text_kitty];
10441073
bool isEmoji = ed ? ed->isEmoji(code) : LLStringOps::isEmoji(code);
10451074
if (isEmoji)
@@ -3448,6 +3477,7 @@ S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offs
34483477
void LLTextSegment::updateLayout(const LLTextBase& editor) {}
34493478
F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; }
34503479
bool LLTextSegment::canEdit() const { return false; }
3480+
bool LLTextSegment::getPermitsEmoji() const { return true; }
34513481
void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
34523482
void LLTextSegment::linkToDocument(LLTextBase*) {}
34533483
const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; }

0 commit comments

Comments
 (0)