merge changes for vmrg-192

meow-7.2.2
Oz Linden 2011-11-23 12:49:36 -05:00
commit fb605a047a
9 changed files with 333 additions and 229 deletions

View File

@ -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()

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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>

View File

@ -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"

View File

@ -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"