Re: Menu questions, irritations and whuzzy feelings



"r ve" <kaas_10 hotmail com> writes:

> >I agree that it should be possible, at least as a theme option. It
> >may be a technical problem that the prelight color is already used
> >for showing selected items, so that there is no natural color to
> >use for highlighting.
> 
> Afaik most other window toolkits that allow this are just using the
> same color/style as the one for selected menu items so I don't see any
> reasons to use a natural color for it.

Windows 2000 menu bars use an out-bevel for prelighted items and an
in-bevel for selected. Mac OS X doesn't use any prelighting, if I
remember correctly.

What I meant was that gtk+ puts widgets into /states/ based on which
the widgets get their colors. Since we are already using the PRELIGHT
state for selected menu items, we can't use PRELIGHT for prelighted
items if we want to be able to draw prelighted and selected items
differently.

> I do wonder though if I should make it a theme option or just wack it
> in without option.
> Afaik it isn't possible to disable the pre-lighting for other widgets
> (pcmiiw) so it wouldn't make much sense to make this an option
> either.. (imho)

Setting the prelight color to the same as the normal color effectively
disables prelighting.

If we do this, I think it should be possible for a theme to have
prelighted menu items that are different from selected items, since
matching Windows would be an important use-case.

In gtk+ HEAD, it is already possible to change the shadow type of
selected menu items; to add prelighting support would require a new
style property, prelight_shadow, that would be used when the pointer
is hovering over items on a menu bar.

Some potential problems to think about:

   - It seems weird to have a GtkMenuItem::prelight_shadow property
     that would only be used when the item was inside a menu bar.

   - To make it possible for prelighting to look different from
     selecting, prelighted items should use another state than
     PRELIGHT, maybe SELECTED.

     (That would make prelighted items use the SELECTED state and
      selected items use the PRELIGHT state ...)

If you do give this a try, please open a bugzilla bug to track it.


Søren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]