Skip to content

Instantly share code, notes, and snippets.

@AnderRasoVazquez
Last active March 18, 2021 21:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnderRasoVazquez/38e0c37d7c38baf23f6f to your computer and use it in GitHub Desktop.
Save AnderRasoVazquez/38e0c37d7c38baf23f6f to your computer and use it in GitHub Desktop.
[Python Gtk red and blue button] How to use gtk styles to color buttons in GTK #GTK #Python
# blue button
button_equal = Gtk.Button()
button_equal.get_style_context().add_class(Gtk.STYLE_CLASS_SUGGESTED_ACTION)
# red button
button_clear = Gtk.Button()
button_clear.get_style_context().add_class(Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION)
@BlueCannonBall
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment