Tk Source Code

View Ticket
Login
Ticket UUID: 493402
Title: TIP 48: style patch
Type: Patch Version: TIP Implementation
Submitter: mdejong Created on: 2001-12-14 18:32:01
Subsystem: 65. Generic Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2003-11-13 03:14:58
Resolution: Accepted Closed By: mdejong
    Closed on: 2002-06-19 20:42:56
Description:
Modified version of:

http://www.multimania.com/fbonnet/pub/style.patch

This patch is not yet ready to be applied.
User Comments: mdejong added on 2002-06-20 03:42:56:
Logged In: YES 
user_id=90858

A patch for TIP 48 was merged into the CVS
on 2002-06-19, closing.

fbonnet added on 2002-06-18 16:21:07:

File Added - 25306: tkstyle.patch

dgp added on 2001-12-20 09:28:52:
Logged In: YES 
user_id=80530

If you want to change a TIP title, say so on TCLCORE,
and one of the TIP Editors can do it.

fbonnet added on 2001-12-20 06:11:42:
Logged In: YES 
user_id=93873

[note: we should continue this discussion on the TCL-CORE 
list]

Comment By: George A. Howlett (ghowlett):

> I've looked at the most recent patch.  I understand that
> you propose a style object that maybe can be used for
> various style implementations.   I don't see 
where "themes"
> are really addressed anywhere.  A theme, by definition, 
is 
> consistent across all applications.  How are all Tk
> applications to be notified?  All applications?  And whose
> "themes"?

That's right, TIP #48 only deals with styles. Let's say 
that a theme
is partly made of a given style (there can be other stuff 
such as
cursors pointers or sounds). However the TIP only defines 
the
infrastructure (ie the generic hooks mechanism). Themes 
will be
implemented by style engines via separate extensions, and 
notification and such are the style engine's 
responsibility. One
can choose to implement pixmapped themes from scratch, 
another to
be bound to the underlying desktop (eg KDE or Gtk).

> And quite frankly, I think themes are irrelevant to your
> TIP.  Styles are interesting in their own right: even if 
> all they do is get gradients and tiles into the core
> widgets. I'm less wow-ed by the thought of a blue-metal
> look-and-feel, especially if there's no mechanism to make
> this happen across all widgets or applications.  

A solution could be to set the -style option can be set 
using the 
option database, and to auto-load the style engine.

> Most themes 
> in fact reduce usability.  They're the triumph of form 
over
> substance -- flash over usability.  One of the most 
frequent
> requests that novice Windows users make is "can you get me
> back to my old desktop"?  Like the resizing feature in the
> Windows taskbar, they're a net loss.

I mostly agree. My primary concern about themes is for 
multimedia
apps. I myself use the plain vanilla default settings, and 
I don't
care much about desktop-wide, lizard-skined, alpha-blended 
pixmap
themes, although I know many users do :*)

I think the misunderstanding about TIP#48 comes from its 
title.
It doesn't implement themes per se but only provides the 
infrastructure to do so. Perhaps something like "Generic 
mechanism
for hooking custom widget code" would have been better (if 
less
sexy) but the first version was quite far from that, and 
you can't 
change the title of a TIP once it's published. And anyway, 
the 
goal of the whole stuff is still to help themes 
implementation.

See you, Fred

mdejong added on 2001-12-19 10:04:37:

File Deleted - 14705: 



File Added - 14897: style.patch3

mdejong added on 2001-12-19 10:04:36:
Logged In: YES 
user_id=90858

This new version should add the missing tkStyle.c
file and apply cleanly to the CVS.

ghowlett added on 2001-12-18 23:11:45:
Logged In: YES 
user_id=137748

I've looked at the most recent patch.  I understand that
you propose a style object that maybe can be used for
various style implementations.   I don't see where "themes"
are really addressed anywhere.  A theme, by definition, is 
consistent across all applications.  How are all Tk
applications to be notified?  All applications?  And whose
"themes"?

And quite frankly, I think themes are irrelevant to your
TIP.  Styles are interesting in their own right: even if 
all they do is get gradients and tiles into the core
widgets. I'm less wow-ed by the thought of a blue-metal
look-and-feel, especially if there's no mechanism to make
this happen across all widgets or applications.  Most themes 
in fact reduce usability.  They're the triumph of form over
substance -- flash over usability.  One of the most frequent
requests that novice Windows users make is "can you get me
back to my old desktop"?  Like the resizing feature in the
Windows taskbar, they're a net loss.

--gah

fbonnet added on 2001-12-18 20:40:28:
Logged In: YES 
user_id=93873

To George A. Howlett:

I think you're still referring to the old version of the
patch that only proposed to introduce a border object for
basic themeing. The new version proposes a deeper generic
mechanism for hooking custom widget code. Theme engines
would be provided by specific extensions.

To Jeff Hobbs:

The patch (BTW the file generic/tkStyle.C is missing)
implements TIP #48 which is not yet adopted, so this is
certainly the main reason that prevents it from being
applied ;)
It introduces new public and private APIs and their
associated stubs entries. The only modifications to the
existing code are:

 - calls to init & cleanup procedures in TkCreateMainWindow
   & Tk_DestroyWindow
 - a new GetOption call that replaces GetOptionFromObj in
   tkConfig.c
 - a new TK_OPTION_STYLE option type.

So the changes to the current core are very limited and
should induce no compatibility problemns to non-themed
widgets (100% of them for now :*)

Fred

ghowlett added on 2001-12-18 00:33:35:
Logged In: YES 
user_id=137748

TIP48 still needs to be approved.  

Some areas I'd like to see addressed by the TIP would be a
description of what "theme-ing" is and what it is not.  One
of the most important aspects of themes is that the user
(not programmer) can change the theme and that it applies
across-the-board to all applications (regardless of
toolkit).

TIP48 doesn't say anything about Tk themes being consistent
with other toolkits themes.  Under Unix, that would mean
playing nice with the gnome or kde theme signaling
mechanism.  It also means replicating all their drawing
styles (it's a lot easier for gnome/kde applications 
since they share a common toolbox).

Without the theme-ing discussion, TIP48 is about making
borders into style objects (like images).  I didn't see
anything about a notification mechanism.  How do widgets
know that a style has changed?

I don't have any problems with Style objects per se.  I'd
like to know how they fit into a desktop-consistent
look-and-feel, especially considering that Tk figures to
remain a niche player.  Without linking this back to
kde/gnome/winxp etc., it's just a cool idea. But how cool
are the mozilla themes now?

At the same time, it would be nice that Tk evolved beyond
its flat solid color backgrounds.  So I'm not against 
styles.  They could provide a good framework for tiles or
gradients. I'd like to see TIP48 get fleshed out to address
styles without themes.  Themes are a neat frill. I just
think themes are a lot bigger topic that's much further
off.

--gah

hobbs added on 2001-12-15 01:42:53:
Logged In: YES 
user_id=72656

Can we get a bit more description on the patch - what is 
done, what prevents it from being ready to be applied?

mdejong added on 2001-12-15 01:32:04:

File Added - 14705: style.patch2

Attachments: