Draw a prelight for toolbuttons from the toolbutton instead of relying on the button.
This commit is contained in:
		
							parent
							
								
									59d2ba5c26
								
							
						
					
					
						commit
						3c99f9f1ea
					
				| @ -51,6 +51,14 @@ class RadioToolButton(gtk.RadioToolButton): | ||||
|         if self._palette and self._palette.is_up(): | ||||
|             invoker = self._palette.props.invoker | ||||
|             invoker.draw_rectangle(event, self._palette) | ||||
|         elif self.child.state == gtk.STATE_PRELIGHT: | ||||
|             self.child.style.paint_box(event.window, gtk.STATE_PRELIGHT, | ||||
|                                        gtk.SHADOW_NONE, event.area, | ||||
|                                        self.child, "toolbutton-prelight", | ||||
|                                        self.allocation.x, | ||||
|                                        self.allocation.y, | ||||
|                                        self.allocation.width, | ||||
|                                        self.allocation.height) | ||||
| 
 | ||||
|         gtk.RadioToolButton.do_expose_event(self, event) | ||||
|      | ||||
|  | ||||
| @ -47,6 +47,14 @@ class ToggleToolButton(gtk.ToggleToolButton): | ||||
|         if self._palette and self._palette.is_up(): | ||||
|             invoker = self._palette.props.invoker | ||||
|             invoker.draw_rectangle(event, self._palette) | ||||
|         elif self.child.state == gtk.STATE_PRELIGHT: | ||||
|             self.child.style.paint_box(event.window, gtk.STATE_PRELIGHT, | ||||
|                                        gtk.SHADOW_NONE, event.area, | ||||
|                                        self.child, "toolbutton-prelight", | ||||
|                                        self.allocation.x, | ||||
|                                        self.allocation.y, | ||||
|                                        self.allocation.width, | ||||
|                                        self.allocation.height) | ||||
| 
 | ||||
|         gtk.ToggleToolButton.do_expose_event(self, event) | ||||
|      | ||||
|  | ||||
| @ -51,6 +51,14 @@ class ToolButton(gtk.ToolButton): | ||||
|         if self._palette and self._palette.is_up(): | ||||
|             invoker = self._palette.props.invoker | ||||
|             invoker.draw_rectangle(event, self._palette) | ||||
|         elif self.child.state == gtk.STATE_PRELIGHT: | ||||
|             self.child.style.paint_box(event.window, gtk.STATE_PRELIGHT, | ||||
|                                        gtk.SHADOW_NONE, event.area, | ||||
|                                        self.child, "toolbutton-prelight", | ||||
|                                        self.allocation.x, | ||||
|                                        self.allocation.y, | ||||
|                                        self.allocation.width, | ||||
|                                        self.allocation.height) | ||||
| 
 | ||||
|         gtk.ToolButton.do_expose_event(self, event) | ||||
|      | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Benjamin Berg
						Benjamin Berg