[gedit-plugins] colorpicker: add_child_in_window changed the behavior
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] colorpicker: add_child_in_window changed the behavior
- Date: Thu, 9 Jan 2014 08:02:02 +0000 (UTC)
commit 5fb236e5ad7a2006169c9496bf1fb6424201b8c7
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Jan 9 08:22:23 2014 +0100
colorpicker: add_child_in_window changed the behavior
plugins/colorpicker/colorpicker.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/plugins/colorpicker/colorpicker.py b/plugins/colorpicker/colorpicker.py
index 21c27c4..7e7163f 100644
--- a/plugins/colorpicker/colorpicker.py
+++ b/plugins/colorpicker/colorpicker.py
@@ -252,14 +252,13 @@ class ColorPickerViewActivatable(GObject.Object, Gedit.ViewActivatable):
start, end = bounds
location = self.view.get_iter_location(start)
- win_x, win_y = self.view.buffer_to_window_coords(Gtk.TextWindowType.TEXT, location.x,
location.y)
min_width, nat_width = self._color_button.get_preferred_width()
min_height, nat_height = self._color_button.get_preferred_height()
- x = win_x
- if win_y - nat_height > 0:
- y = win_y - nat_height
+ x = location.x
+ if location.y - nat_height > 0:
+ y = location.y - nat_height
else:
- y = win_y + location.height
+ y = location.y + location.height
self.view.add_child_in_window(self._color_button, Gtk.TextWindowType.TEXT, x, y)
elif not rgba_str and self._color_button is not None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]