From kmail-devel Tue May 01 17:19:02 2001 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Tue, 01 May 2001 17:19:02 +0000 To: kmail-devel Subject: Bug#24999: gnupg encrypt extremely wide window X-MARC-Message: https://marc.info/?l=kmail-devel&m=98874393932526 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_QR2OO5H5QK09WF4OCIV6" --------------Boundary-00=_QR2OO5H5QK09WF4OCIV6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit -----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----- --------------Boundary-00=_QR2OO5H5QK09WF4OCIV6 Content-Type: text/plain; charset="iso-8859-1"; name="restrict_pgpresult_window_width.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="restrict_pgpresult_window_width.diff" --- 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 ); --------------Boundary-00=_QR2OO5H5QK09WF4OCIV6-- _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail