ColinDuquesnoy / QDarkStyleSheet

A dark style sheet for QtWidgets application
Other
2.76k stars 725 forks source link

Creating a custom palette #316

Open ismirlia opened 1 year ago

ismirlia commented 1 year ago

Hello,

I was trying to to create a custom color palette for an application I work with, but I saw that there is a currently an intentional error raised in scss.py

Traceback (most recent call last):
  File "/Users/name/Documents/dev/qdarkstylesheet/QDarkStyleSheet/qdarkstyle/utils/scss.py", line 287, in <module>
    qss = create_custom_qss(
  File "/Users/name/Documents/dev/qdarkstylesheet/QDarkStyleSheet/qdarkstyle/utils/scss.py", line 176, in create_custom_qss
    raise NotImplementedError("Update this function for the new Palette class")

I just wanted to confirm that this functionality has been disabled for the time being? I apologize if this is duplicate, but no one answered #292 and #301 seemed to imply that that was the case, plus they were both close to a year old. Thank you for your time.

ccordoba12 commented 1 year ago

Hey @ismirlia, thanks for reporting. Custom palettes should work, although none of us have actually used that functionality.

So, you're welcome to fix the errors you find in that functionality and submit a pull request with your changes.

dpizetta commented 1 year ago

@ismirlia thanks for reporting and @ccordoba12 for the reply. I've been working on this, it is not complete, but its near to work properly. I'll push the changes to the develop branch, so if @ismirlia could test and make any other change it is needed, would be very nice. Thanks again

ccordoba12 commented 1 year ago

That's great news! Thanks a lot for working on that @dpizetta.

ismirlia commented 1 year ago

Thank you for the replies @ccordoba12 and @dpizetta . I'll have some time to work on this later in the week and I will take a look and let you know how far I get.

dpizetta commented 1 year ago

@ismirlia thanks for your help. I pushed the last changes I've made. That function is still not complete yet, but many changes were already made. We need to get the function args and update the new Palette class template. I've tested with the default values and the creation of palette was fixed, however needs this change for custom ones.

hmaarrfk commented 1 year ago

I was just trying to create a custom palette this weekend. Is the work done in the develop branch or is there a different place i should look at things? https://github.com/ColinDuquesnoy/QDarkStyleSheet/commits/develop

ccordoba12 commented 1 year ago

I think @dpizetta hasn't pushed it yet.