From a24d8c0e93d70312fc90d5fdf6214ade9a475e92 Mon Sep 17 00:00:00 2001
From: Richard Maudsley <richard.maudsley@isode.com>
Date: Wed, 23 Jul 2014 16:07:47 +0100
Subject: Render selected highlight item rule in italic

Test-Information:

Verify that this is just a cosmetic change and does not effect operation of highlight dialog.

Change-Id: Ie0fd14bb5d90a3cfae1797bbe3daa7e724987584

diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index a5f49c2..5aa4560 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -172,6 +172,9 @@ void QtHighlightEditor::onNewButtonClicked()
 	highlightManager_->insertRule(row, newRule);
 	QListWidgetItem *item = new QListWidgetItem();
 	item->setText(P2QSTRING(formatShortDescription(newRule)));
+	QFont font;
+	font.setItalic(true);
+	item->setFont(font);
 	ui_.listWidget->insertItem(row, item);
 	selectRow(row);
 }
@@ -219,6 +222,9 @@ void QtHighlightEditor::onCurrentRowChanged(int currentRow)
 
 	if (previousRow_ != -1) {
 		if (ui_.listWidget->count() > previousRow_) {
+			QFont font;
+			font.setItalic(false);
+			ui_.listWidget->item(previousRow_)->setFont(font);
 			highlightManager_->setRule(previousRow_, ruleFromDialog());
 		}
 	}
@@ -227,6 +233,9 @@ void QtHighlightEditor::onCurrentRowChanged(int currentRow)
 		HighlightRule rule = highlightManager_->getRule(currentRow);
 		ruleToDialog(rule);
 		if (ui_.listWidget->currentItem()) {
+			QFont font;
+			font.setItalic(true);
+			ui_.listWidget->currentItem()->setFont(font);
 			ui_.listWidget->currentItem()->setText(P2QSTRING(formatShortDescription(rule)));
 		}
 	}
-- 
cgit v0.10.2-6-g49f6