Re: How to create round shape push buttons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roger Leigh wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

abhijeet singh panwar <dearabhi@xxxxxxxxx> writes:



I am new to GTK. Is there any way to create round shaped push buttons
with different colors. And on clicking on the button the color of the
button should change.



The colour change is easy. gtk_widget_modify_bg() will change the colour, and you can set the colour for various states (e.g. clicked, prelit etc.).

The shape isn't so easy.  I guess you could write a theme that drew
buttons as circles/ellipses, but I'm not aware of any that currently
exist.  Alternatively, you could draw an ellipse with the GNOME canvas
and use that as a button.


Regards, Roger

- -- Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>


iD8DBQFBzDERVcFcaSW/uEgRAj3yAJ9aPc/SfVazvg03/k+G9Mor7U5e/QCgmbmG
tVjTk4q/kT1G1NGY/SAqPhg=
=Srhq
-----END PGP SIGNATURE-----
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



You can use pixmap theme engine to make round buttons, by just creating images of the buttons and then by hard coding
the style for your app.


-todd

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux