Fix drawing of Tracker volume icon freespace bar
For icon sizes less than B_LARGE_ICON (32) the icon size was incorrectly just set to B_MINI_ICON (16) causing an error in where horizontally the free space bar was drawn for icon sizes between 16 and 32. This has never really been an issue because the predefined options in Tracker do not allow selecting an icon size between 16 and 32, but this fix will prevent drawing issues in the future if that ever does become an option.
This commit is contained in:
parent
b35bccc0a4
commit
84c62f1d46
|
@ -834,21 +834,15 @@ BPose::DrawBar(BPoint where, BView* view, icon_size which)
|
|||
{
|
||||
view->PushState();
|
||||
|
||||
int32 size;
|
||||
int32 barWidth;
|
||||
int32 barHeight;
|
||||
int32 size = which - 1;
|
||||
int32 yOffset;
|
||||
if (which >= B_LARGE_ICON) {
|
||||
size = which - 1;
|
||||
barWidth = (int32)(7.0f / 32.0f * (float)which);
|
||||
yOffset = 2;
|
||||
barHeight = size - 4 - 2 * yOffset;
|
||||
} else {
|
||||
size = B_MINI_ICON;
|
||||
int32 barWidth = (int32)(7.0f / 32.0f * (float)which);
|
||||
if (barWidth < 4) {
|
||||
barWidth = 4;
|
||||
yOffset = 0;
|
||||
barHeight = size - 4 - 2 * yOffset;
|
||||
}
|
||||
} else
|
||||
yOffset = 2;
|
||||
int32 barHeight = size - 4 - 2 * yOffset;
|
||||
|
||||
// the black shadowed line
|
||||
view->SetHighColor(32, 32, 32, 92);
|
||||
|
|
Loading…
Reference in New Issue