[Kwin] Option for large window borders
Lubos Lunak
l.lunak at suse.cz
Wed Sep 17 17:57:23 BST 2003
On Wednesday 17 of September 2003 11:09, Gunnar Schmi Dt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> As the new window decoration API is now in the HEAD branch I have looked at
> it, especially in the sense of the wide-borders feature (which I have added
> to the planned-feature document).
>
> As far as I have seen there is a method
> KDecorationOptions::preferredBorderSize() that returns one of the values
> BorderTiny, BorderNormal, BorderLarge, BorderVeryLarge, and BorderHuge.
>
> If normal borders are 3 pixels wide and the size grows by 50 % for each
> larger value (which is a maximum growth if we do not want to have gaps in
> the sizes), then the border sizes would correspond to 2, 3, 4, 6, and 9. If
> we allow bigger gaps then they could be 2, 3, 7, 11, and 15. Unfortunately,
> for accessibility we need even wider borders than that.
>
> As suggested within a mail thread on the kde-accessibility and kwin mailing
> lists I would prefer a solution where the standard border size mechanism
> allows the borders to get into sizes like 30 or 40 pixels (which is needed
> by some people).
I don't see a reason for not having gaps in the sizes. Does it really make
sense to have all 2,3,4,6 sizes? Not that I really care - I can add more
sizes if needed - it will be up to the decorations how many sizes they'll
support.
>
> In that sense I want to suggest the following changes to the API:
>
> 1. Add the options BorderVeryHuge and BorderOversized.
>
> 2. Place a recommendation for the pixel width for the different sizes:
> BorderTiny = 2-3 pixels
> BorderNormal = 3-5 pixels
> BorderLarge = 5-8 pixels
> BorderVeryLarge = 8-12 pixels
> BorderHuge = 12-18 pixels
> BorderVeryHuge = 18-27 pixels
> BorderOversized = 27-40 pixels
No problem with this, I can add it.
>
> 3. Add a virtual method which returns one of three values to the API:
> BorderFixedSize -- the decoration cannot be resized (default)
> BorderLargeSize -- the border supports the values between tiny and very
> large
> BorderHugeSize -- the border supports all values
I don't think this is the right way. I'd say that many styles (especially the
pixmap ones) will at most support 2-3 sizes, if at all (let's ignore the fact
that many styles won't possibly bother with this at all). Scaling down
pixmaps will probably make them look ugly, unless scaling by a multiple.
Shaping window corners for variable sizes won't be easy as well.
Moreover, if you change the style, you'll often have to adjust this setting
anyway, and if you don't, styles may get sizes they don't support.
I think we can just have some kind of StyleSupportsBorderSizesAtAll, and
maybe StyleHasGoodSupportForBorders (4-7). Styles that don't support full
range of sizes should simply group them as they see fit(e.g.
Tiny+Normal->Normal, Large->Large, others->VeryLarge). The KCM module would
say that the style doesn't support all the sizes.
>
> 4. Add some possibility for specifying the border width to the window
> decoration KCM. This could either be a combo box or a slider. (If we use a
> slider, it should have the labels "Normal", "Large", and (if the decoration
> supports huge borders) "Huge".
>
> I can add these changes the CVS if they are accepted. However, I have an
> exam on Monday, so I will implement the large (or huge) border feature next
> week (so that it is ready by the 29th).
>
> Gunnar Schmi Dt
>
> P.S.:
> I intentially wrote to the kwin list and cc'd to the core-devel and
> accessibility lists, so please make sure you don't forget these ccs in your
> replies.
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the kde-core-devel
mailing list