[Libreoffice] [PUSHED] fdo#31251 - Improve default page layout

Sébastien Le Ray sebastien at orniz.org
Tue Mar 8 00:09:39 PST 2011


Le Thu, 03 Mar 2011 11:59:19 +0000,
Michael Meeks <michael.meeks at novell.com> a écrit :

> Hi Sebastien,
> 
> On Tue, 2011-03-01 at 23:42 +0100, Sébastien Le Ray wrote:
> > Here is a complete patch for fdo#31251. It adds a smooth shadow to
> > the page.
> 
> 	Wow - it is really pretty indeed :-) I just pushed it. Nice
> work ! can you confirm is it LGPLv3+/MPL ?
> 
> 	Incidentally, it would be lovely to have the post-it notes,
> not only to have a border, but to have curved corners at the bottom,
> but not the top, so they really look like sticky notes. ie. take a
> sticky note an stick it flat on your desk, and you see the effect
> [ both bottom corners curl slightly ] ;-) possibly that will require
> some (manual?) re-coloring action of the bitmaps, which might be
> slightly painful, though I guess it is just a matter of keeping a
> constant AlphaMask bitmap around, and merging it into a BitmapEx with
> a Bitmap (of the same size obviously) 'Erase'd with the correct color
> for the note.
> 
> > During its development, I found that SwRect::_Intersection (used in
> > page margin painting) returns negative height/width if the two
> > rectangles do not overlap. I don't know if it is the expected
> > behavior or a bug. If it's a bug I guess I can provide a patch.
> 
> 	Ho hum - probably a difficult one to audit for, to check
> every location to ensure they are not depending on this. Possibly it
> makes the impl. faster too (?).
> 
> 	Well worth documenting though in the API.
> 
> 	Thanks !
> 
> 		Michael.
>

Hi,

this simple shadow patch has generated a long discussion on
Libreoffice-design. Some people don't like the color, some people don't
like the amount of blur, some people want no shadow at all, some people
want a "4 borders" shadow. So here is a second patchset that tries to
address the first three critics :
 - It adds a configuration option (in Appearance category) to set shadow
   color. It currently defaults to gray but I'm sure design team will
   find a more sensitive default :
 - It adds a configuration option to disable shadow;
 - It doesn't use bitmaps directly anymore but an alpha mask, so if
   people want to try another blur effect, they just have to edit
   images.zip:/sw/res/page-*-shadow-mask.png These are black & white
   image. Black amount determines transparency, white being fully
   transparent. Here again, I'm sure that design people will find a
   better default. Only constraints are 1x10px for bottom shadow,
   10x10px for corner and 10x1px for right shadow.
I'll let design team play and discuss with that, when they agree on a
default, I'll provide an additional patch to take it into account.

Note: I had to perform a make dev-install for settings to be correctly
saved.

Regards

Sébastien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-shadow-color-configuration-save-libs-gui.patch
Type: text/x-patch
Size: 1940 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-shadow-configuration-to-prefs-schema-libs-core.patch
Type: text/x-patch
Size: 2233 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-shadow-option-to-appearance-dialog-components.patch
Type: text/x-patch
Size: 15325 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Converted-shadow-images-to-alpha-masks-artwork.patch
Type: text/x-patch
Size: 2396 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Using-alpha-mask-for-page-shadow-drawing-writer.patch
Type: text/x-patch
Size: 3729 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Removed-no-more-used-shadow-images-writer.patch
Type: text/x-patch
Size: 1779 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Removed-now-useless-images-artwork.patch
Type: text/x-patch
Size: 1909 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Renamed-shadow-images-to-mask-writer.patch
Type: text/x-patch
Size: 3164 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0017.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Use-meaningful-names-for-shadow-images-artwork.patch
Type: text/x-patch
Size: 4277 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0018.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Handle-shadow-option-in-frame-painting-writer.patch
Type: text/x-patch
Size: 5580 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0019.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110308/734d4c6c/attachment-0001.pgp>


More information about the LibreOffice mailing list