Hi there !

On Tue, 2011-04-26 at 12:25 +0400, Георгий Сапронов wrote:
> Rafael Cabral from Mandriva recommended you as professional in
> OpenOffice developing.

        Good man :-) but really the best thing is to CC the public development
list: don't be afraid - we're quite friendly.

        libreoffice@lists.freedesktop.org

        please CC your replies to this there :-) it is much quicker and you get
replies when I'm on holiday / busy etc.

> I and Dmitry Ashkadov (in CC) making changes in OpenOffice. But we get
> in trouble. We'll be glad if you could help us a little :)

        We love changes :-)

> 1. Can we create graphical element (I mean to implement class inherit
> from Window class VCL module) so this element can float on top of its
> parent. What methods we should override and how add it so it can
> receive mouse events?

        Ah - so Window is misleading, that is a very low base class. You want
to inherit from eg. Dialog, or SystemWindow I suspect.

> 2. In the SwEditWin class we have override Paint() function in which
> we want to draw a background.

        Oooh - fun :-)

>  The ViewShell class has _PaintDesktop() function where background
> draw partly. If we comment _PaintDesktop function to prevent
> background drawing  we'll receive white background. And if we draw
> something in SwEditWin::Paint() we have the same white background. If
> we comment in SwEditWin::Paint() line pWrtShell->Paint(...) background
> will not paint in white. So we can't understand where occurs white
> paint. What do you think?

        Well; you sure it is white ? I had a hack at this in the past - I
attach my nasty patch to writer to make shockingly ugly looking
gradients in the background ;-) hopefully it shows you where to hack.
Having said that I think some of that code needs cleaning up really :-)

        ATB,

                Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot

--- Begin Message ---
Hi guys,

On Sat, 2011-01-08 at 22:20 +0100, Christoph Noack wrote:
> Am Samstag, den 08.01.2011, 02:05 +0100 schrieb Bernhard Dippold:
> > > I was thinking of a nice background instead of a static colour.
> > > You can find some of my design here
> > > http://rahulprasad.com/public/libreOffice/writer/
..
> "That's one small step for developer, one giant leap for LibreOffice."

        Well - it is a few lines of code for sure. I attach the awful hack to
give a weirdo gradient as the background instead of grey; picture here
http://users.freedesktop.org/~michael/gradient.png - most likeyl I can't
sepell either ;-)

        Anyhow - the patch is clearly too simple - we need to get offsets right
for re-painting sub-regions.

> The very first step is, indeed, to know how much effort it required to
> show graphics (whatever kind) on / instead of the application
> background.

        It is really rather easy I think. The complexity is mostly around good
taste [ which often vanishes at this point ], and about the
interactions.

        Eg. having a forest scene is all well and good - relaxing etc. but it
could (potentially) break the desktop metaphore - at least, as I see a
viewport scroll, I don't think of it sliding pages over a document, I
think of myself as moving down the document ;-) [ perhaps this is just
me ]. The problem with my view though, is - where do we get more image
from to back a 1000 page document ? ie. I don't think photos work here,
unless they are static, which would prolly look odd.

        Other problems:

        * we can of course only do this for 'writer' and
          'draw/impress' I guess; we should do both, not just one.

        * this may give us some very real performance hit when
          scrolling on older hardware [ or perhaps not - hard to
          know ] - currently we pull out a lot of stops to try to
          get smooth scrolling; this could vandalise all that quite
          easily.

        Of course; making the page surround / backdrop somewhat more pleasant
to look at and sexy is not impossibly difficult either; but gradients
are effectively images: they cost CPU. Probably we need to reconcile
ourselves to this sometime (like right now), but having a team of people
enthusiastic to fight off the "it doesn't work on my 486 with Trident
graphics anymore" chappies would be appreciated.

> In context, it is on "our" proposal collection page for the StartCenter:
> http://wiki.services.openoffice.org/wiki/User_Experience/StartCenter#Mockups

        I guess the start center is another target, with (no doubt) a different
code path again.

> Ouch! Some time before (2007?), I have been told that changing anything
> which is beyond the document border is pretty hard. I would be more than
> happy if anything can prove this to be wrong ;-)

        ;-)

> This (for example) is the reason for not having shadows on the right
> side for the Writer comments/notes (instead, we live with 80's style
> shadow for the pages).

        Really ? we should have an easy hack to improve that too I suppose. I
was going to add a number today from the UI suggestions, but didn't get
there - sorry ...

        Hmm,

                Michael.

-- 
 michael.me...@novell.com  <><, Pseudo Engineer, itinerant idiot

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 72dcebc..7285071 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1486,6 +1486,8 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
         _PaintDesktop( aRegion );
 }
 
+#include <vcl/gradient.hxx>
+
 void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
 {
     GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
@@ -1526,9 +1528,14 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
 
         // #i75172# needed to move line/Fill color setters into loop since DLPrePaint2
         // may exchange GetOut(), that's it's purpose. This happens e.g. at print preview.
+#ifdef BORING
         GetOut()->SetFillColor( SwViewOption::GetAppBackgroundColor());
         GetOut()->SetLineColor();
         GetOut()->DrawRect(aRectangle);
+#else // fun
+        Gradient g(GRADIENT_LINEAR, Color(COL_RED), Color(COL_BLUE));
+        GetOut()->DrawGradient(aRectangle, g);
+#endif
 
         DLPostPaint2(false);
     }

--- End Message ---
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to