Skip to contentSkip to conversation

Select the text color based on whether the entry in highlighted.

PATCH Aneesh Kumar K.V 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

From: Pavel Roskin <[email protected]>
Subject: Select the text color based on whether the entry in highlighted. Use standard font.

---

 contrib/gitview/gitview |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

21154c68bf8b95e0db49d507ea34e0b8a51308df

contrib/gitview/gitview +11 -8
index 048caf6..aded7ed 100755
@@ -239,20 +239,23 @@ class CellRendererGraph(gtk.GenericCellR
 				box_size / 4, 0, 2 * math.pi)
 
 
+		self.set_colour(ctx, colour, 0.0, 0.5)
+		ctx.stroke_preserve()
+
+		self.set_colour(ctx, colour, 0.5, 1.0)
+		ctx.fill_preserve()
+
 		if (len(names) != 0):
 			name = " "
 			for item in names:
 				name = name + item + " "
 
-			ctx.select_font_face("Monospace")
 			ctx.set_font_size(13)
-			ctx.text_path(name)
-
-		self.set_colour(ctx, colour, 0.0, 0.5)
-		ctx.stroke_preserve()
-
-		self.set_colour(ctx, colour, 0.5, 1.0)
-		ctx.fill()
+			if (flags & 1):
+				self.set_colour(ctx, colour, 0.5, 1.0)
+			else:
+				self.set_colour(ctx, colour, 0.0, 0.5)
+			ctx.show_text(name)
 
 class Commit:
 	""" This represent a commit object obtained after parsing the git-rev-list
Signature · 1 line
1.2.3.gc55f-dirty