-
Notifications
You must be signed in to change notification settings - Fork 38
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
wintc-taskband support for other themes (Royale + Royale Noir, Zune, etc) #352
Comments
See the At the moment only the XFWM4 decorations are present for those other themes, the GTK stuff isn't done yet. |
Ah, alright. |
I'm wondering if it's possible to make an automated script that would take preexisting XP themes and convert them to something that both XFCE4 and winxp-tc could use, There are like thousands of unofficial Windows XP themes floating around on the internet that I would love to use on my XP-fied Linux installation To what extent are the bitmaps from the original Windows XP themes altered? Would it even be possible to do something similar to this or would there be too much voodoo involved? |
@acdavit I have thought about that for quite some time, I think the last time I commented on the idea was in #222 . I did recently start toying around with it in a branch For the time being though I figured it would be best to get the themes done the same way as I have done Luna (Blue) and Professional, just so that there's at least something rather than nothing. I should probably write my thoughts on what might be needed in a separate issue. Just in general a good start would be getting the resources extracted correctly without losing the alpha channel from the 32bpp bitmaps. |
Do you mind if I post a question about it on stack overflow? |
@acdavit About parsing those 32bpp bitmaps? It's a bit odd, I had a poke in the PIL/Pillow source and it suggests that these headers are supported: https://github.com/python-pillow/Pillow/blob/main/src/PIL/BmpImagePlugin.py#L102 Not really sure why the alpha channel is lost though. |
Exactly. Would you be okay if I posted the code on stack overflow or Reddit? Maybe someone could shed some light on this mystery. |
@acdavit Yeah by all means go ahead, do whatever you would like if you think it would be beneficial. 👍 |
Thanks for the response. I did submit a question to stack overflow, but I also noticed something bizarre while toying around with the resources. Resource Hacker on Windows does seem to show thumbnails of the alpha channel correctly, but the extracted bitmap lacks it, just like how it does on our Python script. Screen-Recording.1.webmCould this, yet again, be the fault of Resource Hacker incorrectly parsing 32bpp bitmaps, or could there be something fishy about how transparency is handled in msstyles? I'm curious to hear your thoughts on this matter. |
@acdavit Yeah that's why I don't use Resource Hacker for the theme work. 😛 |
Have you tried reading the resource section from the binary in question directly? From there parsing out the actual Bitmap resource is kinda straight forward. |
I have dumped out the resources raw before and was a bit bamboozled by the fact that they don't appear to have BMP header (have a look in a hex editor, the signature for a bitmap file isn't there). Out of curiousity I had a play with Pillow a bit more, noted that it actually is reading using the I'm going to see if it's viable to prepend a bitmap header onto the data, and then see if Pillow is happy to read it as a 32bpp bitmap. |
I'm fairly certain this is a bug with Pillow tbh. Basically the resources here are DIBs with the 40 byte header ( EDIT: Probably suggest fixing this upstream... have a look at this check here which is interesting - could perhaps be a bodge that needs to be amended for this to work? https://github.com/python-pillow/Pillow/blob/main/src/PIL/BmpImagePlugin.py#L245 |
what modifications would i have to make to implement this? i'd like to use this full time with the zune theme, i figured i'd just do it myself. |
@babaisgit For now you can ignore most of the above conversation, because it relates to trying to automate MSSTYLES --> XFWM4/GTK3 themes. For doing it manually, you probably want to copy the Silver theme over and start by modifying that. aka copy If you have a look at this commit: 2d1e068 You will see I made Silver by copying and modifying the Blue theme. The metrics are 99% the same (margins, padding, etc.) in all themes, so the majority of the work is essentially just replacing the graphics in the If you want to talk more about it, ask questions etc. then probably best to continue in #9 😉 |
@acdavit @BenBE Good news - I have just had a little poke with the PIL source I linked and yeah, removing that EDIT: The only difference I can find is that in these bitmaps from Windows, |
Solution I may propose to PIL is adding a couple extra 'formats', |
Okay so I raised this issue upstream with Pillow here: python-pillow/Pillow#8594 Not sure that my workaround with the extra formats will be worth a merge there, it's up to them. The good news is though is that the developer that responded to my issue was extremely helpful and provided a Python snippet that would read in the alpha channel, working with current Pillow. I have scrapped my old weird hacky bodgefest and merged this snippet into the |
I think for the tool it needs to be a kind of two phase process:
|
Any possibility of updating wintc-taskband to support other themes in the pack such as Royale Noir and Zune? It looks a bit out of place when I have Royale Noir applied but the taskbar is the regular blue Luna theme. Is this planned in the future?
The text was updated successfully, but these errors were encountered: