summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelemojicomplete.h
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-10-23 16:24:25 +0200
committerKitty Barnett <develop@catznip.com>2022-10-23 16:28:44 +0200
commit90e272993bb4c591fd2a98772d7fe1104dbff921 (patch)
treed168ee8319f649712a76c47efd714fadc2cb3f0d /indra/newview/llpanelemojicomplete.h
parent3acb4caa0fb9d381be6cfbe1693ace389d90a16c (diff)
Autosize the mini emoji helper to fit the number of shown emojis
Diffstat (limited to 'indra/newview/llpanelemojicomplete.h')
-rw-r--r--indra/newview/llpanelemojicomplete.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llpanelemojicomplete.h b/indra/newview/llpanelemojicomplete.h
index 85b0609ae9..b389ac9d53 100644
--- a/indra/newview/llpanelemojicomplete.h
+++ b/indra/newview/llpanelemojicomplete.h
@@ -39,6 +39,10 @@ class LLPanelEmojiComplete : public LLUICtrl
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
+ Optional<bool> autosize;
+ Optional<S32> max_emoji,
+ padding;
+
Optional<LLUIImage*> selected_image;
Params();
@@ -68,8 +72,12 @@ protected:
protected:
static constexpr auto npos = std::numeric_limits<size_t>::max();
+ bool mAutoSize = false;
const LLFontGL* mFont;
U16 mEmojiWidth = 0;
+ size_t mMaxVisible = 0;
+ S32 mPadding = 8;
+ LLRect mRenderRect;
LLUIImagePtr mSelectedImage;
LLWString mEmojis;
@@ -78,9 +86,6 @@ protected:
size_t mScrollPos = 0;
size_t mCurSelected = 0;
LLVector2 mLastHover;
-
- S32 mPadding = 8;
- LLRect mRenderRect;
};
// ============================================================================
@@ -94,6 +99,12 @@ public:
public:
void onOpen(const LLSD& key) override;
+ BOOL postBuild() override;
+ void reshape(S32 width, S32 height, BOOL called_from_parent) override;
+
+protected:
+ LLPanelEmojiComplete* mEmojiCtrl = nullptr;
+ S32 mEmojiCtrlHorz = 0;
};
// ============================================================================