Fixed getting the handle size (gtk2->gtk3 diff)

This commit is contained in:
Stephen Boddy 2015-06-19 03:20:54 +02:00
parent 9c9a37eb78
commit c12149089d
1 changed files with 3 additions and 1 deletions

View File

@ -198,7 +198,9 @@ class Paned(Container):
#3 Get ancestor x/y => a, and handle size => hs
avail_pixels=self.get_length()
handle_size = self.style_get_property('handle-size')
value = GObject.Value(int)
self.style_get_property('handle-size', value)
handle_size = value.get_int()
#4 Math! eek (a - (n * hs)) / (n + 1) = single size => s
single_size = (avail_pixels - (number_splits * handle_size)) / (number_splits + 1)
arr_sizes = [single_size]*(number_splits+1)