Texture Picker: Making the preview "widget" a little more flexible.
Review Request #474 - Created Sept. 16, 2011 and submitted
Vaalith Jinn | Reviewers | ||
viewer | |||
richard.linden | |||
None | viewer-development |
Update: would appreciate a LL yes or no to this, as it's one of the issues that's holding back STORM-64. Texture picker's preview box was never a real widget. It had no XUI presence so the XUI designers had no control over it. Also, it's height depended on the it's parent floater's min size which meant that increasing the min size distorted the preview box, which must be at a 1:1 ratio. I have modified the code in a way that a) makes the preview box no longer reliant on any of the floater's own parameters. b) gives the XUI designers three parameters that affect the preview box specifically: left, top, and size. (size is both the size from left to right, and from top to bottom, keeping it locked to 1:1) The changes are only noticeable to coders and xui designers, not the users. note: It is still not a real widget and it still lacks a follow, layout, delta and any other widget specific abilities.
The box seems to behave exactly as it did before. Changing the indicated left, top, and size values in the appropriate xml file does affect the relevant properties.
Posted (Sept. 18, 2011, 5:57 a.m.)
-
indra/newview/lltexturectrl.cpp (Diff revision 1) -
What kind of safety does this provide?
-
indra/newview/skins/default/xui/en/floater_texture_ctrl.xml (Diff revision 1) -
For more clarity, replace the work 'it' by the name of whatever you're describing here. (Probably 'The texture picker'.)
Review request changed
Updated (Oct. 3, 2011, 9:19 a.m.)
-
Texture picker's preview box was never a real widget. It had no XUI presence so the XUI designers had no control over it. Also, it's height depended on the it's parent floater's min size which meant that increasing the min size distorted the preview box, which must be at a 1:1 ratio. I have modified the code in a way that a) makes the preview box no longer reliant on any of the floater's own parameters. b) gives the XUI designers three parameters that affect the preview box specifically: left, top, and size. (size is both the size from left to right, and from top to bottom, keeping it locked to 1:1) The changes are only noticeable to coders and xui designers, not the users. note: It is still not a real widget and it still lacks a follow, layout, delta and any other widget specific abilities.
Update: would appreciate a LL yes or no to this, as it's one of the issues that's holding back STORM-64. Texture picker's preview box was never a real widget. It had no XUI presence so the XUI designers had no control over it. Also, it's height depended on the it's parent floater's min size which meant that increasing the min size distorted the preview box, which must be at a 1:1 ratio. I have modified the code in a way that a) makes the preview box no longer reliant on any of the floater's own parameters. b) gives the XUI designers three parameters that affect the preview box specifically: left, top, and size. (size is both the size from left to right, and from top to bottom, keeping it locked to 1:1) The changes are only noticeable to coders and xui designers, not the users. note: It is still not a real widget and it still lacks a follow, layout, delta and any other widget specific abilities.
Review request changed
Updated (Oct. 4, 2011, 7:26 a.m.)
-
- added richard.linden
Posted (Oct. 4, 2011, 12:08 p.m.)
Please do not use localization strings to parameterize a widget. Better to use a place holder <view> and then call getChildView on it and use the rect of that view for displaying the texture preview.
Review request changed
Updated (Oct. 4, 2011, 8:11 p.m.)
-
- added Diff r2
I've also considered hijacking an actual widget's rect but was not aware i could just use "view", that simplifies things! Just tested this new diff, seems to work and even seems to follow.
Other reviews