Skip to content

Commit

Permalink
Main Window: Move setting Qt stylesheet to where it was before
Browse files Browse the repository at this point in the history
- After fixing issue #2028, there is no need to put it at the end
of the Main Window setup process
  • Loading branch information
ccordoba12 committed Jun 20, 2015
1 parent 6a8ae38 commit aa015c6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spyderlib/spyder.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ def __init__(self, options=None):

self.debug_print("Start of MainWindow constructor")

# Use a custom Qt stylesheet
if sys.platform == 'darwin':
spy_path = get_module_source_path('spyderlib')
mac_style = open(osp.join(spy_path, 'mac_stylesheet.qss')).read()
self.setStyleSheet(mac_style)

# Shortcut management data
self.shortcut_data = []

Expand Down Expand Up @@ -1099,14 +1105,6 @@ def add_xydoc(text, pathlist):
self.connect(child, SIGNAL("aboutToShow()"),
self.update_edit_menu)

# Use a custom stylesheet for Mac (for now). Set it here to
# avoid a Qt painting bug if it's set before the Editor is
# created. The bug only occurs on Mac.
if sys.platform == 'darwin':
spy_path = get_module_source_path('spyderlib')
mac_style = open(osp.join(spy_path, 'mac_stylesheet.qss')).read()
self.setStyleSheet(mac_style)

self.debug_print("*** End of MainWindow setup ***")
self.is_starting_up = False

Expand Down

0 comments on commit aa015c6

Please sign in to comment.