Merge pull request #9076 from electron/cleanup-cpp
Cleanup cpp codebase
This commit is contained in:
commit
f5a75c4e87
29 changed files with 75 additions and 68 deletions
|
@ -1290,7 +1290,7 @@ void NativeWindowMac::SetProgressBar(double progress, const NativeWindow::Progre
|
|||
NSDockTile* dock_tile = [NSApp dockTile];
|
||||
|
||||
// For the first time API invoked, we need to create a ContentView in DockTile.
|
||||
if (dock_tile.contentView == NULL) {
|
||||
if (dock_tile.contentView == nullptr) {
|
||||
NSImageView* image_view = [[NSImageView alloc] init];
|
||||
[image_view setImage:[NSApp applicationIconImage]];
|
||||
[dock_tile setContentView:image_view];
|
||||
|
@ -1386,22 +1386,22 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
|
|||
// they are available in the minimum SDK version
|
||||
if (type == "selection") {
|
||||
// NSVisualEffectMaterialSelection
|
||||
vibrancyType = (NSVisualEffectMaterial) 4;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(4);
|
||||
} else if (type == "menu") {
|
||||
// NSVisualEffectMaterialMenu
|
||||
vibrancyType = (NSVisualEffectMaterial) 5;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(5);
|
||||
} else if (type == "popover") {
|
||||
// NSVisualEffectMaterialPopover
|
||||
vibrancyType = (NSVisualEffectMaterial) 6;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(6);
|
||||
} else if (type == "sidebar") {
|
||||
// NSVisualEffectMaterialSidebar
|
||||
vibrancyType = (NSVisualEffectMaterial) 7;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(7);
|
||||
} else if (type == "medium-light") {
|
||||
// NSVisualEffectMaterialMediumLight
|
||||
vibrancyType = (NSVisualEffectMaterial) 8;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(8);
|
||||
} else if (type == "ultra-dark") {
|
||||
// NSVisualEffectMaterialUltraDark
|
||||
vibrancyType = (NSVisualEffectMaterial) 9;
|
||||
vibrancyType = static_cast<NSVisualEffectMaterial>(9);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue