Menu

Panels & layers

Helpdesk
2015-01-05
2015-04-29
  • Hombremaledicto

    Hombremaledicto - 2015-01-05

    The side panel here:

    schermata823

    Is set on Layer 0 + struts=False (so it doesn't cause spacing issues with windows).
    Layer>=1 brings transparency (or with ARGB=False weird results), which might be unwanted. Shadows are lost too.
    Also, layers above 0 set autohiding and/or painting above other panels - no matter their order in the Panels array.

    I was looking to a "widget" or "plasmoid" alike layer for panels.
    Something like: above windows, but with no transparency, autohide and painting above other panels.

    The thing would be instead: showing the panel above windows, eventually hiding it by catching mouse events on left|right click anywhere outside the panel itself. And preserving shadows.
    I don't know if this is doable with the very specific approach that be.shell implements.
    Is it? :)

    Ifffff i understood correctly, BE::Shell paints stuff & shadows on the desk, being everything within a "container". Just hoping i'm wrong.

     

    Last edit: Hombremaledicto 2015-01-05
  • Thomas Luebking

    Thomas Luebking - 2015-01-06

    Layers:
    0: "In the desktop" - the panel is painted directly onto the desktop, windows will cover it but cannot go below-
    1: "Real dock" - the panel is a window of it's own. Due to the dock type above all (ok, "most") other windows
    2: "unused", reserved for maybe later ;-)
    3: "autohide", like layer one but w/ autohide capabilities

    Layer 3 does never strut by its nature, layers 0 & 1 can strut or not.

    Shadows are always painted onto the desktop. It would be possible to add "true" shadows to layers 1 & 3 (like for normal windows) - notably simple w/ virtuality and bespin style (and pot. robs fork)

    Transparency is complicated.
    On layer 0, there's no problem at all (in-window buffer) but on layers 1 & 3 one needs an ARGB window.
    The problem is that QSS terribly fails on ARGB windows, so i just paint a somewhat hardcoded background (from the palette QStyleSheetStyle provides)
    You can turn ARGB support off, but then must not use "rgba(1,2,3,4);" background colors in css (for this panel) - the content is initially undefined and QSS paints a translucent color on top of that.


    The thing would be instead:
    showing the panel above windows

    -> layer 1 or 3

    eventually hiding it by catching mouse events on left|right

    I'm not 100% sure what you mean here. To hide the panel when you enter its left or right edges (like with 10px padding or so?)

    click anywhere outside the panel itself

    -> layer 3

    And preserving shadows.

    I assume "shadows on top of other windows"?

     
  • Hombremaledicto

    Hombremaledicto - 2015-01-06

    Running a test with Layer 3:

    schermata825

    Layer 1 with struts false:

    schermata826

    Not bad, but still it takes the space from the horizontal TopPanel (which should has priority instead).

    Shadows are always painted onto the desktop. It would be possible to add "true" shadows to layers 1 & 3 (like for normal windows) - notably simple w/ virtuality and bespin style (and pot. robs fork)

    Oh, sounds interesting. So we can support this in all of these styles. Any drawback ?

    I'm not 100% sure what you mean here. To hide the panel when you enter its left or right edges (like with 10px padding or so?)

    It's more like "clicking on the desktop or another panel cause our 'plasmoid-alike' one to hide".

    I assume "shadows on top of other windows"?

    Yes, which is, from what you wrote, doable from the style?

     
    • Thomas Luebking

      Thomas Luebking - 2015-01-08

      Oh, sounds interesting. So we can support this in all of these styles.
      Actually I'm not sure whether I changed bespin, but rob/you could easily adjust the for to support setProperty("KStyleFeatureRequest", property("KStyleFeatureRequest").toUInt() | 1);
      Oxygen & breeze should at some point support this as well.
      We'll have to add a convenience function for all KDE applications to make use of this in KF5

      Any drawback ?
      None expected, I must just do it right ;-)

      It's more like "clicking on the desktop or another panel cause our 'plasmoid-alike' one to hide".
      Ok, that's layer 3 behavior.

      Yes, which is, from what you wrote, doable from the style?
      It's doable from everywhere, but the style implements all the heavy stuff (and we agreed that having the style do such is better than having several clients implement different looking shadows)

       
  • Hombremaledicto

    Hombremaledicto - 2015-01-08

    Up: I've just realized : perhaps the use of a border-image comprehensive of shadows might work as well. I've been using this trick with my latest theme for quite a while now:

    schermata838


    schermata839

    The visible background on the bottom panel, reproducing a dock-alike visual effect, is in fact a border-image for .BE--Tasks. Shadows are not optimal yet but it's quite easy to improve them.

    Later i'll draw a bg for a quick test and report here :)

    EDIT: Seems to work, tested with Layer=3 and ARGB=False

    Hope these posts will be helpful to anyone trying to achieve the same thing.

     

    Last edit: Hombremaledicto 2015-01-08
  • Hombremaledicto

    Hombremaledicto - 2015-04-29

    Finally decided to use a Layer=3 panel with ARGB=True, in the scrot below, is the sidebar.
    The colors are not from the palette (palette(window) i suppose), but since i'm using subpanels i was able to set the background from them.

    screen2

    P.s. Question: is it possible to have panels offset set in pixel instead of percentages? I realized it's harder to share a theme with panels on layer 1/3 using offset, since margins are not an option for them...

     

    Last edit: Hombremaledicto 2015-04-30

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.