Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14359

Disabled Palette for GUI Elements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.7.0
    • GUI: Look'n'Feel
    • None
    • Ubuntu 10.04 and Suse Linux SLED 10.2

    Description

      The disabled gui elements like buttons or edit fields look like the active ones, especially the buttons. Looking into the deltas between qapplication_win and qapplication_x11, the disabled Palette is initialised different on both OS's.

      This was also on QT 3.3.8 but there the disabled gui elements could be better distinguished.

      The issue could be resolved if we do implement the same code from qapplication_win in our code.

      <code>
      #if PRO_OS_LINUX
      QPalette pal = qApp->palette();
      const QColor bg = pal.background().color();
      const QColor fg = pal.foreground().color(), btn = pal.button().color();
      QColor disabled( ( fg.red() + btn.red() ) / 2, ( fg.green() + btn.green() ) / 2,
      ( fg.blue() + btn.blue() ) / 2 );

      pal.setColor( QPalette::Disabled, QPalette::WindowText, disabled );
      pal.setColor( QPalette::Disabled, QPalette::Text, disabled );
      pal.setColor( QPalette::Disabled, QPalette::ButtonText, disabled );
      pal.setColor( QPalette::Disabled, QPalette::Base, bg );

      qApp->setPalette( pal );
      #endif

      </code>

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            j.kreuzberger Joerg Kreuzberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes