Group: comp.lang.tcl


Subject: tk_setPalette and ttk
From: ZB
Date: 12/5/2007 8:11:18 PM
Does there exist a simple way to change the colours of the "themed" widgets, as it used to be in case of the "ordinary" ones ("tk_setPalette orange3")? -- ZB

Subject: tk_setPalette and ttk
From: Joe English
Date: 12/7/2007 3:06:08 AM
ZB asked: > > Does there exist a simple way to change the colours of the "themed" widgets, > as it used to be in case of the "ordinary" ones ("tk_setPalette orange3")? There is no simple way to do that, because the problem isn't that simple any more. [tk_setPalette $bg] produces an essentially monochrome color scheme, where everything is a single color or a lighter or darker shade thereof. That suffices for the stock early 1990's era Motif look and feel, but not for anything since then. (In fact even most real Motif applications used a richer color scheme than that.) The precise set of colors you need in the palette also depends on the theme. Pre-XP Windows has a list of a couple dozen different system colors, all used for different UI elements; on OSX it's even more complicated -- the "background color" isn't even a color, it's a pattern! That said, the "default", "alt", and (to a lesser extent) "clam" themes are sorta kinda halfway intended to be recolorable. Based on a "frame" color, a "window" color, and an "accent" color, it's possible to compute a full color scheme for all the elements in these three. This isn't fully working yet, but it's definitely on the list of things to do. --Joe English