summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelclassified.cpp27
-rw-r--r--indra/newview/llpanelclassified.h9
-rw-r--r--indra/newview/llscriptfloater.cpp8
-rw-r--r--indra/newview/skins/default/xui/en/floater_script.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_classified.xml16
5 files changed, 51 insertions, 11 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 8ca044f72b..2a794a06b5 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -72,6 +72,7 @@
#include "llviewerwindow.h" // for window width, height
#include "llappviewer.h" // abortQuit()
#include "lltrans.h"
+#include "llscrollcontainer.h"
#include "llstatusbar.h"
const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$
@@ -1173,6 +1174,12 @@ BOOL LLPanelClassifiedInfo::postBuild()
childSetAction("show_on_map_btn", boost::bind(&LLPanelClassifiedInfo::onMapClick, this));
childSetAction("teleport_btn", boost::bind(&LLPanelClassifiedInfo::onTeleportClick, this));
+ mScrollingPanel = getChild<LLPanel>("scroll_content_panel");
+ mScrollContainer = getChild<LLScrollContainer>("profile_scroll");
+
+ mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight();
+ mScrollingPanelWidth = mScrollingPanel->getRect().getWidth();
+
return TRUE;
}
@@ -1186,6 +1193,26 @@ void LLPanelClassifiedInfo::setEditClassifiedCallback(const commit_callback_t& c
getChild<LLButton>("edit_btn")->setClickedCallback(cb);
}
+void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
+{
+ LLPanel::reshape(width, height, called_from_parent);
+
+ if (!mScrollContainer || !mScrollingPanel)
+ return;
+
+ static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
+ S32 scroll_height = mScrollContainer->getRect().getHeight();
+ if (mScrollingPanelMinHeight >= scroll_height)
+ {
+ mScrollingPanel->reshape(mScrollingPanelWidth, mScrollingPanelMinHeight);
+ }
+ else
+ {
+ mScrollingPanel->reshape(mScrollingPanelWidth + scrollbar_size, scroll_height);
+ }
+}
+
void LLPanelClassifiedInfo::onOpen(const LLSD& key)
{
LLUUID avatar_id = key["avatar_id"];
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index e46806f576..9e33e55b88 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -55,6 +55,7 @@ class LLTextEditor;
class LLTextureCtrl;
class LLUICtrl;
class LLMessageSystem;
+class LLScrollContainer;
// *TODO deprecated, should be removed.
// New class implemented in ticket EXT-2095
@@ -253,6 +254,8 @@ public:
void setEditClassifiedCallback(const commit_callback_t& cb);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
protected:
LLPanelClassifiedInfo();
@@ -277,6 +280,12 @@ private:
LLVector3d mPosGlobal;
LLUUID mParcelId;
bool mInfoLoaded;
+
+ LLScrollContainer* mScrollContainer;
+ LLPanel* mScrollingPanel;
+
+ S32 mScrollingPanelMinHeight;
+ S32 mScrollingPanelWidth;
};
class LLPanelClassifiedEdit : public LLPanelClassifiedInfo
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index d452ef2228..a88a242fbe 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -88,7 +88,7 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id)
else
{
floater->setVisible(TRUE);
- floater->setFocus(TRUE);
+ floater->setFocus(FALSE);
}
}
// create and show new floater
@@ -107,6 +107,9 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
floater->setNotificationId(notification_id);
floater->createForm(notification_id);
+ //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
+ floater->setAutoFocus(FALSE);
+
if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
{
floater->setSavePosition(true);
@@ -117,7 +120,8 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
floater->dockToChiclet(true);
}
- LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, TRUE);
+ //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445)
+ LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, FALSE);
return floater;
}
diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml
index 984c4fcf1d..663899d4b3 100644
--- a/indra/newview/skins/default/xui/en/floater_script.xml
+++ b/indra/newview/skins/default/xui/en/floater_script.xml
@@ -10,7 +10,7 @@
top="0"
can_dock="true"
can_minimize="true"
- visible="true"
+ visible="false"
width="520"
can_resize="false"
min_width="350"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
index cc09835049..d31e7d2ed8 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
@@ -61,11 +61,11 @@
background_visible="false"
height="600"
left="0"
- width="295">
+ width="285">
<texture_picker
follows="left|top|right"
height="197"
- width="286"
+ width="272"
layout="topleft"
top="10"
left="11"
@@ -92,7 +92,7 @@
top="215"
name="Name:"
text_color="white"
- width="290">
+ width="280">
Title:
</text>
<line_editor
@@ -106,7 +106,7 @@
name="classified_name"
prevalidate_callback="ascii"
text_color="black"
- width="290" />
+ width="273" />
<text
type="string"
length="1"
@@ -119,13 +119,13 @@
top_pad="20"
name="description_label"
text_color="white"
- width="290">
+ width="280">
Description:
</text>
<text_editor
follows="left|top|right"
height="100"
- width="290"
+ width="273"
hide_scrollbar="false"
layout="topleft"
left="10"
@@ -146,7 +146,7 @@
name="location_label"
text_color="white"
top_pad="20"
- width="290">
+ width="280">
Location:
</text>
<text
@@ -159,7 +159,7 @@
name="classified_location"
right="-10"
top_pad="2"
- width="290"
+ width="280"
word_wrap="true">
loading...
</text>