STORM-689 FIXED "Back" but is opaque in all of the undocked side panels
- Added parameter to the button that defines which transparency value should be used: value of drawing context or transparency value of a its parent (in our case this parent is floater)meow-7.2.2
parent
2f0919b175
commit
85c75c9ce3
|
|
@ -98,7 +98,8 @@ LLButton::Params::Params()
|
|||
is_toggle("is_toggle", false),
|
||||
scale_image("scale_image", true),
|
||||
hover_glow_amount("hover_glow_amount"),
|
||||
commit_on_return("commit_on_return", true)
|
||||
commit_on_return("commit_on_return", true),
|
||||
use_draw_context_alpha("use_draw_context_alpha", true)
|
||||
{
|
||||
addSynonym(is_toggle, "toggle");
|
||||
held_down_delay.seconds = 0.5f;
|
||||
|
|
@ -158,7 +159,8 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
mLastDrawCharsCount(0),
|
||||
mMouseDownSignal(NULL),
|
||||
mMouseUpSignal(NULL),
|
||||
mHeldDownSignal(NULL)
|
||||
mHeldDownSignal(NULL),
|
||||
mUseDrawContextAlpha(p.use_draw_context_alpha)
|
||||
|
||||
{
|
||||
static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
|
||||
|
|
@ -539,7 +541,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
|
|||
// virtual
|
||||
void LLButton::draw()
|
||||
{
|
||||
F32 alpha = getDrawContext().mAlpha;
|
||||
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
|
||||
bool flash = FALSE;
|
||||
static LLUICachedControl<F32> button_flash_rate("ButtonFlashRate", 0);
|
||||
static LLUICachedControl<S32> button_flash_count("ButtonFlashCount", 0);
|
||||
|
|
|
|||
|
|
@ -124,6 +124,8 @@ public:
|
|||
Optional<F32> hover_glow_amount;
|
||||
Optional<TimeIntervalParam> held_down_delay;
|
||||
|
||||
Optional<bool> use_draw_context_alpha;
|
||||
|
||||
Params();
|
||||
};
|
||||
|
||||
|
|
@ -338,6 +340,8 @@ private:
|
|||
S32 mImageOverlayTopPad;
|
||||
S32 mImageOverlayBottomPad;
|
||||
|
||||
bool mUseDrawContextAlpha;
|
||||
|
||||
/*
|
||||
* Space between image_overlay and label
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@
|
|||
left="10"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
left="10"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@
|
|||
left="10"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@
|
|||
pad_left="24"
|
||||
tool_tip="Return to Edit Outfit"
|
||||
top="3"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ background_visible="true"
|
|||
left="7"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text_editor
|
||||
allow_scroll="false"
|
||||
bg_visible="false"
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@
|
|||
tool_tip="Back"
|
||||
tab_stop="false"
|
||||
top="4"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@
|
|||
left="5"
|
||||
tab_stop="false"
|
||||
top="1"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
left="10"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@
|
|||
tool_tip="Back"
|
||||
tab_stop="false"
|
||||
top="4"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@
|
|||
left="10"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
top="10"
|
||||
follows="top|left"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@
|
|||
name="back_btn"
|
||||
tab_stop="false"
|
||||
top="2"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHugeBold"
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@
|
|||
name="back_btn"
|
||||
tab_stop="false"
|
||||
top="0"
|
||||
width="30" />
|
||||
width="30"
|
||||
use_draw_context_alpha="false" />
|
||||
<text
|
||||
follows="top|left|right"
|
||||
font="SansSerifHuge"
|
||||
|
|
|
|||
|
|
@ -24,5 +24,6 @@
|
|||
halign="center"
|
||||
pad_bottom="3"
|
||||
height="23"
|
||||
scale_image="true">
|
||||
scale_image="true"
|
||||
use_draw_context_alpha="true">
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue