All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

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. 
Review request changed
Updated (Oct. 4, 2011, 8:11 p.m.)
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.
Ship it!
Posted (Oct. 5, 2011, 12:03 a.m.)
thanks, looks good!