diff options
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 8d91dc6c..d98c5d15 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -14,6 +14,18 @@ class ProjectExplorer(QtGui.QWidget): self.treewidget.setHeaderItem(header) self.treewidget.setColumnHidden(1,True) + #CSS + self.treewidget.setStyleSheet(" \ + QTreeView { border-radius: 15px; border: 1px solid gray; padding: 5px; width: 200px; height: 150px; } \ + QTreeView::branch:has-siblings:!adjoins-item { border-image: url(../images/vline.png) 0; } \ + QTreeView::branch:has-siblings:adjoins-item { border-image: url(../images/branch-more.png) 0; } \ + QTreeView::branch:!has-children:!has-siblings:adjoins-item { border-image: url(../images/branch-end.png) 0; } \ + QTreeView::branch:has-children:!has-siblings:closed, \ + QTreeView::branch:closed:has-children:has-siblings { border-image: none; image: url(../images/branch-closed.png); } \ + QTreeView::branch:open:has-children:!has-siblings, \ + QTreeView::branch:open:has-children:has-siblings { border-image: none; image: url(../images/branch-open.png); } \ + ") + for parents, children in self.obj_appconfig.project_explorer.items(): os.path.join(parents) if os.path.exists(parents): @@ -96,7 +108,9 @@ class ProjectExplorer(QtGui.QWidget): def save_data(self): self.fopen=open(self.filePath, 'w') - self.fopen.write(self.text.toPlainText()) + lines = str(self.text.toPlainText()).split('\n') + lines=[i+'\r' for i in lines] + self.fopen.writelines(lines) self.fopen.close() self.textwindow.close() |