QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Share your scripts and packages with other Mudlet users.
Post Reply
User avatar
Vadi
Posts: 4342
Joined: Sat Mar 14, 2009 3:13 pm

QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by Vadi » Mon Mar 06, 2017 8:14 pm

A Mudlet port of QDarkStyleSheet - pretty good demonstration of all of the toggles and switches you can use when theming/skinning Mudlet 3.0.

Install as a one-liner by copy/pasting this into Mudlet:
lua function downloaded_package(a,b)if not b:find("qdss",1,true)then return end installPackage(b)os.remove(b)end registerAnonymousEventHandler("sysDownloadDone","downloaded_package")downloadFile(getMudletHomeDir().."/qdss.mpackage","http://forums.mudlet.org/download/file.php?id=1445")
Update 2017/03/26: text editing box is now greyish so you can see the black Mudlet functions. Unfortunately this affects the input line as well - I think there is a way to make the selector avoid it, if anyone wants to look.

Bonus:
Here's another demo you can try (credit):
lua function downloaded_package(a,b)if not b:find("dark",1,true)then return end installPackage(b)os.remove(b)end registerAnonymousEventHandler("sysDownloadDone","downloaded_package")downloadFile(getMudletHomeDir().."/dark.mpackage","http://www.mudlet.org/wp-content/files/ ... mudlet.zip")
Attachments
QDarkStyleSheet.mpackage
(27.98 KiB) Downloaded 164 times

User avatar
SlySven
Posts: 751
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by SlySven » Tue Mar 07, 2017 3:06 am

Actually you can get the effect without installing anything into Mudlet, merely find the style.qss Qt Style file and all the images (in a ./rc/ sub-directory) in either the above package or from the indicated source to a directory somewhere and then do a global search and replace in the style file to replace the references to ":/qss_icons/rc/" in the Qt resource file style.qrc (the lines containing:

Code: Select all

image: url(:/qss_icons/rc/<an image filename>.png);
) to point to the location in your file-system.

The style.qrc file is effectively an archive type file with the same files inside as are available in the source.

You will want to change the location to the actual ones of the image files (probably relative to the intended location of the style file) - then you can start Mudlet with the command line argument --stylesheet=<relative path from the Mudlet executable to the style file>/style.qss and it will use the style just like that. Note: for convenience it is probable simplest just to put the style.qss file in the same directory as the Mudlet executable and the images in an rc sub-directory....
DarkStyle_sample.png
Incidentally, it is probably quicker if you are experimenting with your own Qt stylesheet that will use external files to at least work with actual files until you want to start bundling them up as the creator of this project has. You may notice that Mudlet too uses a Qt resource file which you may see as mudlet_alpha.qrc in the sources, strangely we have never updated it from being called alpha even though we have been through more than one official release (candidates)! :lol:

User avatar
Vadi
Posts: 4342
Joined: Sat Mar 14, 2009 3:13 pm

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by Vadi » Tue Mar 07, 2017 5:32 am

I think if you look into the package, you'll see that I've just done that all for you ;) .

User avatar
SlySven
Posts: 751
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by SlySven » Wed Mar 08, 2017 5:36 pm

But not applied it via the command line I guess? :smile:

User avatar
Vadi
Posts: 4342
Joined: Sat Mar 14, 2009 3:13 pm

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by Vadi » Wed Mar 08, 2017 7:33 pm

Not sure what you mean!

User avatar
SlySven
Posts: 751
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by SlySven » Wed Mar 08, 2017 9:25 pm

Code: Select all

mudlet --stylesheet=style.qss

User avatar
Vadi
Posts: 4342
Joined: Sat Mar 14, 2009 3:13 pm

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by Vadi » Wed Mar 08, 2017 10:03 pm

That's not really practical for most of our users as opposed to copy/pasting a command into Mudlet!

fetaera
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm

Re: QDarkStyleSheet theme for Mudlet (theming/skinning demo)

Post by fetaera » Thu Apr 20, 2017 12:43 am


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests