eric7/EricWidgets/EricSideBar.py

branch
eric7
changeset 8587
78971b458d25
parent 8584
90391fda03d5
child 8588
84dfb28716e2
equal deleted inserted replaced
8586:6a315398a554 8587:78971b458d25
31 Class implementing a sidebar with a widget area, that is hidden or shown, 31 Class implementing a sidebar with a widget area, that is hidden or shown,
32 if the current tab is clicked again. 32 if the current tab is clicked again.
33 """ 33 """
34 Version = 3 34 Version = 3
35 35
36 # TODO: make icon bar size configurable with default 36 def __init__(self, orientation=None,
37 def __init__(self, orientation=None, parent=None): 37 iconBarSize=EricIconBar.DefaultBarSize, parent=None):
38 """ 38 """
39 Constructor 39 Constructor
40 40
41 @param orientation orientation of the sidebar widget 41 @param orientation orientation of the sidebar widget
42 @type EricSideBarSide 42 @type EricSideBarSide
43 @param iconBarSize size category for the bar (one of 'xs', 'sm', 'md',
44 'lg', 'xl', 'xxl')
45 @type str
43 @param parent parent widget 46 @param parent parent widget
44 @type QWidget 47 @type QWidget
45 """ 48 """
46 super().__init__(parent) 49 super().__init__(parent)
47 50
48 # initial layout is done for NORTH 51 # initial layout is done for NORTH
49 self.__iconBar = EricIconBar(orientation=Qt.Orientation.Horizontal) 52 self.__iconBar = EricIconBar(orientation=Qt.Orientation.Horizontal,
53 barSize=iconBarSize)
50 54
51 self.__stackedWidget = QStackedWidget(self) 55 self.__stackedWidget = QStackedWidget(self)
52 self.__stackedWidget.setContentsMargins(0, 0, 0, 0) 56 self.__stackedWidget.setContentsMargins(0, 0, 0, 0)
53 57
54 self.layout = QBoxLayout(QBoxLayout.Direction.TopToBottom) 58 self.layout = QBoxLayout(QBoxLayout.Direction.TopToBottom)

eric ide

mercurial