BChannelControl::SetAllValue() didn't take limits into account. Horizontal sliders now at least are drawn correctly, even if they don't work well. Added a temporary visual hint of where's the bitmap frame. Enhanced a bit the drawing of the groove.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2005-03-11 13:20:01 +00:00
parent 6f0f950768
commit 5040785e7d
2 changed files with 43 additions and 12 deletions
+6 -2
View File
@@ -403,8 +403,12 @@ status_t
BChannelControl::SetAllValue(int32 values)
{
int32 *newValues = new int32[fChannelCount];
for (int32 i = 0; i < fChannelCount; i++)
newValues[i] = values;
for (int32 i = 0; i < fChannelCount; i++) {
int32 limitedValue = max_c(values, MinLimitList()[i]);
limitedValue = min_c(limitedValue, MaxLimitList()[i]);
newValues[i] = limitedValue;
}
delete[] fChannelValues;
fChannelValues = newValues;