Changeset 6983:be2f544db0b2 in orange


Ignore:
Timestamp:
09/22/10 12:49:20 (4 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
2eea04d916103c67abb3f956ee541790042b58e5
Message:
  • setting unified title and toolbar on Mac OSX
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngCanvas.pyw

    r6966 r6983  
    2121    def __init__(self, app, parent=None, flags=0): 
    2222        QMainWindow.__init__(self, parent) 
    23 #        self.setUnifiedTitleAndToolBarOnMac(True) 
    2423        self.debugMode = 1        # print extra output for debuging 
    2524        self.setWindowTitle("%s Canvas" % product) 
     
    201200                self.settings["toolboxWidth"] = self.widgetsToolBar.treeWidget.width() 
    202201                self.removeDockWidget(self.widgetsToolBar) 
    203  
     202             
    204203        if self.settings["widgetListType"] == 0: 
    205204            self.tabs = self.widgetsToolBar = orngTabs.WidgetToolBox(self, self.widgetRegistry) 
     
    209208            self.addDockWidget(Qt.LeftDockWidgetArea, self.widgetsToolBar) 
    210209        else: 
     210            if sys.platform == "darwin": 
     211                self.setUnifiedTitleAndToolBarOnMac(False)    
    211212            self.widgetsToolBar = self.addToolBar("Widgets") 
    212213            self.insertToolBarBreak(self.widgetsToolBar) 
    213214            self.tabs = orngTabs.WidgetTabs(self, self.widgetRegistry, self.widgetsToolBar) 
    214215            self.widgetsToolBar.addWidget(self.tabs) 
     216             
     217        if sys.platform == "darwin": 
     218            self.setUnifiedTitleAndToolBarOnMac(self.settings["widgetListType"] in [0, 1, 2] and self.settings["style"].lower() == "macintosh (aqua)") 
    215219 
    216220        # find widgets and create tab with buttons 
     
    685689            items = [str(n) for n in QStyleFactory.keys()] 
    686690            lowerItems = [str(n).lower() for n in QStyleFactory.keys()] 
    687             if sys.platform == "darwin": 
     691            if sys.platform == "darwin" and qVersion() < "4.6": #On Mac OSX full aqua style isn't supported until Qt 4.6 
    688692                currStyle = "cleanlooks" 
    689693            else: 
Note: See TracChangeset for help on using the changeset viewer.