Changeset 6970:1a40fc1e9700 in orange


Ignore:
Timestamp:
09/06/10 14:53:02 (4 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
b5335699cfc9c94d68db8d3ae8b52f7dff88f395
Message:
  • default font on Mac is Monaco, other platforms Courier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Prototypes/OWPythonScript.py

    r6969 r6970  
    266266        self.mainArea.layout().addWidget(self.splitCanvas) 
    267267         
     268        defaultFont = "Monaco" if sys.platform == "darwin" else "Courier" 
    268269        self.textBox = OWGUI.widgetBox(self, 'Python script') 
    269270        self.splitCanvas.addWidget(self.textBox) 
    270271        self.text = PythonScriptEditor(self) 
    271272        self.textBox.layout().addWidget(self.text) 
    272         self.text.document().setDefaultFont(QFont("Monaco")) 
     273        self.text.document().setDefaultFont(QFont(defaultFont)) 
    273274        self.highlighter = PythonSyntaxHighlighter(self.text.document()) 
    274275        self.textBox.setAlignment(Qt.AlignVCenter) 
     
    279280        self.console = PythonConsole(self.__dict__, self) 
    280281        self.consoleBox.layout().addWidget(self.console) 
    281         self.console.document().setDefaultFont(QFont("Monaco")) 
     282        self.console.document().setDefaultFont(QFont(defaultFont)) 
    282283        self.consoleBox.setAlignment(Qt.AlignBottom) 
    283284        self.console.setTabStopWidth(4) 
Note: See TracChangeset for help on using the changeset viewer.