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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user