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

List:       kde-bugs-dist
Subject:    Bug#24999: gnupg encrypt extremely wide window
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <ingo.kloecker () epost ! de>
Date:       2001-05-01 17:19:02
[Download RAW message or body]

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

On Tuesday, 1. May 2001 14:00, Nathan W. Labadie wrote:
> The actual encryption that is displayed looks fine. It's the length
> of the window that it is displayed in that it way too wide. I seem to
> get this every time. There is not any text that is displayed too
> wide. I'm using GPG v1.0.5.

I checked the source code. The width of the window is set to 50 times 
the width of the widest character in the chosen font. So you have 
either chosen a very wide font or the font metrics for the font you 
chose are wrong.

The attached patch should restrict the maximal width of the window to a 
reasonable value (about 80 pixel less than the width of the desktop). 
Please try it and tell me if it's O.K.

Regards,
Ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE67vAGGnR+RTDgudgRAvoPAJ4wHz+lFx2Q4GDXhDB/wkunxLbrPQCgpi7L
fO8oEWZ1oXev6v5g1ybULqA=
=FSSN
-----END PGP SIGNATURE-----

["restrict_pgpresult_window_width.diff" (text/plain)]

--- libkdenetwork/kpgp.cpp~	Wed Apr 18 23:26:02 2001
+++ libkdenetwork/kpgp.cpp	Tue May  1 18:55:49 2001
@@ -1196,7 +1196,10 @@ KpgpCipherTextDlg::KpgpCipherTextDlg( co
 
   mEditBox = new QMultiLineEdit( page );
   mEditBox->setMinimumHeight( fontMetrics().lineSpacing() * 25 );
-  mEditBox->setMinimumWidth( fontMetrics().maxWidth() * 50 );
+  int width = fontMetrics().maxWidth() * 50;
+  if (width > QApplication::desktop()->width() - 100)
+    width = QApplication::desktop()->width() - 100;
+  mEditBox->setMinimumWidth( width );
   mEditBox->setReadOnly(true);
   topLayout->addWidget( mEditBox, 10 );
 


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

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