Skip to content

Commit f29220b

Browse files
committed
Macros/Skin/LateNight: Only show clear button when clearing is possible
1 parent b875007 commit f29220b

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

res/skins/LateNight/macros/macro.xml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,25 @@
6060
<Elide>right</Elide>
6161
</TrackProperty>
6262

63-
<Template src="skin:/controls/button_1state.xml">
63+
<PushButton>
6464
<!--<SetVariable name="TooltipId">macro_clear</SetVariable>-->
65-
<SetVariable name="ObjectName">EjectButton12</SetVariable>
66-
<SetVariable name="ConfigKey"><Variable name="MacroPrefix"/>clear</SetVariable>
67-
<SetVariable name="Size">21f,18f</SetVariable>
68-
</Template>
69-
65+
<ObjectName>EjectButton12</ObjectName>
66+
<Size>21f,18f</Size>
67+
<NumberStates>1</NumberStates>
68+
<State>
69+
<Number>0</Number>
70+
<Unpressed scalemode="STRETCH">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_<Variable name="BtnSize"/>.svg</Unpressed>
71+
<Pressed scalemode="STRETCH">skin:/<Variable name="BtnScheme"/>/buttons/btn_<Variable name="BtnType"/>_<Variable name="BtnSize"/>_active.svg</Pressed>
72+
</State>
73+
<Connection>
74+
<ConfigKey><Variable name="MacroPrefix"/>clear</ConfigKey>
75+
</Connection>
76+
<Connection>
77+
<ConfigKey><Variable name="MacroPrefix"/>status</ConfigKey>
78+
<Transform><IsEqual>3</IsEqual></Transform>
79+
<BindProperty>visible</BindProperty>
80+
</Connection>
81+
</PushButton>
7082
</Children>
7183
<Connection>
7284
<ConfigKey><Variable name="Group"/>,track_loaded</ConfigKey>

0 commit comments

Comments
 (0)