unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Changing the no-toolkit scrollbar thumb color. (minor issue)
@ 2003-09-26 20:13 Rob Browning
  2003-09-26 21:23 ` Luc Teirlinck
  0 siblings, 1 reply; 54+ messages in thread
From: Rob Browning @ 2003-09-26 20:13 UTC (permalink / raw)



How hard might it be to add code to allow the user to change the
no-toolkit thumb color from black to something else?  A few people
have asked about it.  I'd be willing to see what I can come up with if
it wouldn't be undesirable, or too intrusive.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-26 20:13 Changing the no-toolkit scrollbar thumb color. (minor issue) Rob Browning
@ 2003-09-26 21:23 ` Luc Teirlinck
  2003-09-26 21:32   ` Rob Browning
  2003-09-27 18:16   ` Robert J. Chassell
  0 siblings, 2 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-26 21:23 UTC (permalink / raw)
  Cc: emacs-devel

Rob Browning wrote:

   How hard might it be to add code to allow the user to change the
   no-toolkit thumb color from black to something else?

Maybe I am misunderstanding the question, but does

M-x customize-face RET scroll-bar 

not do exactly what you want?  Just customize the foreground.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-26 21:23 ` Luc Teirlinck
@ 2003-09-26 21:32   ` Rob Browning
  2003-09-27 18:16   ` Robert J. Chassell
  1 sibling, 0 replies; 54+ messages in thread
From: Rob Browning @ 2003-09-26 21:32 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Maybe I am misunderstanding the question, but does
>
> M-x customize-face RET scroll-bar 
>
> not do exactly what you want?  Just customize the foreground.

Nope, you're exactly right.

Thanks.
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-26 21:23 ` Luc Teirlinck
  2003-09-26 21:32   ` Rob Browning
@ 2003-09-27 18:16   ` Robert J. Chassell
  2003-09-27 21:55     ` Luc Teirlinck
  2003-09-28 17:37     ` Luc Teirlinck
  1 sibling, 2 replies; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-27 18:16 UTC (permalink / raw)


   M-x customize-face RET scroll-bar 

This customization function has no effect in an Emacs configured with
--with-x-toolkit=gtk

Using Friday's CVS snapshot,  2003 Sep 26  14:41 UTC
GNU Emacs 21.3.50.92 (i686-pc-linux-gnu, GTK+ Version 2.2.1)
started with

     /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

I would like to change the colors both of the foreground (the
`thumb') and the background (the `trough') of the scroll bars.

How do I do that?

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-27 18:16   ` Robert J. Chassell
@ 2003-09-27 21:55     ` Luc Teirlinck
  2003-09-28 13:08       ` Robert J. Chassell
  2003-09-28 17:37     ` Luc Teirlinck
  1 sibling, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-27 21:55 UTC (permalink / raw)
  Cc: emacs-devel

Robert Chassell wrote:

      M-x customize-face RET scroll-bar 

   This customization function has no effect in an Emacs configured with
   --with-x-toolkit=gtk

   Using Friday's CVS snapshot,  2003 Sep 26  14:41 UTC
   GNU Emacs 21.3.50.92 (i686-pc-linux-gnu, GTK+ Version 2.2.1)
   started with

	/usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

   I would like to change the colors both of the foreground (the
   `thumb') and the background (the `trough') of the scroll bars.

   How do I do that?

I personally use the native scroll-bar, but is the answer to your
question in `(emacs)GTK resources' and following sections, especially
`(emacs)GTK names in Emacs'?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-27 21:55     ` Luc Teirlinck
@ 2003-09-28 13:08       ` Robert J. Chassell
  2003-09-28 16:38         ` Jan D.
  2003-09-28 16:42         ` Luc Teirlinck
  0 siblings, 2 replies; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-28 13:08 UTC (permalink / raw)


Using Saturday';s CVS snapshot,  2003 Sep 27 19:56 UTC
GNU Emacs 21.3.50.94 (i686-pc-linux-gnu, GTK+ Version 2.2.1)
started with

    /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

Earlier, I wrote:

         M-x customize-face RET scroll-bar

      This customization function has no effect in an Emacs configured with
      --with-x-toolkit=gtk

      I would like to change the colors both of the foreground (the
      `thumb') and the background (the `trough') of the scroll bars.

      How do I do that?

The response was

   ... is the answer to your question in `(emacs)GTK resources' and
   following sections, especially `(emacs)GTK names in Emacs'?

No -- I just tried several variations on how to create a
~/.emacs.d/gtkrc file and none worked.  (I also tried putting the
variations into ~/.gtkrc-2.0 just in case ~/.emacs.d/gtkrc was the
wrong name for the Emacs-specific file; that also failed.)

This is a problem with the documentation.  It should be clear enough.

But the problem is worse than inadaquate documentation.  The current
message from `customize-face' is *false*.  The `customize-face' method
tells you that it has changed the foreground and background faces of
the scroll bars when it has not.

The `customize-face RET scroll-bar' feature needs to

    * check for the tool kit in use and
      if it is `GTK+' {i.e, if (featurep 'gtk) returns t},

      - either have `customize-face' do the right thing, whatever that
        be, or

      - tell the user that `customize-face' fails with GTK and that
        the user must modify his or her ~/.emacs.d/gtkrc file.  The
        work to be done to the ~/.emacs.d/gtkrc file needs to be
        described in a manner that a novice can understand.

As for the documentation, 

    * if customize is modified to customize GTK scroll bar faces, the
    documentation needs to be rewritten so that a moderate expert can
    follow it;

    * if customize is modified to tell people when it fails, the
    documentation needs to be rewritten so a novice can write a
    ~/.emacs.d/gtkrc file and achieve his or her desired results.

You mention

   I personally use the native scroll-bar, ...

I usually do as well.  However, it is it worth testing Emacs built
with the GTK toolkit every so often.  I fear it is not tested enough.

--
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 13:08       ` Robert J. Chassell
@ 2003-09-28 16:38         ` Jan D.
  2003-09-28 21:17           ` Robert J. Chassell
  2003-09-28 16:42         ` Luc Teirlinck
  1 sibling, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-09-28 16:38 UTC (permalink / raw)
  Cc: emacs-devel

>
> No -- I just tried several variations on how to create a
> ~/.emacs.d/gtkrc file and none worked.  (I also tried putting the
> variations into ~/.gtkrc-2.0 just in case ~/.emacs.d/gtkrc was the
> wrong name for the Emacs-specific file; that also failed.)
>
> This is a problem with the documentation.  It should be clear enough.

Yes it should and I am sure it can be improved.  But I need to know
why it failed for you.  Can you mail some of the attempts you tried?
Also, what is your theme?  Themes that use pixmaps for scrollbars
also have the side effect that scrollbars can not be customized in
any way w.r.t. foreground and/or background.  This could be added to
the documentation.

There are some problems with GTK themes and Emacs faces that are
hard to resolve:

The faces Emacs have can not represent all scrollbars that GTK can draw,
due to the fact that scrollbars can use pixmaps, and faces can't.

Themes can change at runtime.  I currently know of any good way for
Emacs to know when this happens, but it probably can be detected.

GTK/Gnome users expect to be able to switch themes at runtime.  If there
is a customized face, what should take precedence?

And as said before, in some instances the scrollbar can not be changed
due to the restrictions of the theme.

GTK is not very good at customizing widgets, the mechanism that exists
is basically just there for the implementation of themes.  That is the
only supported way to change the look of GTK.  Emacs faces does not
go well with that.  We can add more to the documentation about
the restrictions, I guess.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 13:08       ` Robert J. Chassell
  2003-09-28 16:38         ` Jan D.
@ 2003-09-28 16:42         ` Luc Teirlinck
  2003-09-28 18:01           ` Luc Teirlinck
  2003-09-28 21:25           ` Robert J. Chassell
  1 sibling, 2 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-28 16:42 UTC (permalink / raw)
  Cc: emacs-devel

Robert Chassell wrote:

   But the problem is worse than inadaquate documentation.  The current
   message from `customize-face' is *false*.  The `customize-face' method
   tells you that it has changed the foreground and background faces of
   the scroll bars when it has not.

I do not know exactly what you are referring to.  Is it the "State"
message, like:

 State: you have set this face, but not saved it for future sessions.

Strictly speaking this is accurate and relevant even if it has no
effect on the scroll bar.  It does not say that you have successfully
changed the colors of the scroll bar, it says that you have set the
face.  You can use any face for any purpose whatsoever.  When Emacs
functions prompt for a face, I often use faces that are normally used
for something completely different, as long as I know that there will
be no conflict between the two uses.  Maybe the documentation string
could be improved.

   The `customize-face RET scroll-bar' feature needs to

       * check for the tool kit in use and
	 if it is `GTK+' {i.e, if (featurep 'gtk) returns t},

	 - either have `customize-face' do the right thing, whatever that
	   be, or

	 - tell the user that `customize-face' fails with GTK and that
	   the user must modify his or her ~/.emacs.d/gtkrc file.  The
	   work to be done to the ~/.emacs.d/gtkrc file needs to be
	   described in a manner that a novice can understand.

I do not know a lot about GTK.  Somebody who does (Jan?) could tell
you whether your first suggestion is possible at all, as well as
answer your other GTK related questions.  In as far as the second
suggestion is concerned, I believe that this information should be
conveyed in the documentation string, not through an error message.
Somebody may have several builds of Emacs and want to use the same
.emacs for all of them or may want to use the face for his own
purposes.  The information actually is conveyed in the documentation
string, though maybe not clearly enough:

Basic face for the scroll bar colors under X.
                                     ^^^^^^^^
There are some other problems.  I will follow up on them.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-27 18:16   ` Robert J. Chassell
  2003-09-27 21:55     ` Luc Teirlinck
@ 2003-09-28 17:37     ` Luc Teirlinck
  2003-09-28 21:33       ` Robert J. Chassell
  1 sibling, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-28 17:37 UTC (permalink / raw)
  Cc: emacs-devel

Robert Chassell wrote:

   I would like to change the colors both of the foreground (the
   `thumb') and the background (the `trough') of the scroll bars.

Your question concerned GTK.  Jan answered it.  We know that we can do
it easily for the native scroll bar.  But most people will wind up
using the default scroll bar, not necessarily because they prefer that
one, but because it is the default.  That default is now the Xaw3d
scroll bar.  What about that one?

Apparently, it completely ignores the :foreground attribute, only
:background matters.  It applies to both thumb and trough.  I do not
know whether this should be considered a bug, after all it is a "3d"
scroll bar.  However, some people may have trouble seeing the thumb if
it has the same color as the trough.  (I myself do not have that much
trouble distinguishing the thumb, for the default "grey75" color.  I
find the native scroll bar somewhat more comfortable to the eye in
this respect, however.)

I do not know what happens with LessTif/Motif.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 16:42         ` Luc Teirlinck
@ 2003-09-28 18:01           ` Luc Teirlinck
  2003-09-28 21:38             ` Robert J. Chassell
  2003-09-28 21:25           ` Robert J. Chassell
  1 sibling, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-28 18:01 UTC (permalink / raw)
  Cc: bob, emacs-devel

>From my previous message:

   The information actually is conveyed in the documentation
   string, though maybe not clearly enough:

   Basic face for the scroll bar colors under X.
					^^^^^^^^

I am not sure here.  The reason why I think of this as excluding GTK
is because, unlike Lucid and LessTif, GTK does not use X resources.
But, if it can not be made to work under GTK, it probably would be
better to point this out explicitly.  Of course, if :foreground could
not be made to work under Xaw3d, then that should be pointed out in
the documentation string too.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 16:38         ` Jan D.
@ 2003-09-28 21:17           ` Robert J. Chassell
  2003-09-29 16:01             ` Jan D.
  0 siblings, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-28 21:17 UTC (permalink / raw)
  Cc: emacs-devel

    Yes it should and I am sure it can be improved.  But I need to
    know why it failed for you.  Can you mail some of the attempts you
    tried?

In both ~/.emacs.d/gtkrc and ~/.gtkrc-2.0, I tried

    style "dark_bg_scrollbar_style"
     {
       bg[NORMAL] = "green"
       fg[NORMAL] = "red"
     }

    widget_class "*Emacs.pane.emacs.verticalScrollbar*" style "dark_bg_scrollbar_style"


and


    style "dark_bg_scrollbar_style"
      {
        bg[ACTIVE] = "green"
        fg[ACTIVE] = "red"
      }

    widget_class "*verticalScrollbar*" style "dark_bg_scrollbar_style"


and the same with `widget' substituting for `widget_class', and
without `*', and with the long and short names for both
{widget|widget_class}.  (I made a lot of attempts.) (Obviously, green
and red are not good colors, but they would stand out when I reran a
new instance of Emacs).

I based these attempts on a working entry for style "menufont".

    Emacs faces does not go well with that.  We can add more to the
    documentation about the restrictions, I guess.

Yes, please add more to the documentation.  Also, please be sure to
add to the customize command, since many people will use it without
reading the documentation.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 16:42         ` Luc Teirlinck
  2003-09-28 18:01           ` Luc Teirlinck
@ 2003-09-28 21:25           ` Robert J. Chassell
  1 sibling, 0 replies; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-28 21:25 UTC (permalink / raw)
  Cc: emacs-devel

I wrote:

      But the problem is worse than inadaquate documentation.  The current
      message from `customize-face' is *false*.  The `customize-face' method
      tells you that it has changed the foreground and background faces of
      the scroll bars when it has not.

Luc Teirlinck responded:

   I do not know exactly what you are referring to.  Is it the "State"
   message, like:

    State: you have set this face, but not saved it for future sessions.

Yes, this is what was said -- but the trough and slider colors did
not change.

   Strictly speaking this is accurate and relevant even if it has no
   effect on the scroll bar.  It does not say that you have successfully
   changed the colors of the scroll bar, it says that you have set the
   face.  

The message is misleading.  Rather that say

    you have set this face, 

it should say

    you have set this face, but that may do nothing to what you see;
    from your point of view as a user, this does nothing.

As you say

    Maybe the documentation string could be improved.

Exactly right.  At the moment, the documentation string comes across
as false.  It does not tell you what you see.

           - tell the user that `customize-face' fails with GTK and that
              the user must modify his or her ~/.emacs.d/gtkrc file.  The
              work to be done to the ~/.emacs.d/gtkrc file needs to be
              described in a manner that a novice can understand.

   .... In as far as the second suggestion is concerned, I believe
   that this information should be conveyed in the documentation
   string, not through an error message.

It *must* be in the error message for the action.  Otherwise, people
will think the customize feature is broken when it tells them
misleading information.  (And, in any case, many will not read the
documentation that tells them that the error message will be wrong.)

   Basic face for the scroll bar colors under X.
                                        ^^^^^^^^
I am running under X, not under Fresno or any other windowing system.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 17:37     ` Luc Teirlinck
@ 2003-09-28 21:33       ` Robert J. Chassell
  2003-09-28 22:03         ` Luc Teirlinck
  0 siblings, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-28 21:33 UTC (permalink / raw)
  Cc: emacs-devel

I wrote:

      I would like to change the colors both of the foreground (the
      `thumb') and the background (the `trough') of the scroll bars.

Luc Teirlinck responded:

   Your question concerned GTK.  Jan answered it.  

No, he did not.  I made a great many attempts and failed.  There is a
bug both in the `customize-face' function and a bug in the
documentation.

    We know that we can do it easily for the native scroll bar.  

But this is specifically for the GTK scroll bar.  As I said, it is
worth testing these other scroll bars and writing accurate rather
than misleading or wrong documentation for them.  As a tester, please
run a non-default Emacs for a while.  It is useful for everyone.

   Apparently, it [I think you are referring to the native scroll bar,
   not the GTK scroll bar] completely ignores the :foreground
   attribute, only :background matters.

I don't know about this; if so, it is another bug to be fixed,
because, as you say

   ... some people may have trouble seeing the thumb if it has the
   same color as the trough. ....

You go on to say

   I do not know what happens with LessTif/Motif.

Neither do I.  Someone else needs test it.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 18:01           ` Luc Teirlinck
@ 2003-09-28 21:38             ` Robert J. Chassell
  2003-09-28 23:47               ` Luc Teirlinck
  2003-09-29 19:31               ` Richard Stallman
  0 siblings, 2 replies; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-28 21:38 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

      The information actually is conveyed in the documentation
      string, though maybe not clearly enough:

      Basic face for the scroll bar colors under X.
                                           ^^^^^^^^

   I am not sure here.  The reason why I think of this as excluding GTK
   is because, unlike Lucid and LessTif, GTK does not use X resources.

That does not matter.  In the case at hand, GTK is running under X.
It is not running under some other windowing system.  

If you want to say 

      Basic face for the scroll bar colors under toolkits like GTK
      that do not use X resources, even when running under X.

then please fix the documentation to say so.  Otherwise, the
documentation string falsely suggests that the feature applies to all
toolkits running under X.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 21:33       ` Robert J. Chassell
@ 2003-09-28 22:03         ` Luc Teirlinck
  0 siblings, 0 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-28 22:03 UTC (permalink / raw)
  Cc: emacs-devel

Robert Chassell wrote:

      Your question concerned GTK.  Jan answered it.  

   No, he did not. 

OK, I should have said: "Jan is taking care of it".

   As a tester, please run a non-default Emacs for a while.  It is
   useful for everyone.

I run a non-default Emacs all the time, except if I specifically want
to test the default behavior.  I normally use the native scrollbar:

./configure --without-toolkit-scroll-bars

This does not yield the default scroll bar you get with a simple
./configure, the Xaw3d scroll bar.

   Apparently, it [I think you are referring to the native scroll bar,
   not the GTK scroll bar] completely ignores the :foreground
   attribute, only :background matters.

In as far as your parenthetical remark (inside my original quote is
concerned), I was _not_ referring to the native scroll bar, that one
works completely OK, I was referring to the Xaw3d scroll bar, the one
you get if you simply run ./configure without worrying about scroll
bar choices.  I would guess that that is exactly what the vast
majority of Emacs users do.

   I don't know about this; if so, it is another bug to be fixed,

I do not know Xaw3d well enough to decide whether this is a bug in the
Emacs handling of Xaw3d or just a shortcoming (or lack of
customizability) of Xaw3d.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 21:38             ` Robert J. Chassell
@ 2003-09-28 23:47               ` Luc Teirlinck
  2003-09-29  0:52                 ` Robert J. Chassell
  2003-09-29 19:31               ` Richard Stallman
  1 sibling, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-28 23:47 UTC (permalink / raw)
  Cc: emacs-devel

Once we know exactly what the situation is for the Xaw3d,
Lesstif/Motif and GTK scroll bars, we can rewrite the documentation
string.  I do not believe that there is a need for a non-standard
"State" message or a mini-buffer error message.  I guess the user will
see that it has no effect.  Then he _will_ read the documentation.
The user could have legitimate reasons to customize the face, even if
he is using GTK.  He could be using several builds of Emacs with
different scroll bar types and want to use the same .emacs for all of
them.  Also, he might want to set that variable to look like his de
facto GTK face, anyway.  Then, for instance, if he is asked to specify
a face for something that looks somewhat similar to a scroll bar, he
can use scroll-bar.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 23:47               ` Luc Teirlinck
@ 2003-09-29  0:52                 ` Robert J. Chassell
  2003-09-29  1:30                   ` Luc Teirlinck
  0 siblings, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-29  0:52 UTC (permalink / raw)
  Cc: emacs-devel

   ... I guess the user will see that it has no effect.  Then he
   _will_ read the documentation.

If he sees that it has no effect he is not going to assume the lack of
effect is a feature; he is going to assume it is a bug.  Worse, there
is a good chance he will not read the documentation.  Unfortunately,
this is the way many people are, even some Emacs users.  :-(

   The user could have legitimate reasons to customize the face, even
   if he is using GTK.

Yes, you are right.  Very true.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29  0:52                 ` Robert J. Chassell
@ 2003-09-29  1:30                   ` Luc Teirlinck
  2003-09-29 11:58                     ` Robert J. Chassell
  0 siblings, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-29  1:30 UTC (permalink / raw)
  Cc: emacs-devel

Robert Chassell wrote:

   If he sees that it has no effect he is not going to assume the lack of
   effect is a feature; he is going to assume it is a bug.  Worse, there
   is a good chance he will not read the documentation.  Unfortunately,
   this is the way many people are, even some Emacs users.  :-(

Yes, but in this case the documentation is staring the user straight
in the face.  He has to actively "look the other way" not to see it.
Currently we have (in the customization buffer):

Scroll Bar face: (sample) Hide Face
   State: this face has not been changed with customize.
Basic face for the scroll bar colors under X.

Now we can change this line to say:

Scroll Bar face: (sample) Hide Face
   State: this face has not been changed with customize.
Basic face for non-GTK scroll bar colors under X.

Custom has a very small number of standard "State" lines and we should
be really careful before starting to mess with that system.  If the
user does not look at the standard line that tells him what the face
is for, then why would he bother reading the "State" line, anyway?
Why would he bother checking whether there is a message printed in the
echo area?

Note that normally, when browsing faces, the user does not even get to
see the "State" line, he _only_ sees the documentation.  From the
parent group, one normally sees:

Scroll Bar face: (sample) Show Face
   State: hidden, invoke "Show" in the previous line to show.
Basic face for the scroll bar colors under X.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29  1:30                   ` Luc Teirlinck
@ 2003-09-29 11:58                     ` Robert J. Chassell
  2003-09-30 12:22                       ` Richard Stallman
  0 siblings, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-29 11:58 UTC (permalink / raw)
  Cc: emacs-devel

   Yes, but in this case the documentation is staring the user straight
   in the face.  

    Basic face for non-GTK scroll bar colors under X.

This does not go far enough.  You should not be able to enter a
customization buffer when customization does not work.

When a person tried to customize the colors of troughs and sliders
when running GTK in Windows (i.e., `under X' even if he or she is not
using X resoures other than those used to operate the window),
a message like this

    Scroll Bar face cannot be customized under GTK using customize-face

should be displayed at the earliest possible moment, right after
you type

    M-x customize-face RET scroll-bar RET

The message should appear *instead of* a customization buffer, since you
cannot customize.

When customization fails, you should not ever receive a customization
buffer.  To be dropped into one that does not work is a bug.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 21:17           ` Robert J. Chassell
@ 2003-09-29 16:01             ` Jan D.
  2003-09-29 19:05               ` Robert J. Chassell
  0 siblings, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-09-29 16:01 UTC (permalink / raw)
  Cc: emacs-devel

>     Yes it should and I am sure it can be improved.  But I need to
>     know why it failed for you.  Can you mail some of the attempts you
>     tried?
> 
> In both ~/.emacs.d/gtkrc and ~/.gtkrc-2.0, I tried
> 
>     style "dark_bg_scrollbar_style"
>      {
>        bg[NORMAL] = "green"
>        fg[NORMAL] = "red"
>      }
> 
>     widget_class "*Emacs.pane.emacs.verticalScrollbar*" style "dark_bg_scrollbar_style"
> 
> 
> and
> 
> 
>     style "dark_bg_scrollbar_style"
>       {
>         bg[ACTIVE] = "green"
>         fg[ACTIVE] = "red"
>       }
> 
>     widget_class "*verticalScrollbar*" style "dark_bg_scrollbar_style"

Ouch, I've put a typo in to the manual (now fixed).  verticalScrollbar
shall be verticalScrollBar (capital B).  If you change that and
widget_class to widget, does it help?

>     Emacs faces does not go well with that.  We can add more to the
>     documentation about the restrictions, I guess.
> 
> Yes, please add more to the documentation.  Also, please be sure to
> add to the customize command, since many people will use it without
> reading the documentation.

The problem is that these restrictions are not documented by GTK (for
example the fact that pixmap based scrollbars does not allow changes
for colors), so we just find them as they happen.

One extreme "solution" is to make Emacs behave as other GTK applications,
that is provide no customizations at all, except through themes.  That makes
documentation a whole lot simpler :-).

Until then, I'll add an example for this case to the manual next week
(going away for a week just now).

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29 16:01             ` Jan D.
@ 2003-09-29 19:05               ` Robert J. Chassell
  2003-09-29 19:23                 ` Jan D.
  0 siblings, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-29 19:05 UTC (permalink / raw)
  Cc: emacs-devel

   Ouch, I've put a typo in to the manual (now fixed).  verticalScrollbar
   shall be verticalScrollBar (capital B).  If you change that and
   widget_class to widget, does it help?

Yes, it does help, but not enough.  It does not change the foreground
(the `thumb') and the background (the `trough') as intended.

First, I put this in my ~/.gtkrc-2.0 file:

     style "dark_bg_scrollbar_style"
       {
         bg[ACTIVE] = "red"
         fg[ACTIVE] = "green"
       }

     widget "*verticalScrollBar*" style "dark_bg_scrollbar_style"

This changes the color of the *side* of the thumb, not its top.  Green
appears on the left side of the thumb and red appears on the right
side.  Also, the arrows at the ends of the trough turn red.

In other words, the foreground and background are not changed.

Moreover, those colors did not change when I changed the colors in
my ~/.gtkrc-2.0 file entry.

So removed that entry and put in a new one, with a different name:

     style "dark_bg_test1_scrollbar_style"
       {
         bg[ACTIVE] = "blue"
         fg[ACTIVE] = "white"
       }

     widget "*verticalScrollBar*" style "dark_bg_test1_scrollbar_style"

This did the same as before, but with nicer colors.

I also tried

     style "dark_bg_test2_scrollbar_style"
       {
         bg = "blue"
         fg = "white"
       }

     widget "*verticalScrollBar*" style "dark_bg_test2_scrollbar_style"

which did nothing except produce these error messages when running
GDB (I have folded the lines for readability)

    Starting program: /usr/local/src/emacs/src/emacs -q --no-site-file \
             --eval '(blink-cursor-mode 0)'

    /home/bob/.gtkrc-2.0:61: error: unexpected character `=', \
             expected character `['

    /home/bob/.gtkrc-2.0:61: error: unexpected character `=', \
             expected character `['


The spelling correction is a big step forward.  But the action does
not change the foreground and background colors as desired.
The suggestion provides a method that still fails.

Hmmm.... I just removed all the ScrollBar related text from my
~/.gtkrc-2.0 file and put a newly named definition into my
~/.emacs.d/gtkrc file:

     style "dark_bg_test0_scrollbar_style"
       {
         bg[ACTIVE] = "red"
         fg[ACTIVE] = "green"
       }

     widget "*verticalScrollBar*" style "dark_bg_test0_scrollbar_style"

In this one, green does not appear.  The right side of the thumb
becomes red, but the arrows at the ends of the trough stay dark.  As
before, the foreground and background are not changed.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29 19:05               ` Robert J. Chassell
@ 2003-09-29 19:23                 ` Jan D.
  0 siblings, 0 replies; 54+ messages in thread
From: Jan D. @ 2003-09-29 19:23 UTC (permalink / raw)
  Cc: emacs-devel

>    Ouch, I've put a typo in to the manual (now fixed).  verticalScrollbar
>    shall be verticalScrollBar (capital B).  If you change that and
>    widget_class to widget, does it help?
> 
> Yes, it does help, but not enough.  It does not change the foreground
> (the `thumb') and the background (the `trough') as intended.
> 
> First, I put this in my ~/.gtkrc-2.0 file:
> 
>      style "dark_bg_scrollbar_style"
>        {
>          bg[ACTIVE] = "red"
>          fg[ACTIVE] = "green"
>        }
> 
>      widget "*verticalScrollBar*" style "dark_bg_scrollbar_style"
> 
> This changes the color of the *side* of the thumb, not its top.  Green
> appears on the left side of the thumb and red appears on the right
> side.  Also, the arrows at the ends of the trough turn red.
> 
> In other words, the foreground and background are not changed.
> 
> Moreover, those colors did not change when I changed the colors in
> my ~/.gtkrc-2.0 file entry.

I suggest sticking to ~/.emacs.d/gtkrc.  ~/gtkrc-2.0 has problems
when running Gnome (i.e. Gconf takes precedence).

Here is the example I will put in the manual.  It is possible that
the combination you want is impossible to achive.  For example, it
is not possible to have different colors for the background around the
arrows and the thumb.

style "scroll"
{
  fg[NORMAL] = "red"     # The arrow color.
  bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
  bg[ACTIVE] = "blue"    # The trough color.
  bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
}

widget_class "*GtkVScrollbar" style "scroll" 

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-28 21:38             ` Robert J. Chassell
  2003-09-28 23:47               ` Luc Teirlinck
@ 2003-09-29 19:31               ` Richard Stallman
  2003-09-30  0:11                 ` Luc Teirlinck
  2003-09-30  0:27                 ` Robert J. Chassell
  1 sibling, 2 replies; 54+ messages in thread
From: Richard Stallman @ 2003-09-29 19:31 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

	  Basic face for the scroll bar colors under X.
					       ^^^^^^^^

       I am not sure here.  The reason why I think of this as excluding GTK
       is because, unlike Lucid and LessTif, GTK does not use X resources.

    That does not matter.  In the case at hand, GTK is running under X.
    It is not running under some other windowing system.  

That is correct.

    If you want to say 

	  Basic face for the scroll bar colors under toolkits like GTK
	  that do not use X resources, even when running under X.

    then please fix the documentation to say so.

This would be documenting the bug.  That would be an improovement, but
what we really should do if at all feasible is fix the bug.  This face
should have its special effect for all toolkits.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29 19:31               ` Richard Stallman
@ 2003-09-30  0:11                 ` Luc Teirlinck
  2003-09-30 13:55                   ` Stefan Monnier
  2003-09-30 20:25                   ` Richard Stallman
  2003-09-30  0:27                 ` Robert J. Chassell
  1 sibling, 2 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-09-30  0:11 UTC (permalink / raw)
  Cc: bob, emacs-devel

Richard Stallman wrote:

   This would be documenting the bug.  That would be an improovement, but
   what we really should do if at all feasible is fix the bug.  This face
   should have its special effect for all toolkits.

The _same_ special effect?

Let us set :foreground to blue and :background to red in the
scroll-bar face.  What happens?

Native scrollbar:

Has a thumb and a trough.  Thumb is blue, trough is red.  Wonderful.

Xaw3d scrollbar:  The default scroll bar.

Has a thumb and a trough.  Both are red.  :foreground does not seem to
have any effect on anything.  

Is this a bug or is it quite simply not possible to give both
different colors?

Motif:

Has a thumb, a trough and two arrows.  Thumb and arrows are red.  Color
of trough is still the same old grey. :foreground does not seem to
have any effect on anything. 

Is this a bug or is the trough color "hard coded" to be grey?  Is it
possible to give the arrows a different color from the thumb using X
resources and if so how do we allow the user to specify three colors
using the scrollbar face?

GTK:

Only one of the four I did not try out myself, but Bob tried it and
found that it had no effect whatsoever.  things do not seem easy,
however.  If nothing else, to quote Jan:

style "scroll"
{
  fg[NORMAL] = "red"     # The arrow color.
  bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
  bg[ACTIVE] = "blue"    # The trough color.
  bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
}

Those are four colors to customize.  If we want full customizability
through Custom, we would have to allow the user to specify four
colors.

>From the above we see: four different scroll bars, four entirely
different behaviors.

Unless somebody else knows a lot about GTK, we might have to wait a
week until Jan is back to further discuss the GTK case.

Does anybody know more about the Xaw3d and Motif scroll bars?  Stefan?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29 19:31               ` Richard Stallman
  2003-09-30  0:11                 ` Luc Teirlinck
@ 2003-09-30  0:27                 ` Robert J. Chassell
  2003-09-30 20:24                   ` Richard Stallman
                                     ` (2 more replies)
  1 sibling, 3 replies; 54+ messages in thread
From: Robert J. Chassell @ 2003-09-30  0:27 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

    That would be an improovement, but what we really should do if at
    all feasible is fix the bug.

I agree with you.  But I don't know what to do.  Incidentally, the
scroll bars in Emacs configured with --with-x-toolkit=gtk look
different than the scroll bars on my xterms and on my instances of
Galeon.  It turns out the feature is not common throughout Gnome, at
least not in my instance of Gnome.

A very recent CVS snapshot, Mon, 2003 Sep 29 18:31 UTC
GNU Emacs 21.3.50.98 (i686-pc-linux-gnu, GTK+ Version 2.2.1)
started with

     /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

configured with  --with-x-toolkit=gtk

"Jan D." <jan.h.d@swipnet.se> wrote

    Here is the example I will put in the manual.  ....

    style "scroll"
    {
      fg[NORMAL] = "red"     # The arrow color.
      bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
      bg[ACTIVE] = "blue"    # The trough color.
      bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
    }

    widget_class "*GtkVScrollbar" style "scroll"

This does not have any effect.  I needed

    widget "*verticalScrollBar*"

instead of     widget_class "*GtkVScrollbar" 

and then, when with that, the two colors that took effect most of the
time were

      fg[NORMAL] = "red"     # The arrow color.
      bg[NORMAL] = "yellow"  # The thumb and background around the arrow.

The other two,

      bg[ACTIVE] = "blue"    # The trough color.
      bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.

did appear, but not very helpfully.  

The blue was *not* the trough color.  It appeared on the right side of
the thumb as a narrow line.  

The white did appear in the grey75 (or so, I estimate) top of the
thumb when I put the mouse over it, but I want to see the white thumb
against a dark background when I do not put the cursor over it.

The yellow fails to color the thumb; it only colors the left and top
sides of the thumb when the cursor is not over it.

The top of the thumb and the bottom of the trough are the default grey
colors when the cursor is not over the thumb.

As I said, I don't know what to do.  Perhaps your set up is showing
different colors.  If so, the Emacs documentation should explain what
to do when you use normal Gnome customizations.

In any event, I agree with you, this ought to be fixed.

--
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-29 11:58                     ` Robert J. Chassell
@ 2003-09-30 12:22                       ` Richard Stallman
  0 siblings, 0 replies; 54+ messages in thread
From: Richard Stallman @ 2003-09-30 12:22 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

    This does not go far enough.  You should not be able to enter a
    customization buffer when customization does not work.

Regarded as a general principle, that would be very hard to carry out.
Emacs has many customizable options that only have an effect in
certain situations.  In principle, we could try to disable the ability
to customize them when not in those situations, but that would be a
lot of work.

It would also be wrong, in a sense, because customizing these options
and saving the changes can be meaningful even if the current situation
is such that changing the option has no effect.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30  0:11                 ` Luc Teirlinck
@ 2003-09-30 13:55                   ` Stefan Monnier
  2003-09-30 14:25                     ` Miles Bader
  2003-10-04 18:29                     ` Jan D.
  2003-09-30 20:25                   ` Richard Stallman
  1 sibling, 2 replies; 54+ messages in thread
From: Stefan Monnier @ 2003-09-30 13:55 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

> Xaw3d scrollbar:  The default scroll bar.

> Has a thumb and a trough.  Both are red.  :foreground does not seem to
> have any effect on anything.  

> Is this a bug or is it quite simply not possible to give both
> different colors?

I don't know about the others, but I've looked at the code for Xaw3d
and it's not possible to have different colors for the trough and
the thumb.  The foreground color IIRC is used for the shading used
to give the 3d effect.


        Stefan

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30 13:55                   ` Stefan Monnier
@ 2003-09-30 14:25                     ` Miles Bader
  2003-09-30 15:16                       ` Stefan Monnier
  2003-10-04 18:29                     ` Jan D.
  1 sibling, 1 reply; 54+ messages in thread
From: Miles Bader @ 2003-09-30 14:25 UTC (permalink / raw)
  Cc: bob, Luc Teirlinck, rms, emacs-devel

On Tue, Sep 30, 2003 at 09:55:17AM -0400, Stefan Monnier wrote:
> I don't know about the others, but I've looked at the code for Xaw3d
> and it's not possible to have different colors for the trough and
> the thumb.

Yes, and I filed a bug report a long time ago about it (with debian, but I
think it the report got sent upstream).  So far it's apparently been ignored;
I think maybe not so many people care about xaw3d anymore...

I think the main annoyance with adding this feature to xaw3d would be that it
means allocating several more colors, and that's always a bit of a pain in X
apps.

-Miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30 14:25                     ` Miles Bader
@ 2003-09-30 15:16                       ` Stefan Monnier
  0 siblings, 0 replies; 54+ messages in thread
From: Stefan Monnier @ 2003-09-30 15:16 UTC (permalink / raw)
  Cc: bob, Luc Teirlinck, rms, emacs-devel

> Yes, and I filed a bug report a long time ago about it (with debian, but I
> think it the report got sent upstream).

I don't think there was any upstream.  You might want to try again, tho.
See http://www.visi.com/~hawkeyd/xaw3d.html or email
"D. J. Hawkey Jr." <hawkeyd@visi.com>.


        Stefan

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30  0:27                 ` Robert J. Chassell
@ 2003-09-30 20:24                   ` Richard Stallman
  2003-10-01  0:35                   ` Danilo Segan
  2003-10-04 18:11                   ` Jan D.
  2 siblings, 0 replies; 54+ messages in thread
From: Richard Stallman @ 2003-09-30 20:24 UTC (permalink / raw)
  Cc: teirllm, emacs-devel

    I agree with you.  But I don't know what to do.  Incidentally, the
    scroll bars in Emacs configured with --with-x-toolkit=gtk look
    different than the scroll bars on my xterms and on my instances of
    Galeon.  It turns out the feature is not common throughout Gnome, at
    least not in my instance of Gnome.

Does anyone know why that is?

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30  0:11                 ` Luc Teirlinck
  2003-09-30 13:55                   ` Stefan Monnier
@ 2003-09-30 20:25                   ` Richard Stallman
  2003-10-04 18:36                     ` Jan D.
  1 sibling, 1 reply; 54+ messages in thread
From: Richard Stallman @ 2003-09-30 20:25 UTC (permalink / raw)
  Cc: bob, emacs-devel

       This would be documenting the bug.  That would be an improovement, but
       what we really should do if at all feasible is fix the bug.  This face
       should have its special effect for all toolkits.

    The _same_ special effect?

Yes, to the extent it makes sense.

    Native scrollbar:

    Has a thumb and a trough.  Thumb is blue, trough is red.  Wonderful.

    Xaw3d scrollbar:  The default scroll bar.

    Has a thumb and a trough.  Both are red.  :foreground does not seem to
    have any effect on anything.  

    Is this a bug or is it quite simply not possible to give both
    different colors?

That's a bug.

    Motif:

    Has a thumb, a trough and two arrows.  Thumb and arrows are red.  Color
    of trough is still the same old grey. :foreground does not seem to
    have any effect on anything. 

That's a bug.

    Only one of the four I did not try out myself, but Bob tried it and
    found that it had no effect whatsoever.  things do not seem easy,
    however.

That's a bug.

    {
      fg[NORMAL] = "red"     # The arrow color.
      bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
      bg[ACTIVE] = "blue"    # The trough color.
      bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
    }

    Those are four colors to customize.  If we want full customizability
    through Custom, we would have to allow the user to specify four
    colors.

Maybe we want two or three faces to specify all these colors.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30  0:27                 ` Robert J. Chassell
  2003-09-30 20:24                   ` Richard Stallman
@ 2003-10-01  0:35                   ` Danilo Segan
  2003-10-04  0:35                     ` Robert J. Chassell
  2003-10-04 18:43                     ` Jan D.
  2003-10-04 18:11                   ` Jan D.
  2 siblings, 2 replies; 54+ messages in thread
From: Danilo Segan @ 2003-10-01  0:35 UTC (permalink / raw)
  Cc: emacs-devel

Robert J. Chassell wrote:
> I agree with you.  But I don't know what to do.  Incidentally, the
> scroll bars in Emacs configured with --with-x-toolkit=gtk look
> different than the scroll bars on my xterms and on my instances of
> Galeon.  It turns out the feature is not common throughout Gnome, at
> least not in my instance of Gnome.

Mine Gnome (2.4.0) and Emacs 21.3.50.5 (a bit old, was it late June or  
July, I don't recall) doesn't have this problem.

xterm does show a different scrollbar, because it's not using the same  
toolkit (Gtk+), but Galeon 1.3.7, Emacs, and all the other apps show  
scroll bars as set in my theme.

> 
> The blue was *not* the trough color.  It appeared on the right side  
> of the thumb as a narrow line.

For me, blue appeared as background of the arrow buttons when I pressed  
and held arrow buttons.

> The white did appear in the grey75 (or so, I estimate) top of the
> thumb when I put the mouse over it, but I want to see the white thumb
> against a dark background when I do not put the cursor over it.

This seems to be a theme issue to me. I'll try to find out later if  
there's a Gtk+ theme which has a greater contrast between the thumb and  
the entire bar (you may also try looking at art.gnome.org in Gtk+  
section, if you find some spare time)

> The yellow fails to color the thumb; it only colors the left and top
> sides of the thumb when the cursor is not over it.

Perhaps I'd need to check with a more recent Emacs CVS version, since  
for me, the entire bar and thumb (ok, I'm not really sure what is  
"thumb" in this context, but I hope I got it right ;-) are yellow.

> 
> The top of the thumb and the bottom of the trough are the default  
> grey colors when the cursor is not over the thumb.
> 
> As I said, I don't know what to do.  Perhaps your set up is showing
> different colors.  If so, the Emacs documentation should explain what
> to do when you use normal Gnome customizations.

For a start, I'm certain that there're no such problems in 21.3.50.5  
from 2003-06-30. I've updated Emacs from CVS, and I might try it again  
with it. If it turns out to work like you describe, the bug must have  
been introduced somewhere in between.

As a sidenote, I expect most of the people using Gtk+ toolkit to use  
the default desktop theme, because that's what they chose for other  
apps too.


Cheers,
Danilo

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-01  0:35                   ` Danilo Segan
@ 2003-10-04  0:35                     ` Robert J. Chassell
  2003-10-04 18:55                       ` Jan D.
  2003-10-04 18:43                     ` Jan D.
  1 sibling, 1 reply; 54+ messages in thread
From: Robert J. Chassell @ 2003-10-04  0:35 UTC (permalink / raw)


Yesterday's CVS snapshot, Sat, 2003 Oct  3 23:58 UTC
GNU Emacs 21.3.50.102 (i686-pc-linux-gnu, GTK+ Version 2.2.1)
started with

     /usr/local/bin/emacs -q --no-site-file --eval '(blink-cursor-mode 0)'

configured with  --with-x-toolkit=gtk

Success!

I can now specify the forground (thumb) and background (trough) colors
for my vertical scroll bar in my ~/.emacs.d/gtkrc file, which looks
like this:

style "scrollbar"
{
  fg[NORMAL] = "red"             # The arrow color.
  bg[NORMAL] = "yellow"          # The thumb and background around the arrow.
  bg[ACTIVE] = "cornflower blue" # The trough color.
  bg[PRELIGHT] = "white"         # The thumb color when the mouse is over it.
}

widget "*verticalScrollBar*" style "scrollbar"

This configuration does not specify the color for the thumb when the
mouse is not over it, but the color (actually, it is a pattern) that
comes with the theme is OK.  What is the specification for it?
Likewise, how do you specify a pattern for the trough?  (It was some
sort of textured vertical gradient.  I would like to create a textured
pattern of the right color for the trough.)

The Emacs customization feature, 

   M-x customize-face RET scroll-bar 

has no effect in an Emacs configured with --with-x-toolkit=gtk, but at
least the modification of ~/.emacs.d/gtkrc is successful.

Who made the change?  Was it in GNU Emacs or in GTK?  (I updated both
my GNU Emacs and my Debian testing distribution at the same time, so
I cannot track the change readily.)  In any case, many thanks!

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                             bob@rattlesnake.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30  0:27                 ` Robert J. Chassell
  2003-09-30 20:24                   ` Richard Stallman
  2003-10-01  0:35                   ` Danilo Segan
@ 2003-10-04 18:11                   ` Jan D.
  2003-10-05  0:25                     ` Miles Bader
  2 siblings, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-10-04 18:11 UTC (permalink / raw)
  Cc: teirllm, rms, emacs-devel

Robert J. Chassell wrote:
>     That would be an improovement, but what we really should do if at
>     all feasible is fix the bug.
> 
> I agree with you.  But I don't know what to do.  Incidentally, the
> scroll bars in Emacs configured with --with-x-toolkit=gtk look
> different than the scroll bars on my xterms and on my instances of
> Galeon.  It turns out the feature is not common throughout Gnome, at
> least not in my instance of Gnome.

As Danilo Segan pointed out, xterm is not a GTK application.  I can not see 
thais difference you talk about in other Gnome applications. I do not have 
Galeon unfortunately, so I can not check that.

> This does not have any effect.  I needed
> 
>     widget "*verticalScrollBar*"
> 
> instead of     widget_class "*GtkVScrollbar" 
> 
> and then, when with that, the two colors that took effect most of the
> time were
> 
>       fg[NORMAL] = "red"     # The arrow color.
>       bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
> 
> The other two,
> 
>       bg[ACTIVE] = "blue"    # The trough color.
>       bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
> 
> did appear, but not very helpfully.  
> 
> The blue was *not* the trough color.  It appeared on the right side of
> the thumb as a narrow line.  

This suggests you have a pixmap based theme.  These can not be customized in 
any reliable way.  Some themse give some effects, others are totally unchanged. 
  You did not say what theme you use.


> As I said, I don't know what to do.  Perhaps your set up is showing
> different colors.  If so, the Emacs documentation should explain what
> to do when you use normal Gnome customizations.
> 
> In any event, I agree with you, this ought to be fixed.

I am more leaning towards removing all customability in the GTK version of 
Emacs.  Mainly because the mechanisms used are not well documented in GTK, they 
have confusing effects depending on what theme you use, but perhaps the most 
important argument, GTK/Gnome has stated that the only customization they 
really support is by themes.

One of the reasons to have GTK in the first place is to get a consistent 
look-and-feel with other GTK/Gnome applications (granted Emacs uses different 
icons).  If customizations are needed, we can recommend another toolkit.

Thoughts?

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30 13:55                   ` Stefan Monnier
  2003-09-30 14:25                     ` Miles Bader
@ 2003-10-04 18:29                     ` Jan D.
  1 sibling, 0 replies; 54+ messages in thread
From: Jan D. @ 2003-10-04 18:29 UTC (permalink / raw)
  Cc: bob, Luc Teirlinck, rms, emacs-devel

Stefan Monnier wrote:
>>Xaw3d scrollbar:  The default scroll bar.
> 
> 
>>Has a thumb and a trough.  Both are red.  :foreground does not seem to
>>have any effect on anything.  
> 
> 
>>Is this a bug or is it quite simply not possible to give both
>>different colors?
> 
> 
> I don't know about the others, but I've looked at the code for Xaw3d
> and it's not possible to have different colors for the trough and
> the thumb.  The foreground color IIRC is used for the shading used
> to give the 3d effect.

In Motif/Lesstif you can have different colours for the trough and the thumb. 
The arrows are the same colour as the thumb, you can't change them independently.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-09-30 20:25                   ` Richard Stallman
@ 2003-10-04 18:36                     ` Jan D.
  2003-10-05  3:24                       ` Richard Stallman
  2003-10-05 17:56                       ` Luc Teirlinck
  0 siblings, 2 replies; 54+ messages in thread
From: Jan D. @ 2003-10-04 18:36 UTC (permalink / raw)
  Cc: bob, Luc Teirlinck, emacs-devel

Richard Stallman wrote:
>        This would be documenting the bug.  That would be an improovement, but
>        what we really should do if at all feasible is fix the bug.  This face
>        should have its special effect for all toolkits.
> 
>     The _same_ special effect?
> 
> Yes, to the extent it makes sense.
> 
>     Native scrollbar:
> 
>     Has a thumb and a trough.  Thumb is blue, trough is red.  Wonderful.
> 
>     Xaw3d scrollbar:  The default scroll bar.
> 
>     Has a thumb and a trough.  Both are red.  :foreground does not seem to
>     have any effect on anything.  
> 
>     Is this a bug or is it quite simply not possible to give both
>     different colors?
> 
> That's a bug.
> 
>     Motif:
> 
>     Has a thumb, a trough and two arrows.  Thumb and arrows are red.  Color
>     of trough is still the same old grey. :foreground does not seem to
>     have any effect on anything. 
> 
> That's a bug.

This is possible to fix in Emacs.  The trough can be set in Motif.

> 
>     Only one of the four I did not try out myself, but Bob tried it and
>     found that it had no effect whatsoever.  things do not seem easy,
>     however.
> 
> That's a bug.

Yes, but where?  It may be a bug that Emacs gives the impression that this can 
be changed, or it may be a limitation in the theme used, for not letting the 
user change things.  It can also be a limitation in GTK itself.  Some 
customizations possible to do in GTK can lead to things being drawn 
incorrectly, this happens for scrollbars with pixmaps.

Maybe we should go the "official" GTK way and tell people to use themes for 
cuatomizations?


> 
>     {
>       fg[NORMAL] = "red"     # The arrow color.
>       bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
>       bg[ACTIVE] = "blue"    # The trough color.
>       bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
>     }
> 
>     Those are four colors to customize.  If we want full customizability
>     through Custom, we would have to allow the user to specify four
>     colors.
> 
> Maybe we want two or three faces to specify all these colors.

What sould those faces mean in other toolkits?  This still will not change the 
fact that pixmap based themes may not use these colours.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-01  0:35                   ` Danilo Segan
  2003-10-04  0:35                     ` Robert J. Chassell
@ 2003-10-04 18:43                     ` Jan D.
  2003-10-04 19:35                       ` Danilo Segan
  1 sibling, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-10-04 18:43 UTC (permalink / raw)
  Cc: bob, emacs-devel

Danilo Segan wrote:
> Robert J. Chassell wrote:
> 
>> The yellow fails to color the thumb; it only colors the left and top
>> sides of the thumb when the cursor is not over it.
> 
> 
> Perhaps I'd need to check with a more recent Emacs CVS version, since  
> for me, the entire bar and thumb (ok, I'm not really sure what is  
> "thumb" in this context, but I hope I got it right ;-) are yellow.

These aspect in Emacs has not changed in quite a while.  Themes GTK and Gnome 
has changed more, so different versions of them is likely to be the cause for 
the differences seen.

> As a sidenote, I expect most of the people using Gtk+ toolkit to use  
> the default desktop theme, because that's what they chose for other  
> apps too.

I think Emacs should just do that.  Like the text tool in Gnome that uses the 
theme look for all widgets (menus, dialogs), but lets you customize the text 
foreground and background colour.  GTK Emacs could behave like this, i.e. use 
faces as it does now for the text shown in buffers, but not for GTK widgets.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-04  0:35                     ` Robert J. Chassell
@ 2003-10-04 18:55                       ` Jan D.
  0 siblings, 0 replies; 54+ messages in thread
From: Jan D. @ 2003-10-04 18:55 UTC (permalink / raw)
  Cc: emacs-devel

Robert J. Chassell wrote:

> Who made the change?  Was it in GNU Emacs or in GTK?  (I updated both
> my GNU Emacs and my Debian testing distribution at the same time, so
> I cannot track the change readily.)  In any case, many thanks!
> 

It was not in Emacs.  Can be either of GTK, Gnome or the theme you use.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-04 18:43                     ` Jan D.
@ 2003-10-04 19:35                       ` Danilo Segan
  0 siblings, 0 replies; 54+ messages in thread
From: Danilo Segan @ 2003-10-04 19:35 UTC (permalink / raw)
  Cc: bob, Danilo Segan, emacs-devel

субота, 04. октобар 2003. 20:43:37 CEST — Jan D. написа:
> I think Emacs should just do that.  Like the text tool in Gnome that  
> uses the theme look for all widgets (menus, dialogs), but lets you  
> customize the text foreground and background colour.  GTK Emacs could  
> behave like this, i.e. use faces as it does now for the text shown in  
> buffers, but not for GTK widgets.

Yes, Emacs does it just fine for me, so I'm not complaining -- I just  
mentioned it to signal that it would be really rare to have users set  
Emacs scrollbar colors when using Gtk+, so bug (if there is any,  
because I don't see it) is minor.

What's else to add to "compatibility" might be making use of Gtk+ icons  
for toolbars, instead of the built-in ones. Of course, it would be even  
nicer to use Gtk+ toolbar, but that's a bit more work (methinks).

Cheers,
Danilo

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-04 18:11                   ` Jan D.
@ 2003-10-05  0:25                     ` Miles Bader
  2003-10-05  7:23                       ` Jan D.
  0 siblings, 1 reply; 54+ messages in thread
From: Miles Bader @ 2003-10-05  0:25 UTC (permalink / raw)
  Cc: bob, teirllm, rms, emacs-devel

On Sat, Oct 04, 2003 at 08:11:34PM +0200, Jan D. wrote:
> I am more leaning towards removing all customability in the GTK version of 
> Emacs.  Mainly because the mechanisms used are not well documented in GTK, 
> they have confusing effects depending on what theme you use, but perhaps 
> the most important argument, GTK/Gnome has stated that the only 
> customization they really support is by themes.

Well, I think to the extent that it's techically not a pain to do so, this
attitude on the part of GTK/Gnome should be resisted as much as possible.

It's certainly reasonable to put a big warning in the docs, like:

  THE GNOME MAINTAINERS ARE COMPLETE WANKERS, SO RESULTS OF GTK
  CUSTOMIZATIONS MAY NOT ALWAYS ACT IN A PREDICTABLE MANNER.

[Ok, maybe phrase it a bit differently]

Anyway, it's quite in keeping with emacs tradition to expose the
functionality and let those who wish to use it do so, even if you can't
guarantee the results; a warning should be enough.

> One of the reasons to have GTK in the first place is to get a consistent 
> look-and-feel with other GTK/Gnome applications (granted Emacs uses 
> different icons).  If customizations are needed, we can recommend another 
> toolkit.

That's completely absurd.

Perhaps the main goal of adding GTK support for you was `consistency,' which
is admirable, but please don't repeat the mistakes of the Gnome project by
deciding that `consistency' is so overarching a goal that it ought to trump
all others.

I use GTK because I _like it_, I think it's pretty, and I do like having the
same look as other apps.  On the other hand, I _also_ like customizations;
not every app is the same, and themes don't manage to capture all the
differences (not that GTK's customization facilities make it easy either).

Emacs is, I think, often more atypical than other apps, both for cultural
reasons (emacs users like their emacs, and usually have a pretty strong
opinion what that means), and simply because GTK is basically retro-fitted to
emacs, and so emacs will _never_ entirely conform to whatever rules other GTK
apps do.

Anyway, my main point is: document, don't enforce.

I apologize if any of the above seems obnoxious; I'm very grateful for the
work you've done in adding GTK support to emacs.

-Miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-04 18:36                     ` Jan D.
@ 2003-10-05  3:24                       ` Richard Stallman
  2003-10-05 17:56                       ` Luc Teirlinck
  1 sibling, 0 replies; 54+ messages in thread
From: Richard Stallman @ 2003-10-05  3:24 UTC (permalink / raw)
  Cc: bob, teirllm, emacs-devel

    >     Only one of the four I did not try out myself, but Bob tried it and
    >     found that it had no effect whatsoever.  things do not seem easy,
    >     however.
    > 
    > That's a bug.

    Yes, but where?

That depends on details I don't know.

    Maybe we should go the "official" GTK way and tell people to use themes for 
    cuatomizations?

I don't think so.  Emacs customization mechanisms ought to work if
they can.

    >     Those are four colors to customize.  If we want full customizability
    >     through Custom, we would have to allow the user to specify four
    >     colors.
    > 
    > Maybe we want two or three faces to specify all these colors.

    What sould those faces mean in other toolkits?

Nothing, I guess.  That is ok.

						    This still will not change the 
    fact that pixmap based themes may not use these colours.

Yes, but I don't see that as a problem.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05  0:25                     ` Miles Bader
@ 2003-10-05  7:23                       ` Jan D.
  2003-10-05  7:59                         ` Miles Bader
  0 siblings, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-10-05  7:23 UTC (permalink / raw)
  Cc: bob, teirllm, rms, emacs-devel

>> One of the reasons to have GTK in the first place is to get a 
>> consistent
>> look-and-feel with other GTK/Gnome applications (granted Emacs uses
>> different icons).  If customizations are needed, we can recommend 
>> another
>> toolkit.
>
> That's completely absurd.
>
> Perhaps the main goal of adding GTK support for you was `consistency,' 
> which
> is admirable, but please don't repeat the mistakes of the Gnome 
> project by
> deciding that `consistency' is so overarching a goal that it ought to 
> trump
> all others.

No, not the main goal, but one goal.  I like customizations, I think
Xt got that part right with X resources.  In an ideal world, I would
have liked GTK to have something similar.  But I see where Gnome/GTK
is headed, Gnome 1.4 is more customizable than 2.4.  Sawfish (the
default WM in 1.4) is more customizable than Metacity (default WM in
2.4).  Gnome is relying more and more on Gconf, the file based
customizations may be removed.  It has been stated that the first
priority for GTK is to make Gnome work.  It may also come to a point
where Gnome is needed for GTK apps.  Already bug reports on GTK
has been answered with "use this and that feature in Gnome".

I don't run Gnome, so I use the current customizations for GTK Emacs.
But shall we go against the direction GTK/Gnome is headed for?  Or just
accept the fact that GTK/Gnome has a different agenda an adopt to it?

> Anyway, my main point is: document, don't enforce.

This is a good advice, but I don't like things that sometimes
works and sometimes don't based on different surroundings (i.e. themes).

>
> I apologize if any of the above seems obnoxious; I'm very grateful for 
> the
> work you've done in adding GTK support to emacs.

Actually, I think we agree on what kind of customization we want.  The
question is, can we get it?

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05  7:23                       ` Jan D.
@ 2003-10-05  7:59                         ` Miles Bader
  0 siblings, 0 replies; 54+ messages in thread
From: Miles Bader @ 2003-10-05  7:59 UTC (permalink / raw)
  Cc: bob, emacs-devel, teirllm, rms, Miles Bader

On Sun, Oct 05, 2003 at 09:23:00AM +0200, Jan D. wrote:
> I don't run Gnome, so I use the current customizations for GTK Emacs.
> But shall we go against the direction GTK/Gnome is headed for?  Or just
> accept the fact that GTK/Gnome has a different agenda an adopt to it?

I think it's perfectly fine to resist, and the more vocally the better.

The Gnome team is perfectly free to ignore such entreaties, but they should
at least be aware that people don't like the directions they're going in.  We
know they're stubborn and opinionated, and many people have complained about
their newfound religion (`all users are the same') without much apparent
success.  None-the-less, I certainly don't intend to just shut up and go
along quietly.

>From my point of view GTK/Gnome has the best combination of features/
practicality/widespread-adoption of any of the current toolkits, so there's
definitely a reason to support it well; if the Gnome team can be badgered
into actually listening to their users, then it will simply be better.

-Miles
-- 
Fast, small, soon; pick any 2.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-04 18:36                     ` Jan D.
  2003-10-05  3:24                       ` Richard Stallman
@ 2003-10-05 17:56                       ` Luc Teirlinck
  2003-10-05 18:12                         ` Jan D.
  2003-10-06  2:22                         ` Miles Bader
  1 sibling, 2 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-05 17:56 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

Jan D. wrote:

   This still will not change the fact that pixmap based themes may
   not use these colours.

Do _only_ pixmap based themes create trouble with GTK customization?
If so, what percentage (very roughly) of themes are pixmap based?  If
say, only the theme actually named "Pixmap", or similar themes whose
name clearly indicates that they are pixmap based, would be affected,
we could just tell users not to use these themes, if they want full
customizability.  

If any theme whatsoever can yield one type of problem or another with
the type of non-theme GTK customizability we want, then I agree with
Jan.  Would it make any sense whatsoever to try to talk with GTK
people about our problems or is it obvious from prior experience that
this is just a waste of time?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 17:56                       ` Luc Teirlinck
@ 2003-10-05 18:12                         ` Jan D.
  2003-10-05 18:27                           ` Luc Teirlinck
  2003-10-06  2:22                         ` Miles Bader
  1 sibling, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-10-05 18:12 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

> Jan D. wrote:
>
>    This still will not change the fact that pixmap based themes may
>    not use these colours.
>
> Do _only_ pixmap based themes create trouble with GTK customization?
> If so, what percentage (very roughly) of themes are pixmap based?  If
> say, only the theme actually named "Pixmap", or similar themes whose
> name clearly indicates that they are pixmap based, would be affected,
> we could just tell users not to use these themes, if they want full
> customizability.

Of the 15 themes I have, 5 seems to be pixmap based.  The pixmap based
scroll bars does seem to be the ones that are immune to customizations.
The names does not indicate anything.  They have names like Grand 
Canyon,
Crux, Mist, Ocean Dream, etc.

> If any theme whatsoever can yield one type of problem or another with
> the type of non-theme GTK customizability we want, then I agree with
> Jan.  Would it make any sense whatsoever to try to talk with GTK
> people about our problems or is it obvious from prior experience that
> this is just a waste of time?

I'd say the later, but I might just have been unlucky w.r.t. getting my
GTK bug reports fixed.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 18:12                         ` Jan D.
@ 2003-10-05 18:27                           ` Luc Teirlinck
  2003-10-05 19:16                             ` Luc Teirlinck
  2003-10-05 20:57                             ` Jan D.
  0 siblings, 2 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-05 18:27 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

Jan D. wrote:

   The pixmap based scroll bars does seem to be the ones that are
   immune to customizations.  The names does not indicate anything.

But are the problems related to non-theme GTK customization completely
confined to scroll-bar (and maybe other color related) customizations
of pixmap based themes or are there problems all over the place?

Maybe naive question:

If I go to the Gnome "Control Center" and select "Theme Selector", or
use equivalent functionality to "preview" themes in other desktops,
are the pixmap based themes exactly those whose background clearly
"looks like a picture" instead of just some color, maybe with a
gradient?  Is there otherwise some standard way to find out whether a
theme is pixmap based?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 18:27                           ` Luc Teirlinck
@ 2003-10-05 19:16                             ` Luc Teirlinck
  2003-10-05 20:57                             ` Jan D.
  1 sibling, 0 replies; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-05 19:16 UTC (permalink / raw)
  Cc: bob, jan.h.d, rms, emacs-devel

>From my previous message:

   are the pixmap based themes exactly those whose background clearly
   "looks like a picture" instead of just some color, maybe with a
   gradient?

Apparently, there are themes, say "BrushedMetalClean" in Gnome, of
which, at first sight, I would have said that they just were of
uniform color (just my vision I guess), which on closer look seem to
use a pixmap (although, on the other hand, _that_ might be an artifact
of my vision, my monitor or my imagination).

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 18:27                           ` Luc Teirlinck
  2003-10-05 19:16                             ` Luc Teirlinck
@ 2003-10-05 20:57                             ` Jan D.
  2003-10-05 22:09                               ` Luc Teirlinck
  1 sibling, 1 reply; 54+ messages in thread
From: Jan D. @ 2003-10-05 20:57 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

> Jan D. wrote:
>
>    The pixmap based scroll bars does seem to be the ones that are
>    immune to customizations.  The names does not indicate anything.
>
> But are the problems related to non-theme GTK customization completely
> confined to scroll-bar (and maybe other color related) customizations
> of pixmap based themes or are there problems all over the place?

For the "standard" themes, only scrollbars seem to use pixmap.  But
there is nothing that excludes other themes to use background pixmaps
for other widget.s

>
> Maybe naive question:
>
> If I go to the Gnome "Control Center" and select "Theme Selector", or
> use equivalent functionality to "preview" themes in other desktops,
> are the pixmap based themes exactly those whose background clearly
> "looks like a picture" instead of just some color, maybe with a
> gradient?  Is there otherwise some standard way to find out whether a
> theme is pixmap based?

I know of no standard way, except by look or by checking the theme
specification files.  Obviously, none of these methods are available
programmatically.  Scroll bar thumbs that are not uniform, that is have
some lines or such in the middle, use pixmaps.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 20:57                             ` Jan D.
@ 2003-10-05 22:09                               ` Luc Teirlinck
  2003-10-06  0:14                                 ` Miles Bader
  0 siblings, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-05 22:09 UTC (permalink / raw)
  Cc: bob, rms, emacs-devel

Actually, it would seem that "full customizability" for GTK would mean
to be able to specify either a color _or_ a pixmap for all involved
faces.  I definitely have used (and am using) pixmaps, including
personal ones, for several applications, using Gnome as a desktop.
But, unless I am mistaken, Emacs only allows _colors_ for :foreground
and :background.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 22:09                               ` Luc Teirlinck
@ 2003-10-06  0:14                                 ` Miles Bader
  0 siblings, 0 replies; 54+ messages in thread
From: Miles Bader @ 2003-10-06  0:14 UTC (permalink / raw)
  Cc: bob, jan.h.d, rms, emacs-devel

On Sun, Oct 05, 2003 at 05:09:07PM -0500, Luc Teirlinck wrote:
> But, unless I am mistaken, Emacs only allows _colors_ for :foreground
> and :background.

That's true for standard emacs.  My hacked version allows pixmaps for
:background though... :-)

-Miles
-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-05 17:56                       ` Luc Teirlinck
  2003-10-05 18:12                         ` Jan D.
@ 2003-10-06  2:22                         ` Miles Bader
  2003-10-06  4:15                           ` Luc Teirlinck
  1 sibling, 1 reply; 54+ messages in thread
From: Miles Bader @ 2003-10-06  2:22 UTC (permalink / raw)
  Cc: bob, jan.h.d, rms, emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:
> If so, what percentage (very roughly) of themes are pixmap based?

Hard to say.  A pretty large proportion of the themes you find on
`themes.org' (well that's now defunct, but you know) are pixmap based.
Basically it's what you use if you want something really pretty and
unique; the other theme engines are not that bad, but tend to generate
pretty bland-looking results (e.g., they all basically look sort of like
windows with different colors and more rounded edges or something :-).

> If say, only the theme actually named "Pixmap", or similar themes
> whose name clearly indicates that they are pixmap based, would be
> affected, we could just tell users not to use these themes, if they
> want full customizability.

I don't think there's any easy way to tell.  Many users like pixmap
themes though, so I think they should be supported where possible
(sometimes it's simply not possible [or practical] of course).

-Miles
-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-06  2:22                         ` Miles Bader
@ 2003-10-06  4:15                           ` Luc Teirlinck
  2003-10-06  4:34                             ` Luc Teirlinck
  0 siblings, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-06  4:15 UTC (permalink / raw)
  Cc: bob, jan.h.d, rms, emacs-devel

Is there absolutely no way to override pixmap based themes and make
them use colors for the scroll bar by first setting all involved
pixmaps to "<none>".  I am not very familiar with GTK customization,
but I would normally have expected some variant of the stuff below to
work.  (Maybe it contains some errors, but is there any reason why the
general principle would not work?)  According to (emacs)GTK styles,
one should, unless I misunderstood, even be able to specify any pixmap
whatsoever, including personal ones, for the scroll bar faces.

I guess I should update my GTK version.  My dinosaur version seems to
use slightly different semantics (or so I believe), so I can not check
myself.  When I tried, it complained about "red" being an invalid
string constant.

style "scroll"
{
  bg_pixmap[NORMAL] = "<none>"
  bg_pixmap[INSENSITIVE] = "<none>"
  bg_pixmap[ACTIVE] = "<none>"
  bg_pixmap[PRELIGHT] = "<none>"

  fg[NORMAL] = "red"     # The arrow color.
  bg[NORMAL] = "yellow"  # The thumb and background around the arrow.
  bg[ACTIVE] = "blue"    # The trough color.
  bg[PRELIGHT] = "white" # The thumb color when the mouse is over it.
}

widget_class "*GtkVScrollbar" style "scroll"

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-06  4:15                           ` Luc Teirlinck
@ 2003-10-06  4:34                             ` Luc Teirlinck
  2003-10-12 15:04                               ` Jan D.
  0 siblings, 1 reply; 54+ messages in thread
From: Luc Teirlinck @ 2003-10-06  4:34 UTC (permalink / raw)
  Cc: bob, jan.h.d, emacs-devel, rms, miles

My previous message assumed that styles get "merged" like faces in
Emacs (and hence the pixmaps of the theme would still override the
user specified colors, unless first set to "<none>").  I could not
quite figure out from (emacs)GTK styles whether this is the case or
not, but maybe I did not read it well enough.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Changing the no-toolkit scrollbar thumb color. (minor issue)
  2003-10-06  4:34                             ` Luc Teirlinck
@ 2003-10-12 15:04                               ` Jan D.
  0 siblings, 0 replies; 54+ messages in thread
From: Jan D. @ 2003-10-12 15:04 UTC (permalink / raw)
  Cc: bob, miles, rms, emacs-devel

Luc Teirlinck wrote:
> My previous message assumed that styles get "merged" like faces in
> Emacs (and hence the pixmaps of the theme would still override the
> user specified colors, unless first set to "<none>").  I could not
> quite figure out from (emacs)GTK styles whether this is the case or
> not, but maybe I did not read it well enough.

It is, but that assumes the pixmaps has been set by things like 
bg_pixmap[NORMAL] = ...

In most cases, themes set pixmaps by defining "engines".  This is a mechanism 
that seems to be unaffected by any other cutomizations (I don't know if an 
engine can be redefined in another file).  I don't know how to define engines, 
and the documentation for it is very poor.  But you can see examples in your 
gnome distribution in the themes files under prefix/share/themes/*/gtkrc-2.0/gtkrc.

	Jan D.

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2003-10-12 15:04 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 20:13 Changing the no-toolkit scrollbar thumb color. (minor issue) Rob Browning
2003-09-26 21:23 ` Luc Teirlinck
2003-09-26 21:32   ` Rob Browning
2003-09-27 18:16   ` Robert J. Chassell
2003-09-27 21:55     ` Luc Teirlinck
2003-09-28 13:08       ` Robert J. Chassell
2003-09-28 16:38         ` Jan D.
2003-09-28 21:17           ` Robert J. Chassell
2003-09-29 16:01             ` Jan D.
2003-09-29 19:05               ` Robert J. Chassell
2003-09-29 19:23                 ` Jan D.
2003-09-28 16:42         ` Luc Teirlinck
2003-09-28 18:01           ` Luc Teirlinck
2003-09-28 21:38             ` Robert J. Chassell
2003-09-28 23:47               ` Luc Teirlinck
2003-09-29  0:52                 ` Robert J. Chassell
2003-09-29  1:30                   ` Luc Teirlinck
2003-09-29 11:58                     ` Robert J. Chassell
2003-09-30 12:22                       ` Richard Stallman
2003-09-29 19:31               ` Richard Stallman
2003-09-30  0:11                 ` Luc Teirlinck
2003-09-30 13:55                   ` Stefan Monnier
2003-09-30 14:25                     ` Miles Bader
2003-09-30 15:16                       ` Stefan Monnier
2003-10-04 18:29                     ` Jan D.
2003-09-30 20:25                   ` Richard Stallman
2003-10-04 18:36                     ` Jan D.
2003-10-05  3:24                       ` Richard Stallman
2003-10-05 17:56                       ` Luc Teirlinck
2003-10-05 18:12                         ` Jan D.
2003-10-05 18:27                           ` Luc Teirlinck
2003-10-05 19:16                             ` Luc Teirlinck
2003-10-05 20:57                             ` Jan D.
2003-10-05 22:09                               ` Luc Teirlinck
2003-10-06  0:14                                 ` Miles Bader
2003-10-06  2:22                         ` Miles Bader
2003-10-06  4:15                           ` Luc Teirlinck
2003-10-06  4:34                             ` Luc Teirlinck
2003-10-12 15:04                               ` Jan D.
2003-09-30  0:27                 ` Robert J. Chassell
2003-09-30 20:24                   ` Richard Stallman
2003-10-01  0:35                   ` Danilo Segan
2003-10-04  0:35                     ` Robert J. Chassell
2003-10-04 18:55                       ` Jan D.
2003-10-04 18:43                     ` Jan D.
2003-10-04 19:35                       ` Danilo Segan
2003-10-04 18:11                   ` Jan D.
2003-10-05  0:25                     ` Miles Bader
2003-10-05  7:23                       ` Jan D.
2003-10-05  7:59                         ` Miles Bader
2003-09-28 21:25           ` Robert J. Chassell
2003-09-28 17:37     ` Luc Teirlinck
2003-09-28 21:33       ` Robert J. Chassell
2003-09-28 22:03         ` Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).