Heirarchically skin/theme

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 566
Joined: Fri Jun 27, 2008 9:00 pm

Heirarchically skin/theme

Post by Mikey » Thu Feb 02, 2017 3:01 pm

I was going to file an enhancement request with this, but since we're going to be the ones to do it, anyway, I'm going to put it over here. I want to be able to set defaults for certain controls heirarchically that will be applied when controls are added (or, I suppose, give me the chance to apply the changes more widely).

0) Create sets of defaults (themes/skins) that I can save, and call up when I want to
1) Customize defaults for all new objects (say font size)
2) for all in a class of objects (buttons)
3) Theme/skin a particular stack
4) Theme/skin class of objets in the stack

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5700
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles

Re: Heirarchically skin/theme

Post by FourthWorld » Thu Feb 02, 2017 5:22 pm

FWIW I have a similar need for a project I'm working on, and although what I need isn't hierarchical it does provide a convenient means of using a stack of template objects to govern appearance and other properties of "subscribed" objects. I outlined this with the central handler that does the object updating on the mailing list last week:
http://lists.runrev.com/pipermail/use-l ... 34432.html
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4203
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN

Re: Heirarchically skin/theme

Post by jacque » Fri Feb 03, 2017 7:36 pm

I don't have all the features you listed, but I needed to do something similar in one of my current projects, in this case a button "theme". I created a button that had all the properties I needed, then set a custom property to the properties of the button. The original button was deleted. Whenever I needed to reproduce the button, I just scripted the creation of a new one and set its properties to the stored custom prop.

This could be expanded for all types of controls, and instead of setting each object's properties independently, just set the templateButton/field/etc to the stored property. I think the implementation wouldn't be hard at all, but the UI would need work. There would have to be a way to design the theme initially.

LC 8 has a "theme" property that can be set. Right now it has only "legacy" and the default, but I imagine there would be a way to hook into that feature. If so, then the user would only need to "set the theme of this stack to xxx" and it would be done.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Feature Requests”