summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontEnd/ProjectExplorer.py44
-rw-r--r--src/projManagement/Validation.py8
-rw-r--r--src/projManagement/newProject.py8
3 files changed, 30 insertions, 30 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index b91f162c..99772378 100755
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -32,27 +32,29 @@ class ProjectExplorer(QtWidgets.QWidget):
self.treewidget.setHeaderItem(header)
self.treewidget.setColumnHidden(1, True)
- # Apply dark theme to header and background to match 'Welcome' dock
- self.treewidget.setStyleSheet('''
- QHeaderView::section {
- background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
- stop:0 rgba(33, 37, 51, 0.95), stop:1 rgba(20, 25, 35, 0.9));
- color: #90caf9; /* Soft blue */
- font-weight: 700;
- font-size: 17px;
- border-radius: 0;
- padding: 12px 0px 12px 18px;
- letter-spacing: 0.5px;
-
- }
- QTreeWidget {
- background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
- stop:0 rgba(26, 29, 41, 0.98), stop:1 rgba(15, 20, 25, 0.95));
- color: #e8eaed;
- border: 1px solid rgba(255, 255, 255, 0.12);
- border-radius: 0 0 12px 12px;
- }
- ''')
+ # CSS
+ init_path = '../../'
+ if os.name == 'nt':
+ init_path = ''
+
+ 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(" + init_path + "images/vline.png) 0;} \
+ QTreeView::branch:has-siblings:adjoins-item { \
+ border-image: url(" + init_path + "images/branch-more.png) 0; } \
+ QTreeView::branch:!has-children:!has-siblings:adjoins-item { \
+ border-image: url(" + init_path + "images/branch-end.png) 0; } \
+ QTreeView::branch:has-children:!has-siblings:closed, \
+ QTreeView::branch:closed:has-children:has-siblings { \
+ border-image: none; \
+ image: url(" + init_path + "images/branch-closed.png); } \
+ QTreeView::branch:open:has-children:!has-siblings, \
+ QTreeView::branch:open:has-children:has-siblings { \
+ border-image: none; \
+ image: url(" + init_path + "images/branch-open.png); } \
+ ")
for parents, children in list(
self.obj_appconfig.project_explorer.items()):
diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py
index 18b8a0aa..5f239163 100644
--- a/src/projManagement/Validation.py
+++ b/src/projManagement/Validation.py
@@ -61,8 +61,8 @@ class Validation:
:projDir => Contains path of the new projDir created
@return
- :"CHECKEXIST" => If same project name folder exists
- :"CHECKNAME" => If space is there in project name
+ :"CHECKEXIST" => If smae project name folder exists
+ :"CHECKNAME" => If space is there in name
:"VALID" => If valid project name given
"""
print("Function: Validating New Project Information")
@@ -72,9 +72,7 @@ class Validation:
return "CHECKEXIST" # Project with name already exist
else:
# Check Proper name for project. It should not have space
- # Extract only the project name (basename) from the full path
- projName = os.path.basename(projDir)
- if re.search(r"\s", projName):
+ if re.search(r"\s", projDir):
return "CHECKNAME"
else:
return "VALID"
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py
index 2a443678..10fb0cb5 100644
--- a/src/projManagement/newProject.py
+++ b/src/projManagement/newProject.py
@@ -63,8 +63,8 @@ class NewProjectInfo(QtWidgets.QWidget):
self.projName = projName
self.workspace = self.obj_appconfig.default_workspace['workspace']
# self.projName = self.projEdit.text()
- # Remove leading and trailing spaces AND replace internal spaces with underscores
- self.projName = str(self.projName).strip().replace(" ", "_")
+ # Remove leading and trailing space
+ self.projName = str(self.projName).rstrip().lstrip()
self.projDir = os.path.join(self.workspace, str(self.projName))
@@ -144,5 +144,5 @@ class NewProjectInfo(QtWidgets.QWidget):
self.msg.exec_()
return None, None
-def cancelProject(self):
- self.close()
+ def cancelProject(self):
+ self.close()