[opensource-dev] Review Request: Storm-844 "More" should be "Less" when Media Control is open
Jonathan Yap
jhwelch at gmail.com
Thu Jan 13 08:56:10 PST 2011
> On Jan. 13, 2011, 8:05 a.m., Twisted Laws wrote:
> > To me, this is the wrong solution. label_selected used to work to allow a button to display different text when it was selected, so you could have a button that said More until it was pressed or selected and displayed more informaiton. At that time the text could change to Less indicating that pressing the button a second time would maybe reduce the information displayed. If the button in question here doesn't change when pressing, that means that something down in the control code is wrong.
I did a test with the floater preview UI (one of the few places that label is not the same as label_selected. There is a >> button there that does change to << when pressed.
However, in this case, there is some code that does the button swapping. In llpanelnearbymedia.cpp / void LLPanelNearByMedia::onMoreLess()
getChild<LLUICtrl>("more_btn")->setVisible(!is_more);
getChild<LLUICtrl>("less_btn")->setVisible(is_more);
If people think refactoring rather then just rewording is the way to go please say so. I always hesitate to "fix what ain't broke".
The vast majority of button definitions in the xml files have identical entries for label and label_selected (is having label_selected present a requirement in a button definition or are all these entires superfluous?).
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/78/#review148
-----------------------------------------------------------
On Jan. 12, 2011, 6:02 a.m., Jonathan Yap wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/78/
> -----------------------------------------------------------
>
> (Updated Jan. 12, 2011, 6:02 a.m.)
>
>
> Review request for Viewer.
>
>
> Summary
> -------
>
> "More" should be "Less" when Media Control is open
>
> This is a trivial text change in an xml file. The reason I am posting this here is due to some confusion using label_selected. In this case having it set to a different value than when label is set to seems to have no effect, so I have made them identical.
>
> I scanned all the xml files and there are only about 5 places where label_selected is different from the preceding label= value.
>
> Is there any reason to revert back to having them set to different values?
> i.e. label="More" and label_selected="Less"
>
>
> This addresses bug storm-844.
> http://jira.secondlife.com/browse/storm-844
>
>
> Diffs
> -----
>
> doc/contributions.txt 179e0754a27d
> indra/newview/skins/default/xui/en/panel_nearby_media.xml 179e0754a27d
>
> Diff: http://codereview.secondlife.com/r/78/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jonathan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20110113/d0394d96/attachment.htm
More information about the opensource-dev
mailing list