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

List:       koffice
Subject:    Re: A bug fixed patch of KPresenter.
From:       Toshitaka Fujioka <tositaka () soft ! kusa ! ac ! jp>
Date:       2001-01-23 16:29:27
[Download RAW message or body]

Hello.

Werner Trobin wrote:

> Toshitaka Fujioka wrote:
> 
>> Hello.
>> 
>> I made the patch which fixed a bug of text object of KPresenter
>> (Pen Style does not work precisely).
>> (CVS of 19/01)
> 
> 
> Well, the problem is that you have to set some
> border, even if "no pen" is set. The current
> version works in presentation mode, but doesn't
> work in editing mode. I'll probably implement a
> solution like this:
> If there is a user setting for the pen I'll use that
> and if there's none I'll simply use some grey color
> with the current line style. This should be easy to
> distinguish... I hope so, at least.

I thank your advice. :-)

I remade a patch.
I display in editing mode at a black dot line (no pen style).

# Thought I was going to make being grey collar, it was no possible.
# A color of a line becomes black even if I set any kind of color.

Nothing is displayed in presentation mode (no pen style).
(CVS of 19/01).

I attached a patch.
Please try to use.


["koffice-kpresenter-bugfix-20010124.diff" (text/plain)]

diff -ur koffice.org/kpresenter/kpobject.cc koffice/kpresenter/kpobject.cc
--- koffice.org/kpresenter/kpobject.cc	Tue Jan 23 17:28:49 2001
+++ koffice/kpresenter/kpobject.cc	Wed Jan 24 00:50:04 2001
@@ -65,6 +65,7 @@
     cmds = 0;
     move = false;
     dcop = 0;
+    penJudgment = QPen( Qt::black, 1, Qt::NoPen );
 }
 
 KPObject::~KPObject()
@@ -369,7 +370,11 @@
             _painter->setWorldMatrix( m, true );
         }
 
-        _painter->setPen( QPen( Qt::black, 1, Qt::DotLine ) );
+        if ( penJudgment.style() == Qt::NoPen )
+            _painter->setPen( QPen( Qt::black, 1, Qt::DotLine ) );
+        else
+            _painter->setPen( Qt::NoPen );
+
         _painter->setBrush( Qt::NoBrush );
         _painter->drawRect( 0, 0, ext.width(), ext.height() );
 
diff -ur koffice.org/kpresenter/kpobject.h koffice/kpresenter/kpobject.h
--- koffice.org/kpresenter/kpobject.h	Tue Jan 23 17:28:49 2001
+++ koffice/kpresenter/kpobject.h	Wed Jan 24 00:50:47 2001
@@ -202,6 +202,8 @@
 
     DCOPObject *dcop;
 
+    QPen penJudgment;
+
 };
 
 #endif
diff -ur koffice.org/kpresenter/kptextobject.cc koffice/kpresenter/kptextobject.cc
--- koffice.org/kpresenter/kptextobject.cc	Tue Jan 23 17:28:49 2001
+++ koffice/kpresenter/kptextobject.cc	Wed Jan 24 00:53:46 2001
@@ -456,6 +456,7 @@
         else
             _painter->drawPixmap( penw, penw, *gradient->getGradient(), 0, 0, ow - 2 \
* penw, oh - 2 * penw );  
+        penJudgment = pen;
         _painter->setPen( pen );
         _painter->setBrush( Qt::NoBrush );
         _painter->drawRect( penw, penw, ow - 2 * penw, oh - 2 * penw );



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

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