Skip to content

Commit efeef87

Browse files
author
Pavel Kovalenko
committed
Hide Alpha-channel slider when AlphaEnabled is false.
1 parent e02a849 commit efeef87

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ public bool AlphaEnabled
5858
nslAlpha.Value = nslAlpha.Maximum;
5959
ignoreOnChanged = false;
6060
UpdateColor();
61-
lAlpha.Enabled = alphaEnabled;
62-
nslAlpha.Enabled = alphaEnabled;
61+
lAlpha.Visible = alphaEnabled;
62+
nslAlpha.Visible = alphaEnabled;
63+
int delta = (alphaEnabled ? 1 : -1)*27;
64+
Point loc = chkHexadecimal.Location;
65+
loc.Y += delta;
66+
chkHexadecimal.Location = loc;
6367
}
6468
}
6569

0 commit comments

Comments
 (0)