RFC: Additional hint elements for frame theme SVGs

Marco Martin notmart at gmail.com
Fri Apr 25 10:07:06 UTC 2014


On Friday 25 April 2014 01:40:11 Eike Hein wrote:
> When a border row/column gets disabled, this margin disappears,
> causing a visually uneven/asymmetrical result. Content appears not
> centered, with different margins between content and opposing inside
> edges (one of them now a screen edge). This is a problem for dialogs
> spawned from panels, and for the panel itself. The latter especially
> often causes grief and unhappy feedback from users and designers.

Well, first let me explain first the reason why the side border was removed 
years ago:
was mostly for fitts laws, because then the menu items of Kickoff were 
activable from the screen edges, then was decided between designers back then 
that it was nice also in looks , got in the design patterns.

(hyronically enough current kickoff port doesn't work from screen edges, that 
has to be fixed, while kicker favourites are off of just like 2 pixels)

now, it's possible to make the area react to the mouse regardless if there is 
a slight visual margin the re or not, since luckily MouseArea is detached to 
any visual representation.

tough visually may be useful not having a visual border to say "this item is 
interactive from screen edges"

> Right now, many applets try to hack around this by adding their own
> inside margins depending on how they're used and their position. This
> is doomed to fail however (I know, I tried in Plasma 1), because:

eh, you know how much i don't like this kind of things, so if there is a 
general solution, good.


> So, how do we fix this?
> 
> A naive approach would be to disable the border row/column just as
> we do now, but then extend the center rectangle by the same width
> as the border would normally be, and then apply an inside margin
> between the edge of the center rectangle and the edge of the content
> equal to that width as well.
> 
> This doesn't actually fix the problem however because again, the
> visually perceived inside edge isn't equal to the width of the
> whole border element.

I know that a difference in shape in the two parts can move the perceived 
center..
however, do you think the very tiny rounded border is enough to move that 
center?
(my suspect is that if it does move it, it does differently for each person, 
so what would be sightly too left for one is slightly too right for another)
so if we go for forcing borders, if we force the same it would at least have 
the happy side effect of not resizing the contents anymore when a border gets 
disabled

> To really address this, we thus need to allow theme authors to pro-
> vide another set of hint elements in their SVGs that specify a
> width to use for that center rect edge <-> content edge margin on
> edges with disabled borders.
> 
> Other hint elements already exist: Theme authors can specify a
> set of width hints that substitute for the actual widths of the
> border elements - but these substitutes aren't used when a border
> is disabled.
> 
> So, bottom line: Four new hints and code to make use of them are
> needed IMHO. This would finally unfuck a lot of bad asymmetry and
> hacks in panels, panel popups and the like. Thoughts?

It never bothered me much for the popups (as not seeing why something that 
comes out from the side of the screen should be symmetrical)

it did bother me a bit for the panel tough.
But I never tried any kind of fix, because I didn't want to make any harder 
than it is already (as in we fail it here and there) the fitss law wortiness 
of items in panels and dialogs, both functionally and visually

-- 
Marco Martin


More information about the Plasma-devel mailing list