diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-23 15:07:47 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-10-01 10:42:52 (GMT) |
commit | a24d8c0e93d70312fc90d5fdf6214ade9a475e92 (patch) | |
tree | 8de1ed6624b5c2b12de890af7836b3e0a0dd2331 /Swift/QtUI | |
parent | 494ee542b0b7cb9a2eb9997865b9ba89a16715bc (diff) | |
download | swift-a24d8c0e93d70312fc90d5fdf6214ade9a475e92.zip swift-a24d8c0e93d70312fc90d5fdf6214ade9a475e92.tar.bz2 |
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
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtHighlightEditor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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))); } } |