[Qt-interest] How to set textcolor for actions in QMenu?

Atlant Schmidt aschmidt at dekaresearch.com
Tue May 10 16:41:21 CEST 2011


Folks:

> While this is a case often found with tabs
> (like in chat-clients, terminal-applications,
> even browsers) its rather uncommon that a
> menu-item needs non-permanent attention.

  (I refrained from posting yesterday, but I can't
  resist today.)

  I can think of at least two instances where a menu
  item might want non-permanent attention:

    1. Your application implements some sort of
       "Guide me" help and it's trying to draw your
       attention to the menu item that will fulfill
       your stated need. For example, you've asked
       for help on applying the "foobar" property
       and the help system is now trying to draw
       your attention to the menu item entitled
       "Properties>".


    2. Your application really really wants to call
       your attention to a menu item that you really
       ought to invoke. For example, the reactor's
       melting down and you really ought to invoke
       the "Add emergency cooling water" menu item.*


  For accessibility reasons you probably shouldn't depend
  solely on color for these cues; animated, varying bright-
  ness (but *NOT* blinking!) would be good as might be the
  use of an alternate font/character weight/style, etc.

  But I certainly wouldn't entirely and flatly proscribe
  the use of color in menu items. After all, we do want
  to encourage at least a little experimentation in inter-
  faces, don't we? Otherwise, we'd all only be using
  Teletypes and command-line interfaces with two-character
  command names.

                            Atlant


* Obviously, I'm joking to a certain extent here. The
  stated situation probably requires a pop-up, but there
  are probably intermediate cases that don't. Perhaps
  it's merely been too long since you last saved your
  file and the system thinks it would be a good idea
  (but not an urgent idea) that you save the file now.

-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Arnold Krille
Sent: Tuesday, May 10, 2011 02:59
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to set textcolor for actions in QMenu?

On Tuesday 10 May 2011 06:59:18 Wilhelm wrote:
> Am 09.05.2011 12:44, schrieb Arnold Krille:
> > There is a reason for standards. There is a reason for themes. There is a
> > reason your apps menus look the same as the ones from
> > dolphin/konqueror/marble/whatever on your platform. Actually there are
> > several reasons, accessibility is one of them, the fact that an app is
> > less usable when it looks different then the others is another.
> thanks for all those answers and, surely, you all are right in the way
> that this is a bad idea (although I've seen it some places)!

If you have seen it in some places, it doesn't mean its a good idea.

> But, what about QTabBar::setTabTextColor() ? I think, the same arguments
> hold in this case, not?

Yes and no. In general its a bad idea to use these kind of functions with (for
example) QColor::red. But for tabs its an interesting idea to use with
QPalette::Link or QPalette::LinkActive to highlight this tab for temporary
attention.
While this is a case often found with tabs (like in chat-clients, terminal-
applications, even browsers) its rather uncommon that a menu-item needs non-
permanent attention.

Have fun,

Arnold

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.



More information about the Qt-interest-old mailing list