* fix 'uninitialized'-warnings in launchpad

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38276 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2010-08-19 17:41:11 +00:00
parent eba0c4d6d7
commit 98dc6a20ef
+12 -16
View File
@@ -40,7 +40,7 @@ PadView::PadView(const char* name)
{ {
SetViewColor(B_TRANSPARENT_32_BIT); SetViewColor(B_TRANSPARENT_32_BIT);
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
get_click_speed(&sActivationDelay); get_click_speed(&sActivationDelay);
fButtonLayout->SetInsets(2, 7, 2, 2); fButtonLayout->SetInsets(2, 7, 2, 2);
SetLayout(fButtonLayout); SetLayout(fButtonLayout);
@@ -91,20 +91,16 @@ PadView::Draw(BRect updateRect)
while (current <= stop) { while (current <= stop) {
rgb_color col1; rgb_color col1;
rgb_color col2; rgb_color col2;
switch (num) { if (num == 1) {
case 1: col1 = shadow;
col1 = shadow; col2 = background;
col2 = background; } else if (num == 2) {
break; col1 = background;
case 2: col2 = light;
col1 = background; } else {
col2 = light; col1 = background;
break; col2 = background;
case 3: num = 0;
col1 = background;
col2 = background;
num = 0;
break;
} }
SetHighColor(col1); SetHighColor(col1);
StrokeLine(dot, dot, B_SOLID_HIGH); StrokeLine(dot, dot, B_SOLID_HIGH);
@@ -369,7 +365,7 @@ PadView::DisplayMenu(BPoint where, LaunchButton* button) const
message = new BMessage(MSG_SET_ICON_SIZE); message = new BMessage(MSG_SET_ICON_SIZE);
message->AddInt32("size", iconSize); message->AddInt32("size", iconSize);
BString label; BString label;
label << iconSize << " x " << iconSize; label << iconSize << " x " << iconSize;
item = new BMenuItem(label.String(), message); item = new BMenuItem(label.String(), message);
item->SetTarget(this); item->SetTarget(this);
item->SetMarked(IconSize() == iconSize); item->SetMarked(IconSize() == iconSize);