Menu

#1130 Patch: Shaped toolbar drawn incorrectly for TOPCENTER placement

v1.4.0
closed-accepted
None
5
2016-07-30
2015-04-27
No

With fluxbox v1.3.7 I noticed the rounded corners on the (a.k.a. shaped) toolbar being drawn incorrectly when placement TOPCENTER is set.
The corners should be drawn on the BOTTOM of the toolbar for this placement and not on the TOP.
The placments TOPLEFT and TOPRIGHT are unaffected and show the rounded corners correctly at the BOTTOM.

I tracked the issue down to the table _values[] in Toolbar.cc which contains incorrect placement information for only the TOPCENTER position.
I also took the liberty to align the table a bit differently in order to improve readability and hopefully make it easier to spot errors in there in the future.

See attached patch which fixes the issue.

best regards,
Peter Ganzhorn

1 Attachments

Discussion

  • Mathias Gumz

    Mathias Gumz - 2015-04-27
    • status: open --> open-accepted
    • assigned_to: Mathias Gumz
    • Group: v1.3.7 --> v1.3.8
     
  • Mathias Gumz

    Mathias Gumz - 2015-04-27

    good catch.

     
  • Mathias Gumz

    Mathias Gumz - 2015-05-01

    mhh .. do you want to provide a git-format-patch or do you want me to apply this patch an reference to you by name only?

     
  • Peter Ganzhorn

    Peter Ganzhorn - 2015-05-01

    Although this really is a minor bug my ego wants me to be famous for contributing to fluxbox, so here is a git-format-patch. I actually never created one before, so I hope I didn't mess up on this.

     

    Last edit: Peter Ganzhorn 2015-05-01
  • Mathias Gumz

    Mathias Gumz - 2015-05-01
    • status: open-accepted --> closed-accepted
     
  • Peter Ganzhorn

    Peter Ganzhorn - 2015-05-01

    I have one final thought on this:
    Imagine the toolbar being placed at e.g. TOPLEFT. With the current code, both the BOTTOMLEFT and BOTTOMRIGHT corners will be drawn rounded when toolbar.shaped=true.
    But since the toolbar is sitting at the edge of the screen in this case, wouldn't it be looking better to draw only the BOTTOMRIGHT corner rounded in this case since this would be the only corner not touching a border of the screen?

    So what I'm proposing is to draw only corners not touching any edges of the screen rounded when toolbar.shaped=true.
    If you like this idea, I'd be glad to make the neccessary changes and post another patch.

     
  • Mathias Gumz

    Mathias Gumz - 2015-05-01

    do it :)

     

Log in to post a comment.