Re: GtkDrawingArea size request
- From: cecashon aol com
- To: ruben_gr live com pt, gtk-app-devel-list gnome org
- Subject: Re: GtkDrawingArea size request
- Date: Thu, 22 Jun 2017 14:05:00 -0400
Hi Ruben,
You might consider allowing the gauge to expand with the window size. This makes the gauge a lot more
flexible. When drawing a gauge it is useful to get a general coordinate drawing on screen that you can check
your gauge drawing with. Both cartesian coordinates and radial coordinates are useful to check your drawing.
There is a general layout drawing in the following.
https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/gears2.c
You can use set sizes if you want to also. To keep your drawing area window size a set size check your
vexpand and hexpand properties. Make sure they are false. Try using a GtkGrid instead of a GtkBox. Put the
drawing area in a scrolled window and put that in the grid.
I have done some work drawing gauges and have a couple packaged as widgets. There are also some drawings of
clocks, gauges, gems and gears in the above github cairo_drawings folder. Some resize as circles and some as
ellipses. They might be helpful getting something that you can test a gauge drawing with.
Eric
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]