Menu

Updates and padding problems

2013-09-07
2013-10-07
  • Hombremaledicto

    Hombremaledicto - 2013-09-07

    Hi, i've updated today BE::Shell (was more than 2 weeks since the last git pull) and it seems that some applets are broken, on the TopPanel exclusively.

    Scrot:

    schermata70

    While it should look this way:

    schermata28

    I've read there have been changes in Buttons, but couldn't get around the problem to fix it in the css.

    Here's my theme.css: http://pastebin.com/TqtGkT8Y

    The applet with issues are #DesktopGrid (line 35), .BE--Clock (line 92), and a group starting at line 133: .BE--SysTray,.BE--Session, .BE--Battery, BE--Volume, BE--MediaTray,

    There's also a line right at the beginning of the css: QAbstractButton (line 33).

    What is changed exaclty for buttons then?

     

    Last edit: Hombremaledicto 2013-09-07
  • Thomas Luebking

    Thomas Luebking - 2013-09-07

    What is changed exaclty for buttons then?
    Icon size determination.

    It actually looks as if only the session button would take (far) too much horizontal space, right? The others are just pusehd to the left because of this.

     
  • Hombremaledicto

    Hombremaledicto - 2013-09-07

    Hmm, here it's about this then:

    .BE--Session { margin: 1px; padding:4 14 2 2; width: 16px; height: 16px; }

    Commenting this line does nothing on this matter, yet the same, it has just removed the size & margin limitations above.
    I've also noticed that not only the TopPanel applets are affected, but the taskbar too.

    The DesktopGrid button is on another panel (you can see it in the second scrot, the awful ring within the red ribbon), so this shouldn't be about the session button IMO.

    I even tried setting a negative value for the left padding in .BE--Session. That worked for it( padding:4 -754 2 2; LOL ), but the applet right at its left - the clock - it's still pushed at the middle of the panel, right as the following ones :(

     

    Last edit: Hombremaledicto 2013-09-07
  • Thomas Luebking

    Thomas Luebking - 2013-09-07

    If, this would affect all buttons (including those in the taskbar, taskbuttons are still buttons)
    I also doubt it's related to the css - the button is just too greedy in growing.

     
  • Hombremaledicto

    Hombremaledicto - 2013-09-07

    Yes, Sorry if i'm unable to give you more clues about it. It seems that any QToolButton suffers this,exept within the pager.
    It affects buttons and taskbar for sure. Can't tell about clock/battery/infocenter/and trays.
    In case you need futher details, just ask ;)

     
  • Thomas Luebking

    Thomas Luebking - 2013-09-07

    For a start, apply this patch:

    diff --git a/button.cpp b/button.cpp
    index 8835f59..9d108d9 100644
    --- a/button.cpp
    +++ b/button.cpp
    @@ -309,6 +309,8 @@ BE::Button::resizeEvent(QResizeEvent /re*/)
    s = (s + iconSize().width())/2; // there's a fight in the layout - seek for convergence
    }

    • qDebug() << text() << size() << myLastIconSize << iconSize() << s;
      +
      myLastIconSize = iconSize().width();
      setIconSize(QSize(s,s));
      myRecursionGuard.start();

    run "be.shell --restart" from konsole and post the output.

     
  • Hombremaledicto

    Hombremaledicto - 2013-09-08

    Sorry, the patch was giving me an error. I've saved it as button.diff in the be-shell-code source, and launched it with:

    patch < button.diff

    It was giving me (maybe was not the right command):

    patching file button.cpp
    patch: **** malformed patch at line 6: s = (s + iconSize().width())/2; // there's a fight in the layout - seek for convergence

    So after some trials i've ended up editing button.cpp, adding the line

    qDebug() << text() << size() << myLastIconSize << iconSize() << s;

    before

    myLastIconSize = iconSize().width();

    Should be done. Recompiled and restarted be.shell.

    Here's the debug output: http://pastebin.com/U2Rg81ev

     

    Last edit: Hombremaledicto 2013-09-08
    • Thomas Luebking

      Thomas Luebking - 2013-09-08

      No wonder - stupid markdown turned the patch into a bulk of junk, sorry :(
      Your change is however correct and the debug out says that it's actually working as supposed.....

       
  • Hombremaledicto

    Hombremaledicto - 2013-09-08

    EDIT: Forget about this, Lars helped me to fix the buttons. It required to add a stretch between the GlobalMenu and the systray, while for the desktop grid padding and margins are now totally different.

    I'd say it's solved.

     
    • Thomas Luebking

      Thomas Luebking - 2013-09-08

      ... since this explains it (my panel doesn't look much different from yours and does not cause this issue)

      The buttons now stretch in every direction in order to allow for sane autogrowth - without the explicit stretch you had only the "weak" stretch of globalmenu, meaning the space is now distributed between it and the button(s).

      I guess it's however ok to assume that the globalmenu should "autostretch" ie. take as much space as possible?
      But the "correct" way to arrange things on left and right would be an explicit stretch.

      Just to be sure: you've only one stretch added now and that solved it, correct?
      You didn't add stretches until it somehow was ok or so?

       
  • Hombremaledicto

    Hombremaledicto - 2013-09-08

    Yes, only one stretch:


    [TopPanel]
    Applets=GlobalMenu,stretch,systray,mediatray,Volume,infocenter,battery,clock,Sessionbutton
    BlurRadius=15
    Length=100
    Offset=0
    Position=0
    Screen=-1
    Size=22
    Visible=true

    While in the BottomPanel there were already two of them.
    Why? Lazyness i guess:

    [ BottomPanel]
    Applets=pager,tasks,Spacer1,Spacer2,MTR3,device,mpc
    BlurRadius=0
    Id=BottomPanel
    Length=100
    Offset=0
    Position=1
    Screen=-1
    Size=26
    Struts=true
    Visible=true

    The last applet is a label with a script that prints the current song. Since it gets shorter it was necessary to add a spacers, to push the taskbar to the left. But somehow one wasn't enough, so...

    #Spacer1, #Spacer2 { max-width:290px; }

     

    Last edit: Hombremaledicto 2013-09-08
  • Thomas Luebking

    Thomas Luebking - 2013-09-08

    Well, there's a horizontal width max on the spacer - what if you remove that?

     
  • Hombremaledicto

    Hombremaledicto - 2013-09-28

    Hi, sorry if it took me so long to reply your message*, by removing that line in my theme the taskbar is fine, but not after restarting the shell - in brief, the whole taskbar is moved to the right (aproximately 10px).

    Off topic: I just thought on a new feature, what do you think about having rows in tasks, like in here:

    jschauma kde3

    ?

    *Had to deal with the admission to computer engineering, supplementary exams, and the first week of lessons.

     

    Last edit: Hombremaledicto 2013-09-28
  • Thomas Luebking

    Thomas Luebking - 2013-09-28

    Did it really move or just expand (became wider and for the equal distribution and the center alignement ...)

    In doubt, whenever you just want to push stuff to a side, inserting one "stretch" should be sufficient.

    reg. tasks:
    https://sourceforge.net/p/be-shell/tickets/19/

     
  • Hombremaledicto

    Hombremaledicto - 2013-10-07

    Once again, sorry if it took me so much to reply. Yes, one spacer does the job.

    Can't say, however, if it moved itself or just got expanded.
    Any way to know this?

    Thanks for the tasks thingy. Then i'll wait you to implement it :)

     
  • Thomas Luebking

    Thomas Luebking - 2013-10-07

    Any way to know this?
    No, the stretch is (atm) completely anonymous (you should actually not even be able to impact it by css class selection)

    Then i'll wait you to implement it :)
    I secretely hope someone with developing skills and taskbar interest shows up and starts working on it (with assistance, of course)

     

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.