eric7/UI/UserInterface.py

branch
eric7
changeset 8588
84dfb28716e2
parent 8587
78971b458d25
child 8593
1d66b6af60ed
equal deleted inserted replaced
8587:78971b458d25 8588:84dfb28716e2
1118 """ 1118 """
1119 from EricWidgets.EricSideBar import EricSideBar, EricSideBarSide 1119 from EricWidgets.EricSideBar import EricSideBar, EricSideBarSide
1120 1120
1121 logging.debug("Creating Sidebars Layout...") 1121 logging.debug("Creating Sidebars Layout...")
1122 1122
1123 # TODO: create icon for biggest icon bar size (96px)
1124 # Create the left sidebar 1123 # Create the left sidebar
1125 self.leftSidebar = EricSideBar(EricSideBarSide.WEST, 1124 self.leftSidebar = EricSideBar(EricSideBarSide.WEST,
1126 Preferences.getUI("IconBarSize")) 1125 Preferences.getUI("IconBarSize"))
1127 self.leftSidebar.setIconBarColor(Preferences.getUI("IconBarColor")) 1126 self.leftSidebar.setIconBarColor(Preferences.getUI("IconBarColor"))
1128 1127
1140 ## Populate the left side bar 1139 ## Populate the left side bar
1141 #################################################### 1140 ####################################################
1142 1141
1143 self.leftSidebar.addTab( 1142 self.leftSidebar.addTab(
1144 self.projectBrowser, 1143 self.projectBrowser,
1145 UI.PixmapCache.getIcon("sbProjectViewer48"), 1144 UI.PixmapCache.getIcon("sbProjectViewer96"),
1146 self.tr("Project-Viewer")) 1145 self.tr("Project-Viewer"))
1147 1146
1148 self.leftSidebar.addTab( 1147 self.leftSidebar.addTab(
1149 self.multiProjectBrowser, 1148 self.multiProjectBrowser,
1150 UI.PixmapCache.getIcon("sbMultiProjectViewer48"), 1149 UI.PixmapCache.getIcon("sbMultiProjectViewer96"),
1151 self.tr("Multiproject-Viewer")) 1150 self.tr("Multiproject-Viewer"))
1152 1151
1153 if self.templateViewer: 1152 if self.templateViewer:
1154 self.leftSidebar.addTab( 1153 self.leftSidebar.addTab(
1155 self.templateViewer, 1154 self.templateViewer,
1156 UI.PixmapCache.getIcon("sbTemplateViewer48"), 1155 UI.PixmapCache.getIcon("sbTemplateViewer96"),
1157 self.tr("Template-Viewer")) 1156 self.tr("Template-Viewer"))
1158 1157
1159 if self.browser: 1158 if self.browser:
1160 self.leftSidebar.addTab( 1159 self.leftSidebar.addTab(
1161 self.browser, 1160 self.browser,
1162 UI.PixmapCache.getIcon("sbFileBrowser48"), 1161 UI.PixmapCache.getIcon("sbFileBrowser96"),
1163 self.tr("File-Browser")) 1162 self.tr("File-Browser"))
1164 1163
1165 if self.symbolsViewer: 1164 if self.symbolsViewer:
1166 self.leftSidebar.addTab( 1165 self.leftSidebar.addTab(
1167 self.symbolsViewer, 1166 self.symbolsViewer,
1168 UI.PixmapCache.getIcon("sbSymbolsViewer48"), 1167 UI.PixmapCache.getIcon("sbSymbolsViewer96"),
1169 self.tr("Symbols")) 1168 self.tr("Symbols"))
1170 1169
1171 #################################################### 1170 ####################################################
1172 ## Populate the right side bar 1171 ## Populate the right side bar
1173 #################################################### 1172 ####################################################
1174 1173
1175 if self.codeDocumentationViewer: 1174 if self.codeDocumentationViewer:
1176 self.rightSidebar.addTab( 1175 self.rightSidebar.addTab(
1177 self.codeDocumentationViewer, 1176 self.codeDocumentationViewer,
1178 UI.PixmapCache.getIcon("sbCodeDocuViewer48"), 1177 UI.PixmapCache.getIcon("sbCodeDocuViewer96"),
1179 self.tr("Code Documentation Viewer")) 1178 self.tr("Code Documentation Viewer"))
1180 1179
1181 self.rightSidebar.addTab( 1180 self.rightSidebar.addTab(
1182 self.debugViewer, UI.PixmapCache.getIcon("sbDebugViewer48"), 1181 self.debugViewer, UI.PixmapCache.getIcon("sbDebugViewer96"),
1183 self.tr("Debug-Viewer")) 1182 self.tr("Debug-Viewer"))
1184 1183
1185 if self.pipWidget: 1184 if self.pipWidget:
1186 self.rightSidebar.addTab( 1185 self.rightSidebar.addTab(
1187 self.pipWidget, UI.PixmapCache.getIcon("sbPyPI48"), 1186 self.pipWidget, UI.PixmapCache.getIcon("sbPyPI96"),
1188 self.tr("PyPI")) 1187 self.tr("PyPI"))
1189 1188
1190 if self.condaWidget: 1189 if self.condaWidget:
1191 self.rightSidebar.addTab( 1190 self.rightSidebar.addTab(
1192 self.condaWidget, UI.PixmapCache.getIcon("sbMiniconda48"), 1191 self.condaWidget, UI.PixmapCache.getIcon("sbMiniconda96"),
1193 self.tr("Conda")) 1192 self.tr("Conda"))
1194 1193
1195 if self.cooperation: 1194 if self.cooperation:
1196 self.rightSidebar.addTab( 1195 self.rightSidebar.addTab(
1197 self.cooperation, UI.PixmapCache.getIcon("sbCooperation48"), 1196 self.cooperation, UI.PixmapCache.getIcon("sbCooperation96"),
1198 self.tr("Cooperation")) 1197 self.tr("Cooperation"))
1199 1198
1200 if self.irc: 1199 if self.irc:
1201 self.rightSidebar.addTab( 1200 self.rightSidebar.addTab(
1202 self.irc, UI.PixmapCache.getIcon("sbIrc48"), 1201 self.irc, UI.PixmapCache.getIcon("sbIrc96"),
1203 self.tr("IRC")) 1202 self.tr("IRC"))
1204 1203
1205 if self.microPythonWidget: 1204 if self.microPythonWidget:
1206 self.rightSidebar.addTab( 1205 self.rightSidebar.addTab(
1207 self.microPythonWidget, 1206 self.microPythonWidget,
1208 UI.PixmapCache.getIcon("sbMicroPython48"), 1207 UI.PixmapCache.getIcon("sbMicroPython96"),
1209 self.tr("MicroPython")) 1208 self.tr("MicroPython"))
1210 1209
1211 #################################################### 1210 ####################################################
1212 ## Populate the bottom side bar 1211 ## Populate the bottom side bar
1213 #################################################### 1212 ####################################################
1214 1213
1215 self.bottomSidebar.addTab(self.taskViewer, 1214 self.bottomSidebar.addTab(self.taskViewer,
1216 UI.PixmapCache.getIcon("sbTasksViewer48"), 1215 UI.PixmapCache.getIcon("sbTasksViewer96"),
1217 self.tr("Task-Viewer")) 1216 self.tr("Task-Viewer"))
1218 1217
1219 self.bottomSidebar.addTab(self.logViewer, 1218 self.bottomSidebar.addTab(self.logViewer,
1220 UI.PixmapCache.getIcon("sbLogViewer48"), 1219 UI.PixmapCache.getIcon("sbLogViewer96"),
1221 self.tr("Log-Viewer")) 1220 self.tr("Log-Viewer"))
1222 1221
1223 if self.numbersViewer: 1222 if self.numbersViewer:
1224 self.bottomSidebar.addTab(self.numbersViewer, 1223 self.bottomSidebar.addTab(self.numbersViewer,
1225 UI.PixmapCache.getIcon("sbNumbers48"), 1224 UI.PixmapCache.getIcon("sbNumbers96"),
1226 self.tr("Numbers")) 1225 self.tr("Numbers"))
1227 1226
1228 #################################################### 1227 ####################################################
1229 ## Populate the configurable widgets 1228 ## Populate the configurable widgets
1230 #################################################### 1229 ####################################################
1235 elif self.__shellPosition == "right": 1234 elif self.__shellPosition == "right":
1236 self.__shellParent = self.rightSidebar 1235 self.__shellParent = self.rightSidebar
1237 else: 1236 else:
1238 self.__shellParent = self.bottomSidebar 1237 self.__shellParent = self.bottomSidebar
1239 self.__shellParent.insertTab(0, self.shellAssembly, 1238 self.__shellParent.insertTab(0, self.shellAssembly,
1240 UI.PixmapCache.getIcon("sbShell48"), 1239 UI.PixmapCache.getIcon("sbShell96"),
1241 self.tr("Shell")) 1240 self.tr("Shell"))
1242 1241
1243 #################################################### 1242 ####################################################
1244 ## Set the start index of each side bar 1243 ## Set the start index of each side bar
1245 #################################################### 1244 ####################################################

eric ide

mercurial