Ticket #1033: IconMenuItem.cpp.diff
File IconMenuItem.cpp.diff, 1.7 KB (added by , 17 years ago) |
---|
-
/boot/home/Desktop/IconMenuItem.cpp
old new 251 251 fDeviceIcon(NULL) 252 252 { 253 253 if (nodeInfo) { 254 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_ CMAP8);254 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_RGB32); 255 255 if (nodeInfo->GetTrackerIcon(fDeviceIcon, B_MINI_ICON)) { 256 256 delete fDeviceIcon; 257 257 fDeviceIcon = NULL; … … 270 270 fDeviceIcon(NULL) 271 271 { 272 272 BMimeType mime(iconType); 273 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_ CMAP8);273 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_RGB32); 274 274 275 275 if (mime.GetIcon(fDeviceIcon, which) != B_OK) { 276 276 delete fDeviceIcon; … … 289 289 fDeviceIcon(NULL) 290 290 { 291 291 BMimeType mime(iconType); 292 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_ CMAP8);292 fDeviceIcon = new BBitmap(BRect(0, 0, which - 1, which - 1), B_RGB32); 293 293 294 294 if (mime.GetIcon(fDeviceIcon, which) != B_OK) { 295 295 delete fDeviceIcon; … … 325 325 Menu()->MovePenTo(drawPoint); 326 326 _inherited::DrawContent(); 327 327 328 BPoint where(ContentLocation()); 329 where.y = Frame().top; 328 Menu()->PushState(); 330 329 330 BPoint where(ContentLocation()); 331 where.y = Frame().top + 2; 332 331 333 if (fDeviceIcon) { 332 if (IsEnabled()) 333 Menu()->SetDrawingMode(B_OP_OVER); 334 else 335 Menu()->SetDrawingMode(B_OP_BLEND); 336 334 if (IsEnabled()) { 335 Menu()->SetDrawingMode(B_OP_ALPHA); 336 } 337 else { 338 Menu()->SetDrawingMode(B_OP_ALPHA); 339 Menu()->SetDrawingMode(B_OP_ALPHA); 340 Menu()->SetHighColor(0, 0, 0, 64); 341 Menu()->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_OVERLAY); 342 } 343 337 344 Menu()->DrawBitmapAsync(fDeviceIcon, where); 338 345 } 346 347 Menu()->PopState(); 339 348 } 340 349