# HG changeset patch # User K. Arvanitis kosta@alumni.uvic.ca # Date 1420446283 28800 # Mon Jan 05 00:24:43 2015 -0800 # Node ID 416d72c5bcf22a0915e0afa1c6188c3212805605 # Parent 0ccddc8155647a3fb78d2eda13b098e7c2b59f94 [PATCH] Improves appearance of tab close button
Utilizes the stock gtk icon for the gtk Notebook close button label in place of the previously used letter 'X'. Tested this on both Linux and Windows with success.
This change is obviously subjective and may or may not be preferred by some individuals, however the use of stock gtk components has generally been considered good practice assuming they are supported on by target platform.
diff -r 0ccddc815564 -r 416d72c5bcf2 chirpui/editorset.py --- a/chirpui/editorset.py Thu Jan 01 19:02:09 2015 +0100 +++ b/chirpui/editorset.py Mon Jan 05 00:24:43 2015 -0800 @@ -170,8 +170,14 @@ self.text_label.show() self.label.pack_start(self.text_label, 1, 1, 1)
- button = gtk.Button("X") + button = gtk.Button() button.set_relief(gtk.RELIEF_NONE) + button.set_focus_on_click(False) + + icon = gtk.image_new_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU) + icon.show() + button.add(icon) + button.connect("clicked", lambda x: self.emit("want-close")) button.show() self.label.pack_start(button, 0, 0, 0)