Revision: 02c3dc8b1f2f
Branch: default
Author: gbtami
Date: Thu Jan 1 08:30:37 2015 UTC
Log: Fixed piece theme iconview spacing
https://code.google.com/p/pychess/source/detail?r=02c3dc8b1f2f
Modified:
/lib/pychess/widgets/preferencesDialog.py
=======================================
--- /lib/pychess/widgets/preferencesDialog.py Wed Dec 31 10:05:22 2014 UTC
+++ /lib/pychess/widgets/preferencesDialog.py Thu Jan 1 08:30:37 2015 UTC
@@ -552,6 +552,18 @@
iconView.set_pixbuf_column(0)
iconView.set_text_column(1)
+ #############################################
+ # Hack to fix spacing problem in iconview
+ #
http://stackoverflow.com/questions/14090094/what-causes-the-different-display-behaviour-for-a-gtkiconview-between-different
+ def keep_size(crt, *args):
+ crt.handler_block(crt_notify)
+ crt.set_property('width', 40)
+ crt.handler_unblock(crt_notify)
+
+ crt, crp = iconView.get_cells()
+ crt_notify = crt.connect('notify', keep_size)
+ #############################################
+
def _get_active(iconview):
model = iconview.get_model()
selected = iconview.get_selected_items()