~ubuntu-branches/ubuntu/wily/spyder/wily-proposed

« back to all changes in this revision

Viewing changes to spyderlib/plugins/__init__.py

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant, Ghislain Antony Vaillant, Picca Frédéric-Emmanuel
  • Date: 2014-10-19 11:42:57 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20141019114257-st1rz4fmmscgphhm
Tags: 2.3.1+dfsg-1
* Team upload

[Ghislain Antony Vaillant]
* New upstream release. (Closes: #765963)
* Bump Standards-Version to 3.9.6 (no changes required).
* d/control: fix pedantic lintian warning regarding capitalization in
  packages' description.

[Picca Frédéric-Emmanuel]
* Update the homepage now that upstream moved to bitbucket.
* debian/copyright
  - updated for 2.3.1 version
* debian/control
  + Recommends: python-pandas and python3-pandas

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from spyderlib.guiconfig import get_font, set_font
31
31
from spyderlib.plugins.configdialog import SpyderConfigPage
32
32
from spyderlib.py3compat import configparser, is_text_string
 
33
import sys
33
34
 
34
35
 
35
36
class PluginConfigPage(SpyderConfigPage):
52
53
 
53
54
class SpyderDockWidget(QDockWidget):
54
55
    """Subclass to override needed methods"""
55
 
    
 
56
    DARWIN_STYLE = """
 
57
    QDockWidget::close-button, QDockWidget::float-button {
 
58
        padding: 0px;
 
59
        margin: 2px;
 
60
    }
 
61
    
 
62
    QTabWidget::pane {
 
63
        border: 3px solid rgb(235, 235, 235);
 
64
        border-bottom: 0;
 
65
    }
 
66
    
 
67
    QTabWidget::tab-bar {
 
68
        left: 5px;
 
69
    }
 
70
    
 
71
    QTabBar::tab {
 
72
        background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
 
73
                                    stop: 0 #b1b1b1, stop: 0.07 #b3b3b3,
 
74
                                    stop: 0.33 #b3b3b3, stop: 0.4 #b0b0b0,
 
75
                                    stop: 0.47 #b3b3b3, stop: 1.0 #b2b2b2);
 
76
        border: 1px solid #787878;
 
77
        border-top-color: transparent;
 
78
        border-bottom-color: transparent;
 
79
        margin-left: -1px;
 
80
        margin-right: -1px;
 
81
        min-width: 8ex;
 
82
        padding: 3px;
 
83
    }
 
84
    
 
85
    QTabBar::tab:selected {
 
86
        background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
 
87
                                    stop: 0 #dfdfdf, stop: 0.1 #dddddd,
 
88
                                    stop: 0.12 #dfdfdf, stop: 0.22 #e0e0e0,
 
89
                                    stop: 0.33 #dedede, stop: 0.47 #dedede,
 
90
                                    stop: 0.49 #e0e0e0, stop: 0.59 #dddddd,
 
91
                                    stop: 0.61 #dfdfdf, stop: 0.73 #dedede,
 
92
                                    stop: 0.80 #e0e0e0, stop: 1.0 #dedede);
 
93
        border: 1px solid #787878;
 
94
        border-top-color: transparent;
 
95
        border-bottom-left-radius: 3px;
 
96
        border-bottom-right-radius: 3px;
 
97
    }
 
98
    
 
99
    QTabBar::tab:first {
 
100
        margin-left: 0;
 
101
    }
 
102
    
 
103
    QTabBar::tab:last {
 
104
        margin-right: 0;
 
105
    }
 
106
    
 
107
    QTabBar::tab:only-one {
 
108
        margin: 0;
 
109
    }
 
110
    
 
111
    QToolButton {
 
112
        border: none;
 
113
    }
 
114
    """
 
115
 
 
116
    def __init__(self, *args, **kwargs):
 
117
        super(SpyderDockWidget, self).__init__(*args, **kwargs)
 
118
        if sys.platform == 'darwin':
 
119
            self.setStyleSheet(self.DARWIN_STYLE)
 
120
 
56
121
    def closeEvent(self, event):
57
122
        """
58
123
        Reimplement Qt method to send a signal on close so that "Panes" main