From 7c100d54dda03db62a8d2c8be6a5e02ea9280f9b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 29 Jun 2023 02:33:58 +0300 Subject: SL-19928 Make thumbnail selection failures more user friendly --- indra/newview/lltexturectrl.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltexturectrl.h') diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index fbb38c4464..8ef6d9bee7 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -295,7 +295,7 @@ public: // New functions void setImageID(const LLUUID& image_asset_id, bool set_selection = true); - void updateImageStats(); + bool updateImageStats(); // true if within limits const LLUUID& getAssetID() { return mImageAssetID; } const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library = FALSE); void setCanApplyImmediately(BOOL b); @@ -313,7 +313,8 @@ public: void onFilterEdit(const std::string& search_string); - void setCanApply(bool can_preview, bool can_apply); + void setCanApply(bool can_preview, bool can_apply, bool inworld_image = true); + void setDimentionsLimits(S32 max_dim, S32 min_dim); void setTextureSelectedCallback(const texture_selected_callback& cb) { mTextureSelectedCallback = cb; } void setOnFloaterCloseCallback(const floater_close_callback& cb) { mOnFloaterCloseCallback = cb; } void setOnFloaterCommitCallback(const floater_commit_callback& cb) { mOnFloaterCommitCallback = cb; } @@ -364,6 +365,7 @@ protected: LLTextBox* mTentativeLabel; LLTextBox* mResolutionLabel; + LLTextBox* mResolutionWarning; std::string mPendingName; BOOL mActive; @@ -381,11 +383,19 @@ protected: LLComboBox* mModeSelector; LLScrollListCtrl* mLocalScrollCtrl; + LLButton* mDefaultBtn; + LLButton* mNoneBtn; + LLButton* mBlankBtn; + LLButton* mPipetteBtn; + LLButton* mSelectBtn; + LLButton* mCancelBtn; private: bool mCanApply; bool mCanPreview; bool mPreviewSettingChanged; + S32 mMaxDim; + S32 mMinDim; texture_selected_callback mTextureSelectedCallback; -- cgit v1.2.3 From 7b9206dfd15ee90fde421525254b0a29d94f1ef2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 22 Jul 2023 00:22:35 +0300 Subject: SL-20045 Texture picker should apply the exact texture inventory item --- indra/newview/lltexturectrl.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltexturectrl.h') diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 8ef6d9bee7..3cf8861075 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -63,6 +63,14 @@ bool get_is_predefined_texture(LLUUID asset_id); LLUUID get_copy_free_item_by_asset_id(LLUUID image_id, bool no_trans_perm = false); bool get_can_copy_texture(LLUUID image_id); +enum LLPickerSource +{ + PICKER_INVENTORY, + PICKER_LOCAL, + PICKER_BAKE, + PICKER_UNKNOWN, // on cancel, default ids +}; + ////////////////////////////////////////////////////////////////////////////////////////// // LLTextureCtrl @@ -188,7 +196,7 @@ public: void closeDependentFloater(); void onFloaterClose(); - void onFloaterCommit(ETexturePickOp op, LLUUID id); + void onFloaterCommit(ETexturePickOp op, LLPickerSource source, const LLUUID& local_id, const LLUUID& inv_id); // This call is returned when a drag is detected. Your callback // should return TRUE if the drag is acceptable. @@ -256,7 +264,7 @@ private: ////////////////////////////////////////////////////////////////////////////////////////// // LLFloaterTexturePicker -typedef boost::function floater_commit_callback; +typedef boost::function floater_commit_callback; typedef boost::function floater_close_callback; typedef boost::function set_image_asset_id_callback; typedef boost::function texture)> set_on_update_image_stats_callback; @@ -309,6 +317,7 @@ public: void updateFilterPermMask(); void commitIfImmediateSet(); + void commitCallback(); void commitCancel(); void onFilterEdit(const std::string& search_string); -- cgit v1.2.3 From b267515922f6bca9034810ab7f18626f39cec356 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Jul 2023 22:06:23 +0300 Subject: SL-20068 Selecting from texture picker for thumbnail does not assign thumbnail --- indra/newview/lltexturectrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltexturectrl.h') diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 3cf8861075..60543191b6 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -317,7 +317,7 @@ public: void updateFilterPermMask(); void commitIfImmediateSet(); - void commitCallback(); + void commitCallback(LLTextureCtrl::ETexturePickOp op); void commitCancel(); void onFilterEdit(const std::string& search_string); -- cgit v1.2.3 From cfb69846f1e8309ed86d4a18eb26a889f6dbaccc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 9 Sep 2023 00:00:22 +0300 Subject: SL-20261 Allow and resize existing textures as necessary for thumbnails --- indra/newview/lltexturectrl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltexturectrl.h') diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 60543191b6..7239b97552 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -323,7 +323,7 @@ public: void onFilterEdit(const std::string& search_string); void setCanApply(bool can_preview, bool can_apply, bool inworld_image = true); - void setDimentionsLimits(S32 max_dim, S32 min_dim); + void setMinDimentionsLimits(S32 min_dim); void setTextureSelectedCallback(const texture_selected_callback& cb) { mTextureSelectedCallback = cb; } void setOnFloaterCloseCallback(const floater_close_callback& cb) { mOnFloaterCloseCallback = cb; } void setOnFloaterCommitCallback(const floater_commit_callback& cb) { mOnFloaterCommitCallback = cb; } -- cgit v1.2.3 From 226081b27511ad45fbeaa16b9226265dc446976b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 25 Sep 2023 20:24:57 +0300 Subject: SL-20334 Unable to use non-square textures from inventory --- indra/newview/lltexturectrl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lltexturectrl.h') diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 7239b97552..e2bfe286d3 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -403,6 +403,7 @@ private: bool mCanApply; bool mCanPreview; bool mPreviewSettingChanged; + bool mLimitsSet; S32 mMaxDim; S32 mMinDim; -- cgit v1.2.3