[kde-doc-english] [trojita] src/Gui: GUI: use the systemwide monospace font in the signature editor

Jan Kundrát jkt at flaska.net
Tue May 21 19:42:25 UTC 2013


Git commit 4b8a22a2020445fa9ccc5ce08ccca1d16850d496 by Jan Kundrát.
Committed on 21/05/2013 at 21:03.
Pushed by jkt into branch 'master'.

GUI: use the systemwide monospace font in the signature editor

M  +2    -8    src/Gui/SettingsDialog.cpp

http://commits.kde.org/trojita/4b8a22a2020445fa9ccc5ce08ccca1d16850d496

diff --git a/src/Gui/SettingsDialog.cpp b/src/Gui/SettingsDialog.cpp
index 9c4c8cf..faa82be 100644
--- a/src/Gui/SettingsDialog.cpp
+++ b/src/Gui/SettingsDialog.cpp
@@ -45,6 +45,7 @@
 #include "Composer/SenderIdentitiesModel.h"
 #include "Common/PortNumbers.h"
 #include "Common/SettingsNames.h"
+#include "Gui/Util.h"
 
 namespace Gui
 {
@@ -251,14 +252,7 @@ EditIdentity::EditIdentity(QWidget *parent, Composer::SenderIdentitiesModel *ide
     connect(this, SIGNAL(accepted()), m_mapper, SLOT(submit()));
     connect(this, SIGNAL(rejected()), this, SLOT(onReject()));
     setModal(true);
-
-    // See ComposeWidget.cpp for details on the selection of font
-    QFont font(QLatin1String("x-trojita-terminus-like-fixed-width"));
-    font.setStyleHint(QFont::TypeWriter);
-    signaturePlainTextEdit->setFont(font);
-    // The QFontMetrics prodocues weird results, unfortunately :(
-    /*QFontMetrics(font).boundingRect(
-        QLatin1String("A simple signature which spans 80 column is surprisingly hard to come up with...")).width()*/
+    signaturePlainTextEdit->setFont(Gui::Util::systemMonospaceFont());
 }
 
 void EditIdentity::enableButton()



More information about the kde-doc-english mailing list