DiskUsage: Style fixes

This commit is contained in:
John Scipione 2015-03-06 13:33:25 -05:00
parent 91bf7d51f0
commit 58f4a50b33

View File

@ -155,7 +155,6 @@ ControlsView::VolumeTabView::TabFrame(int32 index) const
float x = 0.0f; float x = 0.0f;
float width = 0.0f; float width = 0.0f;
float minStringWidth = StringWidth("Haiku"); float minStringWidth = StringWidth("Haiku");
int countTabs = CountTabs(); int countTabs = CountTabs();
// calculate the total width if no truncation is made at all // calculate the total width if no truncation is made at all
@ -167,9 +166,9 @@ ControlsView::VolumeTabView::TabFrame(int32 index) const
float tabLabelWidth = StringWidth(TabAt(i)->Label()); float tabLabelWidth = StringWidth(TabAt(i)->Label());
if (tabLabelWidth < minStringWidth) if (tabLabelWidth < minStringWidth)
tabLabelWidth = minStringWidth; tabLabelWidth = minStringWidth;
float tabWidth = tabLabelWidth + 3.0f * kSmallHMargin float tabWidth = tabLabelWidth + 3.0f * kSmallHMargin
+ ((VolumeTab*)TabAt(i))->IconWidth(); + ((VolumeTab*)TabAt(i))->IconWidth();
margins[i] = tabWidth - averageWidth; margins[i] = tabWidth - averageWidth;
width += tabWidth; width += tabWidth;
} }
@ -224,7 +223,7 @@ ControlsView::VolumeTabView::AttachedToWindow()
while (fVolumeRoster->GetNextVolume(&tempVolume) == B_OK) { while (fVolumeRoster->GetNextVolume(&tempVolume) == B_OK) {
if (tempVolume.IsPersistent()) { if (tempVolume.IsPersistent()) {
BVolume* volume = new BVolume(tempVolume); BVolume* volume = new BVolume(tempVolume);
VolumeTab *item = new VolumeTab(volume); VolumeTab* item = new VolumeTab(volume);
char name[B_PATH_NAME_LENGTH]; char name[B_PATH_NAME_LENGTH];
volume->GetName(name); volume->GetName(name);
AddTab(new VolumeView(name, volume), item); AddTab(new VolumeView(name, volume), item);