[gedit-plugins/colorshemer] Foreground and background color need to be int when printed (prevents exception)
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins/colorshemer] Foreground and background color need to be int when printed (prevents exception)
- Date: Mon, 6 May 2019 17:37:51 +0000 (UTC)
commit 180e32329d2729bc9b2b8f755fb3e0001677f314
Author: Jordi Mas <jmas softcatala org>
Date: Mon May 6 19:37:33 2019 +0200
Foreground and background color need to be int when printed (prevents exception)
plugins/colorschemer/schemer/schemer.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/colorschemer/schemer/schemer.py b/plugins/colorschemer/schemer/schemer.py
index 1ab18dc..980f8e9 100644
--- a/plugins/colorschemer/schemer/schemer.py
+++ b/plugins/colorschemer/schemer/schemer.py
@@ -566,12 +566,12 @@ class GUI:
if data == self.colorbuttonBackground:
color = data.get_color()
self.dictAllStyles[self.selectedStyleId].background = ('#%02x%02x%02x' %
- (color.red * cScale, color.green * cScale, color.blue * cScale))
+ (int(color.red * cScale), int(color.green * cScale), int(color.blue * cScale)))
elif data == self.colorbuttonForeground:
color = data.get_color()
self.dictAllStyles[self.selectedStyleId].foreground = ('#%02x%02x%02x' %
- (color.red * cScale, color.green * cScale, color.blue * cScale))
+ (int(color.red * cScale), int(color.green * cScale), int(color.blue * cScale)))
elif data == self.togglebuttonBold:
self.dictAllStyles[self.selectedStyleId].bold = data.get_active()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]