summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-11-21 13:55:09 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-11-21 13:55:09 +0200
commit4cb3634932fe8175fb878894cce584bfb8bba8c6 (patch)
treeb439d5d814fce8e60f2819d14429f04c64057e83
parent0c36f481f13493801788ef233b96a2bfe5a44060 (diff)
EXP-1630 FIXED Only show snapshot size spinners and "Constrain proportions" checkbox when Custom resolution is selected.
-rw-r--r--indra/newview/llpanelsnapshot.cpp12
-rw-r--r--indra/newview/llpanelsnapshot.h1
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp7
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp1
-rw-r--r--indra/newview/llpanelsnapshotpostcard.cpp1
-rw-r--r--indra/newview/llpanelsnapshotprofile.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/panel_postcard_settings.xml163
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_local.xml205
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_profile.xml171
9 files changed, 333 insertions, 229 deletions
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 90e32f973f..2f29e758c6 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -124,15 +124,11 @@ LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer()
// virtual
void LLPanelSnapshot::updateCustomResControls()
{
+ // Only show width/height spinners and the aspect ratio checkbox
+ // when a custom resolution is chosen.
LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName());
- S32 selected_idx = combo->getFirstSelectedIndex();
- const bool enable = selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected
-
- getChild<LLUICtrl>(getWidthSpinnerName())->setEnabled(enable);
- getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(enable);
- getChild<LLUICtrl>(getHeightSpinnerName())->setEnabled(enable);
- getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(enable);
- enableAspectRatioCheckbox(enable);
+ const bool show = combo->getFirstSelectedIndex() == (combo->getItemCount() - 1);
+ getChild<LLUICtrl>(getImageSizePanelName())->setVisible(show);
}
void LLPanelSnapshot::updateImageQualityLevel()
diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h
index 7adb2fabc7..f3274cf594 100644
--- a/indra/newview/llpanelsnapshot.h
+++ b/indra/newview/llpanelsnapshot.h
@@ -44,6 +44,7 @@ public:
virtual std::string getHeightSpinnerName() const = 0;
virtual std::string getAspectRatioCBName() const = 0;
virtual std::string getImageSizeComboName() const = 0;
+ virtual std::string getImageSizePanelName() const = 0;
virtual S32 getTypedPreviewWidth() const;
virtual S32 getTypedPreviewHeight() const;
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index aca0ee6700..381c11348d 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -54,6 +54,7 @@ private:
/*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; }
/*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; }
/*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; }
/*virtual*/ void updateControls(const LLSD& info);
void onSend();
@@ -70,6 +71,8 @@ LLPanelSnapshotInventory::LLPanelSnapshotInventory()
// virtual
BOOL LLPanelSnapshotInventory::postBuild()
{
+ getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
+ getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
getChild<LLUICtrl>(getAspectRatioCBName())->setVisible(FALSE); // we don't keep aspect ratio for inventory textures
return LLPanelSnapshot::postBuild();
}
@@ -90,10 +93,6 @@ void LLPanelSnapshotInventory::updateCustomResControls()
getChild<LLUICtrl>(getWidthSpinnerName())->setVisible(show);
getChild<LLUICtrl>(getHeightSpinnerName())->setVisible(show);
-
- // Editing gets often enable elsewhere in common snapshot panel code. Override that.
- getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE);
- getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE);
}
// virtual
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 4a2614fa7d..d153ff598d 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -54,6 +54,7 @@ private:
/*virtual*/ std::string getHeightSpinnerName() const { return "local_snapshot_height"; }
/*virtual*/ std::string getAspectRatioCBName() const { return "local_keep_aspect_check"; }
/*virtual*/ std::string getImageSizeComboName() const { return "local_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "local_image_size_lp"; }
/*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
/*virtual*/ void updateControls(const LLSD& info);
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index 6867c7af4e..f2bb8f530b 100644
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -62,6 +62,7 @@ private:
/*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; }
/*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; }
/*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; }
/*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; }
/*virtual*/ void updateControls(const LLSD& info);
diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp
index 89245fc804..a706318369 100644
--- a/indra/newview/llpanelsnapshotprofile.cpp
+++ b/indra/newview/llpanelsnapshotprofile.cpp
@@ -57,6 +57,7 @@ private:
/*virtual*/ std::string getHeightSpinnerName() const { return "profile_snapshot_height"; }
/*virtual*/ std::string getAspectRatioCBName() const { return "profile_keep_aspect_check"; }
/*virtual*/ std::string getImageSizeComboName() const { return "profile_size_combo"; }
+ /*virtual*/ std::string getImageSizePanelName() const { return "profile_image_size_lp"; }
/*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG; }
/*virtual*/ void updateControls(const LLSD& info);
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
index 84e3593798..aebbc51be1 100644
--- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
@@ -34,69 +34,104 @@
name="Custom"
value="[i-1,i-1]" />
</combo_box>
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Width"
- label_width="40"
- layout="topleft"
- left="10"
- max_val="6016"
- min_val="32"
- name="postcard_snapshot_width"
+ <layout_stack
+ animate="false"
+ follows="all"
+ height="275"
+ layout="bottomleft"
+ name="postcard_image_params_ls"
+ left_delta="0"
+ orientation="vertical"
top_pad="10"
- width="95" />
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Height"
- label_width="40"
- layout="topleft"
- left_pad="5"
- max_val="6016"
- min_val="32"
- name="postcard_snapshot_height"
- top_delta="0"
- width="95" />
- <check_box
- bottom_delta="20"
- follows="left|top"
- label="Constrain proportions"
- layout="topleft"
- left="10"
- name="postcard_keep_aspect_check" />
- <slider
- decimal_digits="0"
- follows="left|top"
- height="15"
- increment="1"
- initial_value="75"
- label="Image quality"
- label_width="80"
- layout="topleft"
- left="10"
- max_val="100"
- name="image_quality_slider"
- top_pad="7"
- width="200" />
- <text
- type="string"
- follows="left|top"
- font="SansSerifSmall"
- length="1"
- height="14"
- layout="topleft"
- left_pad="-5"
- halign="left"
- name="image_quality_level"
- top_delta="0"
- width="60">
- ([QLVL])
- </text>
+ right="-10">
+ <layout_panel
+ follows="top|left|right"
+ height="60"
+ layout="topleft"
+ left="0"
+ name="postcard_image_size_lp"
+ user_resize="false"
+ auto_resize="false"
+ top="0"
+ right="-1"
+ visible="true">
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Width"
+ label_width="40"
+ layout="topleft"
+ left="10"
+ max_val="6016"
+ min_val="32"
+ name="postcard_snapshot_width"
+ top_pad="10"
+ width="95" />
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Height"
+ label_width="40"
+ layout="topleft"
+ left_pad="5"
+ max_val="6016"
+ min_val="32"
+ name="postcard_snapshot_height"
+ top_delta="0"
+ width="95" />
+ <check_box
+ bottom_delta="20"
+ follows="left|top"
+ label="Constrain proportions"
+ layout="topleft"
+ left="10"
+ name="postcard_keep_aspect_check" />
+ </layout_panel>
+ <layout_panel
+ follows="top|left|right"
+ height="23"
+ layout="topleft"
+ left="0"
+ name="postcard_image_format_quality_lp"
+ user_resize="false"
+ auto_resize="true"
+ top="0"
+ right="-1"
+ visible="true">
+ <slider
+ decimal_digits="0"
+ follows="left|top"
+ height="15"
+ increment="1"
+ initial_value="75"
+ label="Image quality"
+ label_width="80"
+ layout="topleft"
+ left="10"
+ max_val="100"
+ name="image_quality_slider"
+ top_pad="7"
+ width="200" />
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifSmall"
+ length="1"
+ height="14"
+ layout="topleft"
+ left_pad="-5"
+ halign="left"
+ name="image_quality_level"
+ top_delta="0"
+ width="60">
+ ([QLVL])
+ </text>
+ </layout_panel>
+ </layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
index 30403a21dd..ae0215a578 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml
@@ -80,93 +80,128 @@
name="Custom"
value="[i-1,i-1]" />
</combo_box>
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Width"
- label_width="40"
- layout="topleft"
- left="10"
- max_val="6016"
- min_val="32"
- name="local_snapshot_width"
- top_pad="10"
- width="95" />
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Height"
- label_width="40"
- layout="topleft"
- left_pad="5"
- max_val="6016"
- min_val="32"
- name="local_snapshot_height"
- top_delta="0"
- width="95" />
- <check_box
- bottom_delta="20"
- follows="left|top"
- label="Constrain proportions"
- layout="topleft"
- left="10"
- name="local_keep_aspect_check" />
- <combo_box
- follows="left|top"
- height="23"
- label="Format"
- layout="topleft"
+ <layout_stack
+ animate="false"
+ follows="all"
+ height="275"
+ layout="bottomleft"
+ name="local_image_params_ls"
left_delta="0"
- name="local_format_combo"
+ orientation="vertical"
top_pad="10"
- width="120">
- <combo_box.item
- label="PNG (Lossless)"
- name="PNG"
- value="PNG" />
- <combo_box.item
- label="JPEG"
- name="JPEG"
- value="JPEG" />
- <combo_box.item
- label="BMP (Lossless)"
- name="BMP"
- value="BMP" />
- </combo_box>
- <slider
- decimal_digits="0"
- follows="left|top"
- height="15"
- increment="1"
- initial_value="75"
- label="Image quality"
- label_width="80"
- layout="topleft"
- left="10"
- max_val="100"
- name="image_quality_slider"
- top_pad="7"
- width="200" />
- <text
- type="string"
- follows="left|top"
- font="SansSerifSmall"
- length="1"
- height="14"
- layout="topleft"
- left_pad="-5"
- halign="left"
- name="image_quality_level"
- top_delta="0"
- width="60">
- ([QLVL])
- </text>
+ right="-10">
+ <layout_panel
+ follows="top|left|right"
+ height="60"
+ layout="topleft"
+ left="0"
+ name="local_image_size_lp"
+ user_resize="false"
+ auto_resize="false"
+ top="0"
+ right="-1"
+ visible="true">
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Width"
+ label_width="40"
+ layout="topleft"
+ left="10"
+ max_val="6016"
+ min_val="32"
+ name="local_snapshot_width"
+ top_pad="10"
+ width="95" />
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Height"
+ label_width="40"
+ layout="topleft"
+ left_pad="5"
+ max_val="6016"
+ min_val="32"
+ name="local_snapshot_height"
+ top_delta="0"
+ width="95" />
+ <check_box
+ bottom_delta="20"
+ follows="left|top"
+ label="Constrain proportions"
+ layout="topleft"
+ left="10"
+ name="local_keep_aspect_check" />
+ </layout_panel>
+ <layout_panel
+ follows="top|left|right"
+ height="23"
+ layout="topleft"
+ left="0"
+ name="local_image_format_quality_lp"
+ user_resize="false"
+ auto_resize="true"
+ top="0"
+ right="-1"
+ visible="true">
+ <combo_box
+ follows="left|top"
+ height="23"
+ label="Format"
+ layout="topleft"
+ left_delta="0"
+ name="local_format_combo"
+ top_pad="0"
+ width="120">
+ <combo_box.item
+ label="PNG (Lossless)"
+ name="PNG"
+ value="PNG" />
+ <combo_box.item
+ label="JPEG"
+ name="JPEG"
+ value="JPEG" />
+ <combo_box.item
+ label="BMP (Lossless)"
+ name="BMP"
+ value="BMP" />
+ </combo_box>
+ <slider
+ decimal_digits="0"
+ follows="left|top"
+ height="15"
+ increment="1"
+ initial_value="75"
+ label="Image quality"
+ label_width="80"
+ layout="topleft"
+ left="10"
+ max_val="100"
+ name="image_quality_slider"
+ top_pad="7"
+ width="200" />
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifSmall"
+ length="1"
+ height="14"
+ layout="topleft"
+ left_pad="-5"
+ halign="left"
+ name="image_quality_level"
+ top_delta="0"
+ width="60">
+ ([QLVL])
+ </text>
+ </layout_panel>
+ </layout_stack>
<button
follows="right|bottom"
height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
index ee79a4b3b8..91ac9ad658 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml
@@ -68,76 +68,111 @@
name="Custom"
value="[i-1,i-1]" />
</combo_box>
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Width"
- label_width="40"
- layout="topleft"
- left="10"
- max_val="6016"
- min_val="32"
- name="profile_snapshot_width"
- top_pad="10"
- width="95" />
- <spinner
- allow_text_entry="false"
- decimal_digits="0"
- follows="left|top"
- height="20"
- increment="32"
- label="Height"
- label_width="40"
- layout="topleft"
- left_pad="5"
- max_val="6016"
- min_val="32"
- name="profile_snapshot_height"
- top_delta="0"
- width="95" />
- <check_box
- bottom_delta="20"
- label="Constrain proportions"
- layout="topleft"
- left="10"
- name="profile_keep_aspect_check" />
- <text
- length="1"
- follows="top|left|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="12"
- name="caption_label"
- right="-10"
- top_pad="10"
- type="string">
- Caption:
- </text>
- <text_editor
+ <layout_stack
+ animate="false"
follows="all"
- height="160"
- layout="topleft"
+ height="270"
+ layout="bottomleft"
+ name="profile_image_params_ls"
left_delta="0"
- length="1"
- max_length="700"
- name="caption"
- right="-10"
- top_pad="5"
- type="string"
- word_wrap="true">
- </text_editor>
- <check_box
- follows="left|bottom"
- initial_value="true"
- label="Include location"
- layout="topleft"
- left_delta="0"
- name="add_location_cb"
- top_pad="15" />
+ orientation="vertical"
+ top_pad="10"
+ right="-10">
+ <layout_panel
+ follows="top|left|right"
+ height="55"
+ layout="topleft"
+ left="0"
+ name="profile_image_size_lp"
+ user_resize="false"
+ auto_resize="false"
+ top="0"
+ right="-1"
+ visible="true">
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Width"
+ label_width="40"
+ layout="topleft"
+ left="10"
+ max_val="6016"
+ min_val="32"
+ name="profile_snapshot_width"
+ top_pad="10"
+ width="95" />
+ <spinner
+ allow_text_entry="false"
+ decimal_digits="0"
+ follows="left|top"
+ height="20"
+ increment="32"
+ label="Height"
+ label_width="40"
+ layout="topleft"
+ left_pad="5"
+ max_val="6016"
+ min_val="32"
+ name="profile_snapshot_height"
+ top_delta="0"
+ width="95" />
+ <check_box
+ bottom_delta="20"
+ label="Constrain proportions"
+ layout="topleft"
+ left="10"
+ name="profile_keep_aspect_check" />
+ </layout_panel>
+ <layout_panel
+ follows="top|left|right"
+ height="200"
+ layout="topleft"
+ left="0"
+ name="profile_image_metadata_lp"
+ user_resize="false"
+ auto_resize="true"
+ top="0"
+ right="-1"
+ visible="true">
+ <text
+ length="1"
+ follows="top|left|right"
+ font="SansSerif"
+ height="16"
+ layout="topleft"
+ left="0"
+ name="caption_label"
+ right="-10"
+ top_pad="0"
+ type="string">
+ Caption:
+ </text>
+ <text_editor
+ follows="all"
+ height="155"
+ layout="topleft"
+ left_delta="0"
+ length="1"
+ max_length="700"
+ name="caption"
+ right="-10"
+ top_pad="5"
+ type="string"
+ word_wrap="true">
+ </text_editor>
+ <check_box
+ follows="left|bottom"
+ initial_value="true"
+ label="Include location"
+ layout="topleft"
+ left_delta="0"
+ name="add_location_cb"
+ top_pad="15" />
+ </layout_panel>
+ </layout_stack>
<button
follows="right|bottom"
height="23"