Skip to content
Snippets Groups Projects
Commit b02b43c0 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Revert "Expose face transparency as 0-1 decimal instead of percent"

This reverts commit 160d59d5.
parent 160d59d5
No related branches found
No related tags found
No related merge requests found
...@@ -261,7 +261,7 @@ BOOL LLPanelFace::postBuild() ...@@ -261,7 +261,7 @@ BOOL LLPanelFace::postBuild()
if(mCtrlColorTransp) if(mCtrlColorTransp)
{ {
mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2)); mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
mCtrlColorTransp->setPrecision(3); mCtrlColorTransp->setPrecision(0);
mCtrlColorTransp->setFollowsTop(); mCtrlColorTransp->setFollowsTop();
mCtrlColorTransp->setFollowsLeft(); mCtrlColorTransp->setFollowsLeft();
} }
...@@ -418,7 +418,7 @@ void LLPanelFace::sendAlpha() ...@@ -418,7 +418,7 @@ void LLPanelFace::sendAlpha()
{ {
LLSpinCtrl* mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans"); LLSpinCtrl* mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
if(!mCtrlColorTransp)return; if(!mCtrlColorTransp)return;
F32 alpha = mCtrlColorTransp->get(); F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f;
LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha ); LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha );
} }
...@@ -879,7 +879,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) ...@@ -879,7 +879,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
// Color transparency // Color transparency
getChildView("color trans")->setEnabled(editable); getChildView("color trans")->setEnabled(editable);
F32 transparency = color.mV[VALPHA]; F32 transparency = (1.f - color.mV[VALPHA]) * 100.f;
getChild<LLUICtrl>("ColorTrans")->setValue(editable ? transparency : 0); getChild<LLUICtrl>("ColorTrans")->setValue(editable ? transparency : 0);
getChildView("ColorTrans")->setEnabled(editable); getChildView("ColorTrans")->setEnabled(editable);
......
...@@ -48,17 +48,17 @@ ...@@ -48,17 +48,17 @@
text_readonly_color="LabelDisabledColor" text_readonly_color="LabelDisabledColor"
top="6" top="6"
width="110"> width="110">
Transparency Transparency %
</text> </text>
<spinner <spinner
decimal_digits="3" decimal_digits="0"
follows="left|top" follows="left|top"
height="19" height="19"
increment="0.01" increment="2"
initial_value="0" initial_value="0"
layout="topleft" layout="topleft"
left_delta="0" left_delta="0"
max_val="1" max_val="100"
name="ColorTrans" name="ColorTrans"
top_pad="4" top_pad="4"
width="80" /> width="80" />
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
Glow Glow
</text> </text>
<spinner <spinner
decimal_digits="3" decimal_digits="2"
follows="left|top" follows="left|top"
height="19" height="19"
initial_value="0" initial_value="0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment