From 8bbbce015b6dae1bdafe0bba329463322642ca85 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 4 Jul 2023 07:38:05 +0200 Subject: SL-19575 Rework emoji picker layout similar to Slack --- indra/llui/llscrollingpanellist.h | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'indra/llui/llscrollingpanellist.h') diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index e8df176ec3..9dc65dabb5 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -51,12 +51,18 @@ class LLScrollingPanelList : public LLUICtrl { public: struct Params : public LLInitParam::Block - {}; - LLScrollingPanelList(const Params& p) - : LLUICtrl(p) - {} + { + Optional is_horizontal; + Optional padding; + Optional spacing; + + Params(); + }; + + LLScrollingPanelList(const Params& p); - static const S32 GAP_BETWEEN_PANELS = 6; + static const S32 DEFAULT_SPACING = 6; + static const S32 DEFAULT_PADDING = 2; typedef std::deque panel_list_t; @@ -65,11 +71,18 @@ public: virtual void draw(); void clearPanels(); - S32 addPanel( LLScrollingPanel* panel ); - void removePanel( LLScrollingPanel* panel ); - void removePanel( U32 panel_index ); + S32 addPanel(LLScrollingPanel* panel, bool back = false); + void removePanel(LLScrollingPanel* panel); + void removePanel(U32 panel_index); void updatePanels(BOOL allow_modify); - const panel_list_t& getPanelList() { return mPanelList; } + void rearrange(); + + const panel_list_t& getPanelList() const { return mPanelList; } + bool getIsHorizontal() const { return mIsHorizontal; } + void setPadding(S32 padding) { mPadding = padding; rearrange(); } + void setSpacing(S32 spacing) { mSpacing = spacing; rearrange(); } + S32 getPadding() const { return mPadding; } + S32 getSpacing() const { return mSpacing; } private: void updatePanelVisiblilty(); @@ -77,7 +90,11 @@ private: /** * Notify parent about size change, makes sense when used inside accordion */ - void notifySizeChanged(S32 height); + void notifySizeChanged(); + + bool mIsHorizontal; + S32 mPadding; + S32 mSpacing; panel_list_t mPanelList; }; -- cgit v1.2.3 From 716b9af35d0dbc3ba8048a1bcca2c8c8f703bed0 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 7 Nov 2023 23:13:00 +0100 Subject: SL-20356 EmojiPicker - Implement arrow keys navigation --- indra/llui/llscrollingpanellist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llscrollingpanellist.h') diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index 9dc65dabb5..d625039427 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -45,7 +45,7 @@ public: /* - * A set of panels that are displayed in a vertical sequence inside a scroll container. + * A set of panels that are displayed in a sequence inside a scroll container. */ class LLScrollingPanelList : public LLUICtrl { -- cgit v1.2.3