r20518 by craig -

scribus-commit scribus-commit at lists.scribus.net
Mon Nov 2 12:35:53 UTC 2015


Author: craig
Date: Mon Nov  2 12:35:53 2015
New Revision: 20518

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20518
Log:
#13485: Replace Ctrl with ⌘ in tooltips

Modified:
    trunk/Scribus/scribus/scraction.cpp

Modified: trunk/Scribus/scribus/scraction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20518&path=/trunk/Scribus/scribus/scraction.cpp
==============================================================================
--- trunk/Scribus/scribus/scraction.cpp	(original)
+++ trunk/Scribus/scribus/scraction.cpp	Mon Nov  2 12:35:53 2015
@@ -20,6 +20,7 @@
  ***************************************************************************/
 #include <QMenu>
 #include <QIcon>
+#include <QSysInfo>
 #include <QVector>
 #include "scraction.h"
 #include "scribus.h"
@@ -167,19 +168,25 @@
 	if (sct.isEmpty())
 		QAction::setToolTip("<qt>" + cleanMenuText() + "</qt>");
 	else
+	{
+		if (QSysInfo::productType()=="osx")
+			sct.replace("Ctrl","⌘");
 		QAction::setToolTip("<qt>" + cleanMenuText() + " (" + sct + ")" + "</qt>");
+	}
 }
 
 void ScrAction::setStatusTextAndShortcut(const QString& statusText)
 {
 	QString sct(shortcut().toString());
+	qDebug()<<sct;
 	if (sct.isEmpty())
 		QAction::setStatusTip(statusText);
 	else
+	{
+		if (QSysInfo::productType()=="osx")
+			sct.replace("Ctrl","⌘");
 		QAction::setStatusTip(statusText + " (" + sct + ")");
-	//	QAction::setStatusTip("<qt>" + statusText + "</qt>");
-	//else
-	//	QAction::setStatusTip("<qt>" + statusText + " (" + sct + ")" + "</qt>");
+	}
 }
 
 int ScrAction::getMenuIndex() const




More information about the scribus-commit mailing list