[Konsole-devel] [Bug 163178] New: Terminal text locked at 0, 0 when placed in a graphics view using a QGraphicsProxyWidget.

Jared Kells jkells at gmail.com
Wed Jun 4 00:40:00 UTC 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=163178         
           Summary: Terminal text locked at 0,0 when placed in a graphics
                    view using a QGraphicsProxyWidget.
           Product: konsole
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: konsole-devel kde org
        ReportedBy: jkells gmail com


Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

I am trying to embed the Konsole KPart in a plasma plasmoid using a QGraphicsProxyWidget. Unfortunately the text area of the terminal sits locked in the top left corner of the screen no matter where I place the QGraphicsProxyWidget in the scene. 

Interestingly the scroll bar is drawn correctly so I suspected the konsole might be doing something a little funny.

I found three lines that move the konsole to the top left corner and reset the rotation. Removing them fixed my problem see attached patch for reference.

Robert Knight explains the reason for the code.
> They are there to support double width and double height lines.  Not a hugely
> important feature but it is there to make the "vttest" terminal test suite work 
> better.  The code can be rewritten so that it pushes a new transform matrix onto > he stack and pops it afterwards rather than resetting the painter's world
> transform back to the defaults after every line.  

PATCH:
Index: TerminalDisplay.cpp
===================================================================
--- TerminalDisplay.cpp	(revision 816076)
+++ TerminalDisplay.cpp	(working copy)
 @ -1390,8 +1390,8  @
 		 //transformation has been applied to the painter.  this ensures that 
 		 //painting does actually start from textArea.topLeft() 
          //(instead of textArea.topLeft() * painter-scale)	
-		 QTransform inverted = paint.worldTransform().inverted();
-		 textArea.moveTopLeft( inverted.map(textArea.topLeft()) );
+		//QTransform inverted = paint.worldTransform().inverted();
+		//textArea.moveTopLeft( inverted.map(textArea.topLeft()) );
 		 
 		 //paint text fragment
          drawTextFragment(	paint,
 @ -1404,7 +1404,7  @
 		 _fixedFont = save__fixedFont;
      
 		 //reset back to single-width, single-height _lines 
-		 paint.resetMatrix();
+		 //paint.resetMatrix();
 
 		 if (y < _lineProperties.size()-1)
 		 {



More information about the konsole-devel mailing list