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

List:       konsole-devel
Subject:    [Konsole-devel]
From:       Waldo Bastian <bastian () kde ! org>
Date:       2003-06-03 12:11:33
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Qt assigns space to empty layouts leading to extra pixels that are undesired.

This problem becomes very clear with a QMainWindow in full-screen mode. 
Without any toolbar, statusbar or menubar the central widget should cover the 
full screen. However, topDock and bottomDock still get inserted in a 
QBoxLayout in that case and get space allocated, even though they have 
nothing to show. This makes that the central widget becomes 2 pixels less 
high than the screen.

See also http://bugs.kde.org/show_bug.cgi?id=42320

The following patch fixes the problem.

Cheers,
Waldo
- -- 
bastian@kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+3JB5N4pvrENfboIRAu3BAKCqPTmR047uNbizeuUGaT2VtDrRlQCdEe4H
bQ9qwAkOYnsVTZzcaICfwgo=
=3/HN
-----END PGP SIGNATURE-----

["qt_layout.patch" (text/x-diff)]

Index: kernel/qabstractlayout.cpp
===================================================================
RCS file: /home/kde/qt-copy/src/kernel/qabstractlayout.cpp,v
retrieving revision 1.49
diff -u -r1.49 qabstractlayout.cpp
--- kernel/qabstractlayout.cpp	30 Oct 2002 01:54:07 -0000	1.49
+++ kernel/qabstractlayout.cpp	3 Jun 2003 11:43:03 -0000
@@ -412,8 +412,8 @@
 	hfw = wid->maximumHeight();
     if ( hfw < wid->minimumHeight() )
 	hfw = wid->minimumHeight();
-    if ( hfw < 1 )
-	hfw = 1;
+    if ( hfw < 0 )
+	hfw = 0;
     return hfw;
 }
 
@@ -514,7 +514,7 @@
 	if ( wid->sizePolicy().verData() == QSizePolicy::Ignored )
 	    s.setHeight( 1 );
 	s = s.boundedTo( wid->maximumSize() )
-	    .expandedTo( wid->minimumSize() ).expandedTo( QSize(1, 1) );
+	    .expandedTo( wid->minimumSize() ).expandedTo( QSize(0, 0) );
     }
     return s;
 }
Index: widgets/qdockarea.cpp
===================================================================
RCS file: /home/kde/qt-copy/src/widgets/qdockarea.cpp,v
retrieving revision 1.22
diff -u -r1.22 qdockarea.cpp
--- widgets/qdockarea.cpp	30 Oct 2002 01:54:24 -0000	1.22
+++ widgets/qdockarea.cpp	3 Jun 2003 11:43:07 -0000
@@ -313,7 +311,7 @@
 	s = QMAX( s, dock_strut( dw, orientation() ) );
     }
 
-    return orientation() == Horizontal ? QSize( 0, s+2 ) :  QSize( s, 0 );
+    return orientation() == Horizontal ? QSize( 0, s ? s+2 : 0 ) :  QSize( s, 0 );
 }
 
 


_______________________________________________
konsole-devel mailing list
konsole-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/konsole-devel


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

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