GNOME Bugzilla – Bug 614507
add a radius to workspace corners
Last modified: 2011-02-18 18:37:13 UTC
I'd like to try adding a radius to workspace corners: http://people.gnome.org/~mccann/screenshots/clips/20100331202800/shell-mockup-overview.png http://people.gnome.org/~mccann/screenshots/clips/20100331202800/shell-mockup-desktop.png Eventually we'll want to explore how we can modify windows to work together with this but for now probably just the wallpaper is ok.
Created attachment 157716 [details] [review] (WIP) Add rounded corners to workspaces Note this does not work in we'd want it to as it just draws directly to the root window pixmap which does not interact well with nautilus drawing the desktop. We probably should add a new META_LAYER for drawing the corners. Another issue is dealing with the top panel. (no idea what's the best approach here).
if nautilus is drawing the desktop then we can just change the way we render the corresponding MutterWindow. not sure what you mean about "dealing with the top panel"
(In reply to comment #2) > if nautilus is drawing the desktop then we can just change the way we render > the corresponding MutterWindow. > > not sure what you mean about "dealing with the top panel" Well the top of the root window is under the top panel. Jon didn't like that he wanted it to be part of the visible workspace, just adding a PANEL_HEIGHT offset wouldn't work because in the overview we show the whole pixmap (including the area under the panel).
See bug 591442 for the under top bar thing.
Created attachment 157774 [details] [review] (WIP) Add rounded corners to workspaces *) Use floor to have better looking edges
Doesn't seem to handle when I add a new monitor yet.
(In reply to comment #6) > Doesn't seem to handle when I add a new monitor yet. Yeah it doesn't because it would conflict with what we show in the overview right now (we should only use the primary monitor for the background; not the whole screen).
Can we clarify what the desired appearance is in the main view? In particular, does this affect only the wallpaper and not maximized applications? I think in general we want to do this by drawing little black corner pieces rather than drawing on the root pixmap. For the case of nautilus, positioning the little black corner pieces above the nautilus window probably requires mutter API additions (previous discussions were about having some way of adding actors between two window layers) In the overview, I think the secret to getting things to look OK while animating is to draw the corner piece to look something like: +------------+ |############| |#######_----+---------- |#### . |### / |###| +---+ | | | That is, to extend maybe 2 pixels beyond the corner of the window so that you don't get corner of the window appearing beyond the corner of the black corner piece if rounding goes wrong.
Review of attachment 157774 [details] [review]: As noted in the comment, don't think this is the right approach - it's too inflexible.
(In reply to comment #8) > I think in general we want to do this by drawing little black corner pieces > rather than drawing on the root pixmap. ... which will be tricky if the background does not have a uniform color (see bug 618479)
(In reply to comment #10) > (In reply to comment #8) > > I think in general we want to do this by drawing little black corner pieces > > rather than drawing on the root pixmap. > > ... which will be tricky if the background does not have a uniform color (see > bug 618479) Oh. Another approach you can do is draw the pixmap or background in 9 pieces +----+---------------------------------+----+ | | | | +----+---------------------------------+----+ | | | | | | | | +----+---------------------------------+----+ | | | | +----+---------------------------------+----+ And use multitexturing to blend the corners with an alpha mask. You can even use the same alpha mask for all 4 corners, and just flip it around as necessary (You could also create an alpha mask the side of the drawn area, but that's going to hurt performance and waste a fair bit of memory.)
(In reply to comment #11) > [...] and use multitexturing to blend the corners with an alpha mask. You can even > use the same alpha mask for all 4 corners, and just flip it around as necessary > (You could also create an alpha mask the side of the drawn area, but that's > going to hurt performance and waste a fair bit of memory.) OK, this is not my bug, but: would this be material for a yet-to-be-written StImage actor? The above would then "simply" kick in if the border-radius property is non-zero.
*** This bug has been marked as a duplicate of bug 642697 ***