GTK Stardust-like theme for Ttk widgets?

D. McC 2009 Jan 25: Some people actually seem to prefer the GTK2 look to anything you can get with Tk, even in 8.5. I don't for the most part, but I've got to admit I've never seen anything in Tk that looks as cool as the bubbly blue buttons and bars of the GTK2 Stardust theme. I've tried gnocl, which picked up on the Stardust theme right away—but, at least on first impression, I am not too favorably impressed by gnocl's functionality or ease of use compared to Tk. So ... I was just wondering whether anyone has developed, or is developing, or might conceivably develop, a Stardust-like theme for the easy-to-use and highly functional Ttk widgets. Yes? Please?!

NEM 2009-01-26: You could try TileGTK.

D. McC 2009 Jan 28: No, I couldn't, until I see some documentation explaining how to use it. I downloaded the TileGTK 0.2 tarball and all I got was one shared object, a package index, and one Tcl script, no documentation. I don't see any documentation online, either. Am I missing something?

NEM Fair enough. I'll add an example to the TileGTK page to show you how to use it.

WJG (26-Jan-09) On your comments on Gnocl. Its good to hear that you are favorably (thought not excessively) impressed by Gnocl functionality. Gnocl is not a Tk look-alike. As it implements a Gtk/Gnome interface inevitably commands and options will reflect those Gtk library calls they provide access to, something which will cause some surprises for those committed to Tk. In terms of ease of use, its just as easy or difficult as any other Tcl package. Gnocl is a complex package, sure, and takes some time to adjust to, just like Tk. But, of course, it is totally Gtk+ compliant.

D. McC 2009 Jan 28: I'm favorably impressed by some of gnocl's functionality. I can get used to the rather different geometry management. I can live with the less exhaustive documentation, as long as it gives me at least some hint of how to do things. One thing I can't live with, though, is a three-line text widget that won't let me specify a different size! When I try, I get an error message saying "-height" and "-width" aren't valid configuration options for a gnocl text widget. When I look at the documentation, I draw a blank about how to tell a text widget how big to be. If you, or anyone, can tell me how to do this, I'll give gnocl a more thorough look. If not, I won't, because I need a text widget about 20 lines high, not three lines, for a project I'm working on (right now employing easy-to-use, highly functional, and well-documented Tk and Ttk widgets).

WJG (29-Jan-09) The 0.9.92 / 0.9.93 releases don't have sizing options for the text widget. But, if you add the following 2 lines to the list of textOptions in text.c of the sourcecode and recompile, you will be able to request a default size for the container which holds the GtkTextView widget. Then, of course, re-compile and reinstall Gnocl. The requested height will be in pixels.

        { "-heightRequest", GNOCL_INT, "height-request" },
        { "-widthRequest", GNOCL_INT, "width-request" },

 The follow example code demonstrates the feature that you're looking for, ie a 20 lines high widget.                 

 # the next line restarts using tclsh \
 exec tclsh "$0" "$@"

 package require Gnocl

 # create a new window and add widgets
 set box1 [gnocl::box -orientation vertical]
 set lab1 [gnocl::label -text "Some Stuff Goes Here!"]
 set lab2 [gnocl::label -text "More Stuff Goes Here!"]
 set txt2 [gnocl::text \
        -font { sans 10 } \
         -scrollbar always \
        -heightRequest 300 \
        -widthRequest 300] 

 # NOTE: Using the value -1 will overide the default height to fit the existing content of the textBuffer.

 # adding text before packing will adjust the default height.
 for {set i 0} {$i < 20} {incr i} {
        $txt2 insert end "$i\n"

 $box1 add $lab1 -fill {1 0}
 $box1 add $txt2 -fill {1 1}  -expand 1
 $box1 add $lab2 -fill {1 0}

 # window is set six, and not re-sizable
 set win2 [gnocl::window \
         -title {Test Window} \
        -child $box1 \
        -defaultHeight 400 \
        -defaultWidth 500 \
        -resizable 0 \
        -onDelete { exit }


Let me know if you want anymore features adding.

D. McC 2009 Jan 28: Thanks! This is going to take some getting used to, but I did manage to come up with some Gnocl code to create the initial window for the program I'm working on for Puppy Linux--in which, I'm reliably informed, Tcl and Tk 8.5.6 and Gnocl 0.9.91 or .92 will be part of the package for Puppy version 4.2:

 #!/usr/bin/env tclsh

 package require Gnocl
 set box1 [gnocl::box -orientation vertical]
 set tx [gnocl::text -scrollbar always -wrapMode word]
 set slim [gnocl::button -text "Remaster Slimmer"]
 set go [gnocl::button -text "Go Ahead"]
 set abandon [gnocl::button -text "Abandon"]
 $box1 add $tx -fill {1 1} -expand 1
 set box2 [gnocl::box -orientation horizontal -children [list \
        $slim $go $abandon] -fill {1 1} -expand 1 -borderWidth small]
 $box1 add $box2
 set win [gnocl::window -title "Remaster Express" -child $box1 \
        -defaultHeight 450 -defaultWidth 600 -resizable 1]

 $tx tag create bigbold -font "DejaVu Serif" -fontWeight bold \
        -fontSize 18
 $tx tag create bold -font "DejaVu Serif" -fontWeight bold \
        -fontSize 14
 $tx tag create norm -font "DejaVu Serif" -fontSize 14
 $tx insert end "Welcome to Remaster Express!" -tags bigbold
 $tx insert end "\n\nThis program will take a \"snapshot\" of selected portions\
        of your system; create (\"remaster\") a custom CD image; and\
        (optionally) burn the image to a CD." -tags norm
 $tx insert end "\n\nStep one: " -tags bold
 $tx insert end "you may \"slim down\" your Puppy system before remastering,\
        if desired, by uninstalling some .PET packages.\
        \n\nTo uninstall packages you have previously installed, click the\
        \"Install\" desktop icon to run the PETget package manager, and select\
        packages to uninstall from the bottom panel of the PETget window.\
        \n\nTo see a list of built-in packages that you can uninstall before\
        remastering, click the \"Remaster Slimmer\" button below.\
        \n\nWhen you have uninstalled any packages you wish, click \"Go Ahead\"\
        to begin the remastering process, or \"Abandon\" to abandon this\
        remastering project." -tags norm

And here's the result:

WJG (29-Jan-09) Pleased to be of service, and, of course even more pleased to hear that Gnocl might become distributed with such a well known package. Happy Hacking!