         // Clear the background and return if the starting color is not set.
         guard let startingColor = startingColor else {
             NSColor.clear.setFill()
-            dirtyRect.fill()
+            bounds.fill()
+
             return
         }
 

    /// The ending color of the gradient.
    @IBInspectable var endingColor: NSColor? {
        didSet {
            // Make a copy to avoid sharing.
            endingColor = endingColor?.copy() as? NSColor

            needsDisplay = true
        }
    }

//  GradientView.swift
//  Vienna
//
//  Copyright 2017-2018
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
