An extension for Ttk/Tile that uses the GTK GUI toolkit.
See: http://www.ellogon.org/petasis/index.php?option=com_content&task=view&id=29&Itemid=45
NEM To use this extension, download and install the package for your system from the link above. Then you simply need to require the package and instruct ttk to use this theme:
package require ttk::theme::tilegtk 0.2 ttk::style theme use tilegtk # Then code Ttk GUI as usual, and the GTK widgets will be used: pack [ttk::button .b -text "Hello!" -command exit]
peterc 2009-01-28: I get this error when running the above on Windows XP SP3. (The tilegtk0.2 dir is in directory in ::auto_path.)
NEM Looks like a missing DLL somewhere. There is a utility called "depends.exe" you can get for Windows that will show you what the missing DLL is. I guess maybe a missing GTK dll?
D. McC 2009 Jan 28: Thanks! That's better than no documentation at all. Just a few questions (I'll probably think of more later): Where do you install it on Linux? Does it pick up on whatever the existing GTK2 theme is at the time (e.g., Stardust), as gnocl does, or does it give you only a single GTK2-like theme? Is there anything like a detailed explanation of what makes it work?
I'm really interested in this, if it works, because I'm writing at least one application specifically for Puppy Linux, on which the preferred look now is GTK+ 2.0, with Stardust being the default theme. (Good thing--it's the only good-looking GTK2 theme available on Puppy, so far as I can see.) I guess I could learn gnocl if necessary (I have, a little, already)--but it would be a much more efficient use of my time if I could just write standard Ttk GUI code and have it come out looking like Stardust!
NEM As far as I know (I'm not the author), TileGTK uses real GTK widgets to implement a Ttk "theme". Therefore, it should pick up whatever GTK theme your Linux system is using. To install it on Linux, just unpack the tarball somewhere on your auto_path. Likely candidates are /usr/local/lib or /usr/share/lib. On my ubuntu system, the default place for extensions seems to be /usr/local/share/tcltk.
D. McC 2009 Feb 1: OK, I got around to installing it and trying the sample code you provided. I got a ttk::button displayed, all right, but it didn't pick up on the Stardust theme, which gnocl did immediately pick up on. Unless this problem can be solved, I guess I'll have to stick with gnocl for now. It does appear to be possible to use gnocl for a fair number of things, but I'd still prefer to use Ttk widgets if I could get them to look like Stardust.
WJG (02-02-09) Gnocl can do 'a fair number of things'. Surely you mean a great deal of things? What Gtk features do you need that aren't already supported in Gnocl? Features that you believe Tk has that Gnocl hasn't? This is a unique opportunity to contribute to three great open source projects - Puppy, your own apps, and Gnocl! Remember, Gnocl isn't a work around or revamp, and Gnocl isn't 'picking up' on themes; it works directly with the Gtk libraries. For Puppy development I would have thought it the first, rather than second, choice.
D. McC 2009 Feb 4: I mean "a fair number of things I know about." I don't know about anything GTK has that gnocl doesn't. I do know about some things Tk has that, so far as I know, gnocl doesn't. I'll mention at least a few of them on the gnocl page. I probably won't spend a lot of time mentioning them right now, though, because I want to get done with "Remaster Express" for Puppy Linux, my first gnocl application! :o)
WJG (04-02-09) I'm pleased that you've decided to give Gnocl a go. Who knows, perhaps this is the start of a good working partnership -Puppy would be a good platform to flagship the use of Gnocl. Whilst a 'fair number' (ah... that phrase again) of things need to be done with Gnocl (such as improved documentation) there is some much there for the Gnome/Linux developer to use. Give me feedback on which features you expect or hope for and lets see how these can be put together.
DC (Feb. 4th, 2009) I only wish we could have gotten them to use Gnocl before they started switching the entire distro's apps over to Gtk itself. There were a ton of great tools in Puppy, and most of them were written in Tcl/Tk. They have since moved on to rewriting most everything in Gtk because it looks better. It's the story of Tk's life. What a shame.
AMG: Adopt, maintain, and improve the Tcl/Tk versions of the programs that Puppy is transmuting to C/Gtk+. Add compelling features. Improve their interoperability and workflow. Switch them from Tk to Gnocl, or find a way to make Tk use the Gtk+ themes. This is how you make your argument that Tcl is a better choice than C.
WJG I think you've overstated the point. Tcl is written in C and offers a higher level of abstraction which makes C programming easier. Sometimes contributors to the wiki (myself included) have perhaps over laboured the idea that Tcl and Tk are so great that almost any IT job can be done with it. From my perspective, use the best tools for the job. C for speed and low level operations and script for everything else for rapid turn-around. We all learn of modularity and the importance of creating re-usable code, ie. make once redeploy many. Tcl is perfect for this. Take the gnocl::text widget as the classic example. Its a lot of work to build and implement the code for the object, but once done, its re-usable. And, of course, if we need a obfuscated code, then compile! Its simple, Tcl/Gnocl are the next step, not alternatives.
AMG: You understand, of course, that I meant that Tcl is a better choice than C for these particular applications.
tb - June 12th, 2009 - I just had a look at TileGTK 0.2. I downloaded the binary for Linux and it works on Ubuntu-8.04, except scrollbars aren't "tiled" after switching to the tilegtk theme and my desktop freezes, when I quit the program. All windows get emptied, but their toplevels remain on screen and I have to kill the window manager to return to the OS login screen.
ZB 2009-06-24 I made a try using provided binary - there's a problem: it says `can't read "ttk::theme::tilegtk::colors(-frame)": no such variable'. That variable is needed for proper colour setting for "ordinary" Tk widgets, to match the colour of Ttk widgets.
Another problem I can see, is that entry fields are "raised" (why?), and with no white background, like on the screenshot below.
In-Hak Min - 06-15-2009
gcc - 06-23-2009: I'd like to port TileGtk to ARM9 Linux box, what should I do? TileGtk uses a special build system called cmake, I am not familiar with it.
PT port it to TEA (autoconf based) and do everyone a favour.
Friendly anonymous Internet user
Could you please update tile-gtk? I tried compiling it (0.2 and CVS HEAD) under Ubuntu 11.10 Oneiric, since I wanted to improve the look-and-feel of Git-gui and Gitk. After much fiddling with the cmake build files I managed to make it find its libraries. Then I managed to understand the semi-obscure instructions on where to install it, and I used the magic command "$echo '*TkTheme: clam' | xrdb -merge -". (Seriously guys, you should think of the end-user and put on the front-page of every tk-related web site the list of usable Tk themes, and the commands to enable them. They're almost impossible to find with a casual search i.e. without reading your whole docs... and even then.) Unfortunately the results were messy: it didn't obey my gtk theme at all, and on top of that the arrows at each end of the scrollbars were corrupted.
On the other hand I was able to get tile-qt from the git repo on sourceforge, and that compiled fine and looked ok, even with no specific qt theme installed.
I posted my findings here for the StackExchange people: [L1 ]