use the correct size of the icon when computing transparent lock icon
This commit is contained in:
parent
2d7b41ecb9
commit
9efa1a9cb4
1 changed files with 4 additions and 2 deletions
|
@ -178,7 +178,9 @@ class RosterWindow:
|
|||
rowstride = tls_pixbuf.get_rowstride()
|
||||
pixels = tls_pixbuf.get_pixels()
|
||||
new_pixels = ''
|
||||
for i in range(0, 16*16):
|
||||
width = tls_pixbuf.get_width()
|
||||
height = tls_pixbuf.get_height()
|
||||
for i in range(0, width*height):
|
||||
rgb = pixels[4*i:4*i+3]
|
||||
new_pixels += rgb
|
||||
if rgb == chr(0)*3:
|
||||
|
@ -186,7 +188,7 @@ class RosterWindow:
|
|||
else:
|
||||
new_pixels += chr(128)
|
||||
tls_pixbuf = gtk.gdk.pixbuf_new_from_data(new_pixels, colorspace,
|
||||
True, bps, 16, 16, rowstride)
|
||||
True, bps, width, height, rowstride)
|
||||
model[iter][C_SECPIXBUF] = tls_pixbuf
|
||||
else:
|
||||
model[iter][C_SECPIXBUF] = None
|
||||
|
|
Loading…
Add table
Reference in a new issue