Skip to content

using improved L&F #16

@chrstphrchvz

Description

@chrstphrchvz

I haven't used HSW12 much lately, but I did come across how there are ways to have improved look-and-feel for Tk (I believe it is the Tcl/Tk "Tile" feature specifically). I imagine that this would probably be worthwhile supporting e.g. for macOS so that a native look-and-feel is used and maybe even XQuartz is not needed--I'll upload a screenshot once I have my Mac running again if this is the case.

It seems the easiest way might be to try Tcl::pTk. With little effort I was able to use the "hijack" approach (i.e. launch using perl -MTcl::pTk::TkHijack hsw12.pl). I can at least get the GUI to appear after addressing a couple of minor issues:

  • Tk::Exists has to be explicitly used as Tk::Exists rather than just Exists (please correct me if there is some other Exists besides Tk::Exists that's being used)

  • There is an error when allowing autofocus;


bad option "focus": must be cget or configure at /usr/local/share/perl/5.24.1/Tcl/pTk/Widget.pm line 336.

If I comment out focusFollowsMouse it works fine, but I do not know what exactly causes the error. Personally I'm fine without the autofocus.

I'll note that it did take a few more steps to use Tcl::pTk than just regular Perl/Tk, since neither Linux distributions, macports, nor ActiveState PPM seem to provide it, although they do tend to provide the prerequisite modules prepackaged (e.g. Tix for Tcl; and Tcl, Class::ISA, and Sub::Name for Perl). I imagine whoever is still successfully using HSW12 is adventurous enough to go through these steps as well.

Also, I'd be inclined to have HSW12 use Tcl::pTk only if it is available and still work without it otherwise. Maybe some variation of the approach used here will suffice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions