Menu

When Menu changes of color by itself...

Helpdesk
Hoël
2015-04-02
2015-04-03
  • Hoël

    Hoël - 2015-04-02

    Hello !

    I think the title is quite a good summary of my problem : one of my menu changes of color alone, during the session, without any reason.

    At the beginning of each session, he has the right color (light gray : #C2C2C2) and then, he becomes light blue : #8CB2DC.
    I don't know why it changes neither when, maybe at the moment I make a change in the style.css file, but I haven't checked.
    The color it takes is the button color set in the bespin configuration.
    It may be a bug of BE::Shell or Bespin.

    If anyone has any idea.

    Thanks !

     
  • Thomas Luebking

    Thomas Luebking - 2015-04-02

    Can you specify "one of my menus"?
    - Is it a menubar or a popup?
    - Which one? One of the xml menus?

    Can you in doubt make a screenshot of the menu (color is irrelevant)?
    (ksnapshot has a delay which you want to use to shoot popup menus ;-)

    Can you please attach your style.css?

     
  • Hoël

    Hoël - 2015-04-02

    Can you specify "one of my menus"?
    - Is it a menubar or a popup?
    - Which one? One of the xml menus?

    Sorry I wanted to say it, but I forgot when I created the topic.
    This is a Button menu, and more precisely the windowlist menu.

    Here is its definition:

    [WindowListButton]
    Icon=start-here
    Label=Windows
    Menu=windowlist
    Mode=0
    Type=Button
    

    My style.css has no reference to that menu, but here it is:

    :::css
    /*Panel Setting*/
    
    #TopPanel {
        border-top-left-radius:12;
        border-top-right-radius:12;
    }
    
    /*Clock setting */
    
    .BE--Clock {
        color:black;
        font-family:FreeMono;
        font-weight:bold;
        font-size:12;
        padding-right:6px;
        padding-left:6px;
        background:qradialgradient(cx:0.5, cy:0.5, fx:0.5, fy:0.5, radius: 0.5, stop:0 white, stop:0.7 rgba(254, 254, 254, 100), stop:1 rgba(254, 254, 254, 0))
    }
    
    .BE--Clock::hover {
        background:qradialgradient(cx:0.5, cy:0.5, fx:0.5, fy:0.5, radius: 0.5, stop:0 red, stop:0.7 rgba(254, 60, 60, 100), stop:1 rgba(254, 254, 254, 0))
    }
    
    /*Session Control setting*/
    
    .BE--Session {
        color:black;
        font-family:FreeMono;
        font-weight:bold;
    }
    
    /*MenuBar*/
    
    .BE--GMenu QMenuBar {
        font-family:Droid Serif;
        font-size: 8pt;
    }
    
    
    .BE--GMenu QMenuBar::item {
        background:qradialgradient(cx:0.5, cy:0.5, fx:0.5, fy:0.5, radius: 0.5, stop:0 white, stop:0.7 rgba(254, 254, 254, 100), stop:1 rgba(254, 254, 254, 0));
    }
    
    .BE--GMenu QMenuBar::item:selected {
        background:qradialgradient(cx:0.5, cy:0.5, fx:0.5, fy:0.5, radius: 0.5, stop:0 blue, stop:0.7 rgba(0, 120, 254, 100), stop:1 rgba(254, 254, 254, 0));
        color:white;
    }
    
    /*Battery*/
    
    .BE--Battery {
        padding-top:4px;
        padding-bottom:4px;
        color:qlineargradient(x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #303030, stop:1 #585858);
        selection-background-color:gray;
        padding-right:4px;
    }
    
    .BE--Battery[charge="low"] {
        selection-background-color:red;
    }
    
    /*.BE--Battery[charging="false"] {
        color: qlineargradient(x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #303030, stop:1 #800000);
    }*/
    
    
    /*Correct window list bug*/
    TODO
    
    /*Be::Run Config*/
    .BE--Run {
        background-color:red;
    }
    
    .BE--Run QTreeWidget {
        border:1px #A5C1E4;
        background-color:white;
        color:black;
        selection-background-color:#A5C1E4;
        selection-color:white;
        align:justify;
    }
    
    .BE--Run QTreeWidget QScrollBar {
        width:0px;
        height:0px;
        border: 0px;
        background-color: none;
        color: none;
    }
    
    .BE--Run QLineEdit {
        background-color:white;
        border:2px inset gray;
        color:black;
        padding:4px;
    }
    

    I attached the screenshot of the menu.

    Screenshot

    Thanks !

     
  • Thomas Luebking

    Thomas Luebking - 2015-04-02

    Bespin. What color role do you use for the popup menus? Highlight?

     
  • Hoël

    Hoël - 2015-04-03

    No, Window color. And it has this color at the beginning. But sometimes it changes to the Button color.

    I've just checked, this happens when I edit the style.css file. Even if I write nothing new (just added a new line).

     
  • Thomas Luebking

    Thomas Luebking - 2015-04-03

    Altering the style.css causes a repolishment for the entire application, so bespin will also receive ::polish(QWidget*) for that menu.

    I can see the problem, it's caused by https://sourceforge.net/p/cloudcity/code/1739/ which was introduced to workaround an issue caused by kmix (which adds a label and just "hopes" for no color problems)

    I forgot that the default role for popup menus is button... ;-)

    -> fixed by ensuring the roles are Window/Text (what kmix expects) in bespin/r1741

     
  • Hoël

    Hoël - 2015-04-03

    Ok, I updated Bespin, if the bug doesn't happen anymore, I'll tell here.
    I keep reporting if I see any other problem. ^^
    Thanks !

     
  • Hoël

    Hoël - 2015-04-03

    That's good ! I can ::polish whatever I want, my menu keeps the right color ! Thanks !

     

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.