Moved code to new class PropertyEditor from MainWindow

Improved delegate painting