From 30ea2834d46a2ddea3d70becbbdfa333a107f14f Mon Sep 17 00:00:00 2001 From: Drake Arconis <drake@alchemyviewer.org> Date: Mon, 29 Jun 2015 07:52:24 -0400 Subject: [PATCH] Add ability to disable floater height/width resize seperately --- indra/llui/llfloater.cpp | 8 +++++++- indra/llui/llfloater.h | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 69e52d5a3b..f6aa06a1c0 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -169,6 +169,8 @@ LLFloater::Params::Params() single_instance("single_instance", false), reuse_instance("reuse_instance", false), can_resize("can_resize", false), + can_resize_height("can_resize_height", true), + can_resize_width("can_resize_width", true), can_minimize("can_minimize", true), can_close("can_close", true), can_drag_on_left("can_drag_on_left", false), @@ -250,6 +252,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mShowHelp(p.show_help), mDragOnLeft(p.can_drag_on_left), mResizable(p.can_resize), + mResizableHeight(p.can_resize_height), + mResizableWidth(p.can_resize_width), mPositioning(p.positioning), mMinWidth(p.min_width), mMinHeight(p.min_height), @@ -2017,7 +2021,7 @@ void LLFloater::setCanTearOff(BOOL can_tear_off) void LLFloater::setCanResize(BOOL can_resize) { mResizable = can_resize; - enableResizeCtrls(can_resize); + enableResizeCtrls(can_resize, mResizableWidth, mResizableHeight); } void LLFloater::setCanDrag(BOOL can_drag) @@ -3126,6 +3130,8 @@ void LLFloater::initFromParams(const LLFloater::Params& p) setCanMinimize(p.can_minimize); setCanClose(p.can_close); setCanDock(p.can_dock); + mResizableWidth = p.can_resize_width; + mResizableHeight = p.can_resize_height; setCanResize(p.can_resize); setResizeLimits(p.min_width, p.min_height); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 13a79f477a..de2896d5d6 100755 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -157,6 +157,8 @@ public: Optional<bool> single_instance, reuse_instance, can_resize, + can_resize_height, + can_resize_width, can_minimize, can_close, can_drag_on_left, @@ -465,6 +467,8 @@ private: BOOL mCanClose; BOOL mDragOnLeft; BOOL mResizable; + BOOL mResizableHeight; + BOOL mResizableWidth; BOOL mShowHelp; LLFloaterEnums::EOpenPositioning mPositioning; -- GitLab