Closed marc-vdm closed 3 years ago
It was, I'm working on it now. Sorry, the pandemic got to me rough, and when I returned, I had numerous other FOSS projects that required my time first. Sorry for the massive delay.
Just an FYI: I'm going to extensive dive into debugging issues in this issue. If anyone would like to try to help identify issues (no significant coding has to be done, I'll show an example below), it would be more than appreciated since I'm aiming to debug all corner cases in this stylesheet.
The single-widget tests are being done in test.py, which has tests of the following format:
def main(argv=None):
'Application entry point'
app = QtWidgets.QApplication(argv)
# setup stylesheet
if args.stylesheet != 'native':
file = QtCore.QFile(f':/{args.stylesheet}.qss')
file.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text)
stream = QtCore.QTextStream(file)
app.setStyleSheet(stream.readAll())
if args.widget == 'progress_bar_horizontal':
child = QtWidgets.QProgressBar(widget)
child.setProperty('value', 24)
elif args.widget == '<YOUR_NAME_HERE>':
# Create a widget or a list of widgets named `child`. This
# will be added to the UI. Can be useful to debug a lot of
# complicated cases.
...
# Rest of the code for the execution
# run
window.show()
app.exec_()
if __name__ == '__main__':
main(sys.argv)
Then, you can call the script via:
python3.9 single.py --stylesheet=windows_dark --widget=progress_bar_horizontal
It also supports a lot of other cases, and allows you to detect differences between windows_dark
and native
as a great source of initial bugs. Other options include --style
(Fusion
, Windows
, Native
), --font-size
(change the size of the application font, useful for testing the app at different system font sizes), --scale
(multiplier for the application scale, useful for testing bugs with HiDPI screens, etc.), --font-family
(useful for detecting bugs for monospace, serif, and sans-serif fonts), and --compress
(adds stretching before and after the widget, to ensure the min and max sizes are appropriate).
Any tests you wish to add are more than appreciated, and will be immediately merged if you submit a PR.
A sample test and a sample outcome (look at how nice this is now) is:
elif args.widget == 'scrollarea':
# For us to have both scrollbars visible.
child = QtWidgets.QTableWidget(widget)
child.setColumnCount(100)
child.setRowCount(100)
for index in range(100):
row = QtWidgets.QTableWidgetItem(f'Row {index + 1}')
child.setVerticalHeaderItem(0, row)
column = QtWidgets.QTableWidgetItem(f'Column {index + 1}')
child.setHorizontalHeaderItem(index, column)
Which was then run with the command:
python test.py --stylesheet=windows_dark --widget=scrollarea --font-size=12 --scale=1
Pictures of actual behavior along with expectations of the desired behavior are strongly recommended, as are additional test cases.
I'm happy to say the updates have been completed, and the UI looks better than ever. If you have any specific requests for improvements, @marc-vdm or @RPGHacker, let me know and I'm more than happy to make them.
While I don't want to tell anybody in an open source project how to spend their time, I've posted an issue (#14) a month ago and received no responses. I also see that the last merge (#9) is from late 2018 and the last reply from the repo owner is early 2019 (#10) with a fix for an issue from another user that was never merged (#13).
I'm guessing if I don't get a reply that this project is abandoned, I hope this issue will help other (potential new) users understand the status!