Skinning Widgets

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Skinning Widgets

Post by Vanceone » Fri Mar 20, 2015 5:40 am

So I realize that there's a theming API being worked on; which is great and all. As far as I know, that API will be able to switch between native platform widgets (iOS or Android buttons, and so forth). But my question is more basic: given an extension like the HeaderBar--can we recolor it? Or the rest of the widgets that are currently in the DP? The client wants a green theme; and the widgets as they currently are seem to be, well, useless, if I cannot reskin them in some basic kinds of ways. I expect that this will have to be a per widget thing? Up to the widget designer?

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1079
Joined: Thu Apr 11, 2013 11:27 am

Re: Skinning Widgets

Post by LCMark » Fri Mar 20, 2015 10:45 am

@Vanceone: To a certain degree it will depend on the widget. However, we are planning on the themeing API being general - i.e. abstracting the common notions of themeing so that we can write 'plug-in' themes for each platform. Some of these 'plug-ins' will use the native APIs, others will just use the canvas API to emulate them. Indeed, some platforms do not have a themeing API so we will have to hand-write emulations (and of course, if you want say to see the Mac theme on Windows, you'd need an emulation).

What this means is that if a widget is written against the themeing API, then you'll be able theme the widget by either writing your own theme plugin (in LCB) *or* by tweaking the general theme parameters. We can abstract common notions of certain kinds of color (like background, foreground, hilite color etc.) - for some themes (like the native ones) they would be fixed, but there's no reason a suitable written theme plug-in wouldn't be able to obey a great deal of variety of requests.

So, right now it is up to the widget writer based on the properties they expose; but in time (with a theme API using widget) you'll hopefully have a great deal of choice with regards how the widget actually looks. Of course, if the widget in question has hard-coded colors and is open-source with a suitable license, you can just fork and tweak the widget yourself (or look for a version which has had that done and generalized).

Post Reply

Return to “LiveCode Builder”