Module k.u.gadgets

Part of kiwi.ui
Graphical utilities: color management and eyecandy
Functiongdk_color_to_string
Convert a color to a #AABBCC string
Functionset_foreground
Set the foreground color of a widget:
Functionget_foreground
Return the foreground color of the widget as a string
Functionset_background
Set the background color of a widget:
Functionget_background
Return the background color of the widget as a string
Functionquit_if_lastUndocumented
ClassFadeOut
I am a helper class to draw the fading effect of the background
def gdk_color_to_string(color):
Convert a color to a #AABBCC string
def set_foreground(widget, color, state=gtk.STATE_NORMAL):
Set the foreground color of a widget:
  • widget: the widget we are changing the color
  • color: a hexadecimal code or a well known color name
  • state: the state we are afecting, see gtk.STATE_*
def get_foreground(widget, state=gtk.STATE_NORMAL):
Return the foreground color of the widget as a string
def set_background(widget, color, state=gtk.STATE_NORMAL):
Set the background color of a widget:
  • widget: the widget we are changing the color
  • color: a hexadecimal code or a well known color name
  • state: the state we are afecting, see gtk.STATE_*
def get_background(widget, state=gtk.STATE_NORMAL):
Return the background color of the widget as a string
def quit_if_last(*args):
Undocumented