Manual Hiding of Plasma Panel (desktop shell)

Andrzej JR Hunt andrzej at ahunt.org
Thu Mar 4 20:24:53 CET 2010


On Thursday 04 March 2010 18:15:33 Aaron J. Seigo wrote:

>
> would you be able to upload a patch to reviewboard.kde.org so we can also
> try it and comment on it directly? (if you don't feel it's ready for that
> quite yet, that's cool; but when it is, please do so..)
>
> my thinking on the positioning is this:
>
> it probably shouldn't be in the containment itself. (though it's hard to
> know exactly where it currently is being placed without seeing the patch :)
> this is because the containment is completely free to do as it wants with
> items inside of it ... including removing, hiding or even deleting them!

The button is in the view, but I had set the contentsMargins in the 
containment, since editing those of the view did nothing whatsoever. I didn't 
particularly want to do this, since I have to assume that nothing else 
modifies the containment's margins, but it does work. Instead of passing the 
cashew out of the containment, the other possibility would be to reprogram it 
to respect the panel's content margins, i.e shift along of it's own accord. I 
have posted a first draft of the patch on the reviewboard.

> the other problem i see there is fitts law: the buttons will not hit the
> edges of the screen and that can be annoying and certainly make them harder
> to use.
The buttons appear to be small, however their actual size is larger, i.e. for 
the unhide button, not only the visible button, but the whole silver area is 
clickable. For the buttons on the panel the full 10px width x full panel 
height is clickable (i.e the same size of area as above). I'm just not sure  
how to set the button to (appearance wise) fill it's whole defined area. From 
the usability perspective I myself amn't experiencing any problems clicking 
on the button though.

> to make it look good, we can perform a small trick: overlap the button with
> the left/right margin area of the containment. in the case where the panel
> hits the edge of screen, there is no overlap and the button and the
> containment will meet with a nice perfectly square join.
>
> but in the case where the panel edge is floating, we may have a curved
> edge. what to do? easy! take the panel-background svg and paint the
> right/left border on top of the button with
> QPainter::CompositionMode_Source. this will create the illusion that the
> button is wrapped "around" the curvey edge of the panel and even with
> translucency it will look perfect (the button parts that "stick out" in the
> curved area will be visible, but the panel itself will be translucent). it
> might sound trickier than it is, but it's really straight- forward, though
> a bit hard to explain. i can also provide an example implementation once
> you publish your patch.
>
> but this approach ensures that there is not interefering with the panel
> containment itself. much simpler and won't end up with problems down the
> road.
>

I'll try that then, although I'm not completely certain how you mean it yetl

>
> i think the only way to find out is to try it, test it and maybe even ship
> it and get feedback. as you are the one implementing it (and you seem to be
> really open to feedback, which is terrific), i'd say: make a decision,
> implement it, and let's see how it goes from there. worst case we change
> how it works later after we have some usage data :)
>

I'll just leave it with two buttons when centred then. I'll try monitor myself 
when using it to see how I use it, but I don't think this is a particularly 
major issue.

-- 
Andrzej JR Hunt -- andrzej (at) ahunt.org


More information about the Plasma-devel mailing list