Skip to content

Commit

Permalink
Fixed branch lines showing in pyinstaller build
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasedv committed Nov 23, 2018
1 parent 057fc44 commit e40df3c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Modules/parameterTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ParameterTree(QTreeWidget):
addOption = pyqtSignal(QTreeWidgetItem)
itemRemoved = pyqtSignal(QTreeWidgetItem, int)

def __init__(self, profile: dict):
def __init__(self, profile: dict, parent=None):
"""
Data table:
All data is in column 0.
Expand All @@ -30,7 +30,7 @@ def __init__(self, profile: dict):
37 - List of QModelIndex to items that this depends on.
"""
super().__init__()
super().__init__(parent=parent)

self.favorite = False

Expand Down
25 changes: 23 additions & 2 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def build_gui(self):
self.tab2_download_lineedit.setContextMenuPolicy(Qt.ActionsContextMenu)

# Sets up the parameter tree.
self.tab2_options = ParameterTree(options)
self.tab2_favorites = ParameterTree(favorites)
self.tab2_options = ParameterTree(options, self)
self.tab2_favorites = ParameterTree(favorites, self)
self.tab2_favorites.favorite = True

self.tab2_download_option = self.find_download_widget()
Expand Down Expand Up @@ -442,6 +442,27 @@ def build_gui(self):
QTreeWidget::indicator:unchecked {{
image: url({self.unchecked_icon});
}}
QTreeWidget::branch {{
image: none;
border-image: none;
}}
QTreeWidget::branch:has-siblings:!adjoins-item {{
image: none;
border-image: none;
}}
QTreeWidget::branch:has-siblings:adjoins-item {{
border-image: none;
image: none;
}}
QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {{
border-image: none;
image: none;
}}
"""
### Configuration main widget.
# Adds tabs to the tab widget, and names the tabs.
Expand Down
16 changes: 0 additions & 16 deletions utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,22 +457,6 @@ def _validate_settings(self):
selection-background-color: blue;
}}
QTreeWidget::branch {{
border-image: none 0;
}}
QTreeWidget::branch:has-siblings:!adjoins-item {{
border-image: none 0;
}}
QTreeWidget::branch:has-siblings:adjoins-item {{
border-image: none 0;
}}
QTreeWidget::branch:!has-children:!has-siblings:adjoins-item {{
border-image: none 0;
}}
QTreeWidget::item {{
height: 16px;
}}
Expand Down

0 comments on commit e40df3c

Please sign in to comment.