Change the Mercurial log browser such, that the current log entry is highlighted with a bold font.

Sat, 28 Jan 2017 12:39:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 28 Jan 2017 12:39:43 +0100
changeset 5448
1a86766ed19a
parent 5446
7f48d7f8eef0
child 5449
7679d1d3671a

Change the Mercurial log browser such, that the current log entry is highlighted with a bold font.

Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Fri Jan 27 19:18:52 2017 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Jan 28 12:39:43 2017 +0100
@@ -175,6 +175,11 @@
         self.logTree.headerItem().setText(
             self.BookmarksColumn, self.tr("Bookmarks"))
         
+        self.__logTreeNormalFont = self.logTree.font()
+        self.__logTreeNormalFont.setBold(False)
+        self.__logTreeBoldFont = self.logTree.font()
+        self.__logTreeBoldFont.setBold(True)
+        
         self.detailsEdit.anchorClicked.connect(self.__revisionClicked)
         
         self.__initActionsMenu()
@@ -1384,6 +1389,11 @@
         self.__updateGui(current)
         self.__updateDiffButtons()
         self.__updateToolMenuActions()
+        
+        # Highlight the current entry using a bold font
+        for col in range(self.logTree.columnCount()):
+            current and current.setFont(col, self.__logTreeBoldFont)
+            previous and previous.setFont(col, self.__logTreeNormalFont)
     
     @pyqtSlot()
     def on_logTree_itemSelectionChanged(self):

eric ide

mercurial