Menu

#18 be run Application category background

1.0
open
nobody
None
2013-08-04
2013-07-31
No

Hi thomas,

I found that the background of the programs categories in the Berun is being taken from the color of the text, rather than the color of the window or the highlighted.

even if you customize via the style.css, the background color is taken from the color of the text instead of the background color.

see the attached screenshot, i set the background color to black, and the text color to yelow, see the program category are yellow so is using the text color.

thanks

1 Attachments

Discussion

  • Thomas Luebking

    Thomas Luebking - 2013-07-31

    Yes, the colors are inverted for the headers and the contrast (to the actual items) lowered with the depth of the section, ie.

    Main group // yellow bg
    Subgroup // darker yellow bg
    Subgroup to Subgroup // more darkened yellow bg

    It's pretty important to have an idea on whether you're selecting a group or a program.

    The selection color is of course no option either, since the group entries can be selected as well.

    So, what do you mean to suggest/expect/..?

     
  • Samuel Azcona

    Samuel Azcona - 2013-07-31

    I agree, we must differentiate the categories/groups, and programs.

    I can suggest, according to what I've been testing, is that we should be able to change the background color of the group independently of the text.

    because now the text color is what defines the background color.

    I found these two classes

    . BE - Run QTreeWidget {

    }

    . BE - Run QAbstractItemView {

    }

    and I've seen that do the same.

    so why not make

    . BE - Run QTreeWidget

    draw groups (favorites, dev, education, office etc), and

    . BE - Run QAbstractItemView

    the list of programs inside the groups (the programs names)

    for example

    . BE - Run QTreeWidget {
    background: black;
    color: white;
    }

    the background of the groups/categories (favorites, dev, education, office, etc.) would be black with white text color

    and

    . BE - Run QAbstractItemView {
    background: yellow;
    color: blue;
    }

    the background color of the list of applications (multimedia: amarok, audacity, k3b etc) would be yellow with blue text color

     
  • Thomas Luebking

    Thomas Luebking - 2013-07-31

    that we should be able to change the background color of the group independently of the text.

    That's not trivially possible.
    I can apply any kind of logics to the input, but the input is pretty limited.

    QSS hands a palette to the delegate and you can style foregound, background and alternate base, ie. no extra foreground color for the alternate base (which is actually the shaded lines in some views)

    I found these two classes
    .BE--Run QTreeWidget {
    }
    .BE--Run QAbstractItemView {
    }
    and I've seen that do the same.

    Yes, because technically QTreeWidget is a (special) QAbstractItemView - the further assumptions do not work the way you think.

    The solution has to be somehow like

    .BE--Run QTreeView { / yes, that matches as well ;-) /
    color: foo;
    background-color: bar;
    alternate-background-color: fifi;
    magic-solution-color: magic;
    }

    But we lack a "magic-solution-color".

     
  • Samuel Azcona

    Samuel Azcona - 2013-08-01

    hi, thomas

    i just made a small change in the runner.cpp

    for use other color instead of the windows text color

    this is the result:

    http://postimg.org/image/m64nbptav/

    looks much better and combines more

    the best wolud be use the base color, but when i try to compile using the base color i have a compilation error :
    "
    [ 48%] Building CXX object CMakeFiles/be.shell.dir/runner.o
    /home/samuel/Descargas/be-shell-code/runner.cpp: En la función miembro ‘virtual void BE::RunPopupDelegate::paint(QPainter, const QStyleOptionViewItem&, const QModelIndex&) const’:
    /home/samuel/Descargas/be-shell-code/runner.cpp:207:46: error: ‘BaseText’ no es un miembro de ‘QPalette’
    const QColor &fg = pal.color(QPalette::BaseText);
    ^
    /home/samuel/Descargas/be-shell-code/runner.cpp: En el ámbito global:
    /home/samuel/Descargas/be-shell-code/runner.cpp:430:1: aviso: parámetro ‘grp’ sin uso [-Wunused-parameter]
    BE::Run::saveSettings( KConfigGroup
    grp )
    ^
    make[2]: [CMakeFiles/be.shell.dir/runner.o] Error 1
    make[1]:
    [CMakeFiles/be.shell.dir/all] Error 2
    make: *** [all] Error 2

    "

    i dont know what its the correct name of the base text color in the QPalette, so i use the Highlight color instead

    the patch is attached

    please see if is possible use the base color and basetext color it would be the best i think

    thanks and greetings

     

    Last edit: Samuel Azcona 2013-08-01
  • Thomas Luebking

    Thomas Luebking - 2013-08-01

    You're using the highlight color what means one cannot see whether the item is selected (plus the highlight color will usually be "blue" or so - doesn't sound like a great solution to me)

    The counter to "Base" is just "Text", but that's effectively the Window/Text color anyway (ie. no different look)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.