Skip to content

Commit

Permalink
Main Window: Move Mac dock widgets style to our new qss file
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Jun 19, 2015
1 parent 2e39048 commit 568d715
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
14 changes: 14 additions & 0 deletions spyderlib/mac_stylesheet.qss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* Copyright (c) 2015- The Spyder Development Team
*/


/* ---------------- Dock widget and QSplitter separators --------------- */

QMainWindow::separator {
width: 3px;
height: 3px;
Expand Down Expand Up @@ -32,6 +35,9 @@ QSplitter::handle:pressed {
background: darkgrey;
}


/* ----------------- Tabs ------------------ */

QWidget#tab-container {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #b1b1b1, stop: 0.07 #b3b3b3,
Expand Down Expand Up @@ -108,3 +114,11 @@ QTabBar#plugin-tab QToolButton::right-arrow {
background: lightgrey;
image: url(spyderlib/images/chevron-right.png);
}


/* ------------------ Dock widgets ------------------- */

QDockWidget::close-button, QDockWidget::float-button {
padding: 0px;
margin: 2px;
}
11 changes: 0 additions & 11 deletions spyderlib/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,6 @@ def get_icon(self):

class SpyderDockWidget(QDockWidget):
"""Subclass to override needed methods"""
DARWIN_STYLE = """
QDockWidget::close-button, QDockWidget::float-button {
padding: 0px;
margin: 2px;
}
"""

def __init__(self, *args, **kwargs):
super(SpyderDockWidget, self).__init__(*args, **kwargs)
if sys.platform == 'darwin':
self.setStyleSheet(self.DARWIN_STYLE)

def closeEvent(self, event):
"""
Expand Down

0 comments on commit 568d715

Please sign in to comment.