[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Minimum size of embedded documents
From:       Philipp =?iso-8859-1?q?M=FCller?= <philipp.mueller () gmx ! de>
Date:       2002-11-21 20:11:53
[Download RAW message or body]

Am Mittwoch, 20. November 2002 22:01 schrieb David Faure:
> On Wednesday 20 November 2002 21:50, Philipp Müller wrote:
> > Yes, I thought about this one too.
> > What would be the common usage? Shift-Ctrl-(left)mouseClick for the
> > start?
>
> Usually (in iconviews, and in kpresenter), it's simply "clicking where no
> object is". But in KWord and KSpread that's a bit hard to find :)
>
> Ctrl+Shift.... why not. This one might be still free in KWord.

So let's keep it in mind if someone steps up and implement it.

> > Alt-mouseClick should be something different in KWord (selecting a rect
> > in the floating text. Ever tried this with MS Word?).
>
> Alt+mouseclick is already taken by kwin, it moves the window....

Damned... So let's skip KWin and go for compatibility in KWord.
Just kidding ;-)

> > > > See patch. Maybe the #define should be more central and/or have a
> > > > more descriptive name.
> > >
> > > Would be better as a static int of the class, indeed, so that the
> > > koffice apps can request for it, and implement the same minimum when
> > > inserting new embedded objects...
> >
> > Which class do you mean? I have 3 classes, 2 derived from QObject
> > (handler in kocore and in kspread), and 1 derived from QWidgets
> > (koFrame).
> > Or do you mean a new class with this one value only?
>
> I meant in KoChild. Where it is doesn't really matter, if it's static and
> public, but if KoChild is the one using it, this would be the best place,
> no?

Oh yes, that's a much better place, and I don't think we need a static int 
whatever.

The reimplementation in the apps is not needed with this approach. There is 
only one place where the geometry is set. It's in setGeometry() ;-) If we 
place here the check, it will never become 0 again.

See patch:

Index: koChild.cc
===================================================================
RCS file: /home/kde/koffice/lib/kofficecore/koChild.cc,v
retrieving revision 1.7
diff -u -3 -p -r1.7 koChild.cc
--- koChild.cc  2001/08/10 16:39:24     1.7
+++ koChild.cc  2002/11/21 19:57:54
@@ -75,6 +75,13 @@ void KoChild::setGeometry( const QRect &
     d->m_old = framePointArray();

   d->m_geometry = rect;
+
+  //Childs should have a minimum size of 3, so they can be selected
+  if( d->m_geometry.width() < 3 )
+    d->m_geometry.setWidth( 3 );
+
+  if( d->m_geometry.height() < 3 )
+    d->m_geometry.setHeight( 3 );

   updateMatrix();


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic