From bdd4cb5963df9550eb8e9c0bca0eff0010b44b1e Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 12 Apr 2023 19:11:59 +0300 Subject: SL-19544 WIP show drag handler control --- indra/llui/lllayoutstack.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 77938edf27..8a011b4890 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -214,7 +214,8 @@ LLLayoutStack::Params::Params() drag_handle_first_indent("drag_handle_first_indent", 0), drag_handle_second_indent("drag_handle_second_indent", 0), drag_handle_thickness("drag_handle_thickness", 5), - drag_handle_shift("drag_handle_shift", 2) + drag_handle_shift("drag_handle_shift", 2), + drag_handle_color("drag_handle_color", LLUIColorTable::instance().getColor("ResizebarBody")) { addSynonym(border_size, "drag_handle_gap"); } @@ -234,7 +235,8 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p) mDragHandleFirstIndent(p.drag_handle_first_indent), mDragHandleSecondIndent(p.drag_handle_second_indent), mDragHandleThickness(p.drag_handle_thickness), - mDragHandleShift(p.drag_handle_shift) + mDragHandleShift(p.drag_handle_shift), + mDragHandleColor(p.drag_handle_color()) { } @@ -561,7 +563,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp) resize_bar_bg_panel_p.follows.flags = FOLLOWS_ALL; resize_bar_bg_panel_p.tab_stop = false; resize_bar_bg_panel_p.background_visible = true; - resize_bar_bg_panel_p.bg_alpha_color = LLUIColorTable::instance().getColor("ResizebarBody"); + resize_bar_bg_panel_p.bg_alpha_color = mDragHandleColor; resize_bar_bg_panel_p.has_border = true; resize_bar_bg_panel_p.border.border_thickness = 1; resize_bar_bg_panel_p.border.highlight_light_color = LLUIColorTable::instance().getColor("ResizebarBorderLight"); -- cgit v1.2.3 From 6e2e9d5904b3cc89deb755f3552d915104065aa0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 May 2023 18:26:02 +0300 Subject: SL-19649 Adjust other classes for new deleteAllChildren mechanics --- indra/llui/lllayoutstack.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 8a011b4890..08ce31ffc5 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -284,6 +284,17 @@ void LLLayoutStack::draw() } } +void LLLayoutStack::deleteAllChildren() +{ + mPanels.clear(); + LLView::deleteAllChildren(); + + // Not really needed since nothing is left to + // display, but for the sake of consistency + updateFractionalSizes(); + mNeedsLayout = true; +} + void LLLayoutStack::removeChild(LLView* view) { LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast(view)); @@ -291,12 +302,14 @@ void LLLayoutStack::removeChild(LLView* view) if (embedded_panelp) { mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp)); - delete embedded_panelp; + LLView::removeChild(view); updateFractionalSizes(); mNeedsLayout = true; } - - LLView::removeChild(view); + else + { + LLView::removeChild(view); + } } BOOL LLLayoutStack::postBuild() -- cgit v1.2.3 From 65fe37a93029e17f45e488619a5e589a2983757f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 24 Jun 2023 01:49:27 +0300 Subject: SL-19604 Fix gallery view having huge ident at the bottom --- indra/llui/lllayoutstack.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 08ce31ffc5..b1968e6a42 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -523,6 +523,15 @@ void LLLayoutStack::updateLayout() mNeedsLayout = continue_animating; } // end LLLayoutStack::updateLayout +void LLLayoutStack::setPanelSpacing(S32 val) +{ + if (mPanelSpacing != val) + { + mPanelSpacing = val; + mNeedsLayout = true; + } +} + LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const { if (!panelp) return NULL; -- cgit v1.2.3