-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gui: fix custom color support UI rendering issues #2666
base: master
Are you sure you want to change the base?
Conversation
artiq/dashboard/experiments.py
Outdated
|
||
def apply_colors(self): | ||
def apply_color(self, key=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the default is not to do anything?
How about breaking this function into two? Most of it is inside that if key ==
Generally seems a bit messy. |
artiq/gui/entries.py
Outdated
@@ -108,7 +135,8 @@ def _get_group(self, key): | |||
return self._groups[key] | |||
group = QtWidgets.QTreeWidgetItem([key]) | |||
for col in range(3): | |||
group.setBackground(col, self.palette().mid()) | |||
color = getattr(self, 'group_color', self.palette().mid().color()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something more explicit than this discreetly set group_color
attribute would be clearer, more maintainable and less bug-prone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general try to avoid creating new attributes anywhere else than the constructor.
4620bc1
to
1953295
Compare
ARTIQ Pull Request
Description of Changes
Fixes issues with custom color support interfering with normal widget styling:
styleSheet
with palette for consistent widget stylingDefault view on Windows:
Default view on Linux (gradient is lighter in pyqt6)
Colored View on Linux:
Related Issue
Closes #2661
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
git commit --signoff
, see copyright).Code Changes
flake8
to check code style (follow PEP-8 style).flake8
has issues with parsing Migen/gateware code, ignore as necessary.- Tested on Linux and Windows
Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
). Format:Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.