Skin Editor

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Skin Editor

Re: Skin Editor

by malkierian » Thu Jun 07, 2018 11:14 am

Awesome, thanks PetrCBR. I look forward to trying them out.

Re: Skin Editor

by PetrCBR » Thu Jun 07, 2018 4:54 am

For a next build i've updated skin API. Using app.getSkins() (and app.getLayouts()) you will receive list of objects with these properties: title, id, description, version, author, path, isCurrent. For skin/layout load you can use methods uitools.activateSkin(skin) or uitools.activateLayout(layout).

Re: Skin Editor

by malkierian » Wed Jun 06, 2018 4:16 pm

Yes, but the name registered through info.json can't be guaranteed to correspond to the name of the folder in which that skin resides in.

Re: Skin Editor

by PetrCBR » Wed Jun 06, 2018 3:35 pm

Skin's are located always in 'Skins' subfolder where MM is installed.

Re: Skin Editor

by malkierian » Wed Jun 06, 2018 3:18 pm

Cool, I can see them now. May I request adding a Skin class to the system that will contain info like what's in the info.json, as well as the skin's system file path? Right now there's no way to guarantee you're getting the right skin path just based off of the string that App.currentSkin() returns. Access to the CSS and LESS engines would be helpful, too, but not necessary.

Re: Skin Editor

by jiri » Wed Jun 06, 2018 7:20 am

Sorry about this, the docs missed some newer stuff, it's updated now (including new filesystem methods).

Jiri

Re: Skin Editor

by malkierian » Tue Jun 05, 2018 3:17 pm

I'm still not seeing currentSkin or currentLayout in App in the API reference (I'm using the one linked to in the announcement). Am I looking at an outdated reference? Also, are scripts/addons currently capable of loading and saving files on the filesystem?

Re: Skin Editor

by jiri » Tue Jun 05, 2018 7:30 am

Hi, yes, looks like a useful tool. As for the api, you might need app.currentSkin() and app.currentLayout() to know what to edit and window.doReload() to apply the skin changes. This currently performs a complete window re-load, in order to properly apply any possible changes in JS (a skin can contain any custom JS code). We'll also try to add another api function to just reload CSS, in order to be able to perform quick hacks.

Jiri

Skin Editor

by malkierian » Mon Jun 04, 2018 10:51 pm

Hey, I was thinking it might be nice to have an in-app skin editor (for small edits, like colors and fonts and such), and am even willing to build it, but I couldn't find anything in the API that had anything to do with CSS, LESS, or skins at all. Even if there was just a way of finding out which skin the user currently has running, I could probably figure it out, but it would more likely require access to LESS processing, file I/O, skin reloading, etc. Would this be something you guys might be willing to consider putting in, so I could make it, or is this a pipe dream?

Top