# HG changeset patch # User Erik Grinaker # Date 1138302927 0 # Node ID 22f68317f8b1205dcdf778ee909759d1743f5ab5 # Parent ba434a17e65111b675f8b36f8f4ebb8a7d325d00 fixed some rendering issues with the new password entry diff -r ba434a17e65111b675f8b36f8f4ebb8a7d325d00 -r 22f68317f8b1205dcdf778ee909759d1743f5ab5 ChangeLog --- a/ChangeLog Thu Jan 26 17:25:29 2006 +0000 +++ b/ChangeLog Thu Jan 26 19:15:27 2006 +0000 @@ -2,6 +2,10 @@ ---------------[ 2006-01-26 : 0.4.6 ]--------------- +2006-01-26 Erik Grinaker + + * fixed some rendering issues with the new password entry + 2006-01-25 Erik Grinaker * ~ in filenames will now be expanded to homedir diff -r ba434a17e65111b675f8b36f8f4ebb8a7d325d00 -r 22f68317f8b1205dcdf778ee909759d1743f5ab5 src/lib/ui.py --- a/src/lib/ui.py Thu Jan 26 17:25:29 2006 +0000 +++ b/src/lib/ui.py Thu Jan 26 19:15:27 2006 +0000 @@ -706,7 +706,6 @@ # set up ui self.hbox = HBox() - self.hbox.set_size_request(-1, 16) self.add(self.hbox) self.entry = Entry(text) @@ -714,9 +713,12 @@ self.hbox.pack_start(self.entry) self.iconebox = EventBox() - self.iconebox.set_border_width(2) self.iconebox.set_visible_window(False) + self.iconalign = Alignment(1.0, 0.5, 0, 0) + self.iconalign.set_padding(1, 1, 0, 2) + self.iconalign.add(self.iconebox) + # connect signals self.connect("expose-event", self.__cb_expose) self.connect("size-allocate", self.__cb_size_allocate) @@ -732,8 +734,8 @@ def __cb_expose(self, widget, data): "Draws the widget borders on expose" + allocation = self.get_allocation() style = self.entry.get_style() - allocation = self.get_allocation() intfocus = self.entry.style_get_property("interior-focus") focuswidth = self.entry.style_get_property("focus-line-width") @@ -780,14 +782,10 @@ requisition.width = self.border_width * 2 requisition.height = self.border_width * 2 - - self.ensure_style() xborder, yborder = self.__entry_get_borders() - if self.child.get_property("visible") == True: - child_width, child_height = self.child.size_request() - requisition.width += child_width - requisition.height += child_height + entrywidth, entryheight = self.entry.size_request() + requisition.height += entryheight >= 18 and entryheight or 18 requisition.width += 2 * xborder requisition.height += 2 * yborder @@ -832,8 +830,8 @@ if self.icon != None and self.icon.get_stock()[0] == stock: return - if self.iconebox in self.hbox.get_children(): - self.hbox.remove(self.iconebox) + if self.iconalign in self.hbox.get_children(): + self.hbox.remove(self.iconalign) self.iconebox.remove(self.icon) self.icon.destroy() self.icon = None @@ -843,7 +841,7 @@ self.icon = Image(stock, ICON_SIZE_ENTRY) self.iconebox.add(self.icon) - self.hbox.pack_start(self.iconebox, False, False) + self.hbox.pack_start(self.iconalign, False, False) self.hbox.show_all()