Commit Graph

19 Commits

Author SHA1 Message Date
Daniel Boles
5f24d87a5b testframe: Don’t unnecessarily query the padding
The [hv]padding variables control and hence track this.
Also, simplify the CSS using shorthand 2-value notation (again).
2017-03-07 01:32:24 +00:00
Daniel Boles
ec30a03153 testframe: Actually set the padding
The CSS was targeting node GtkFrame, which is wrong: it is called frame.

This commit also assumes the interesting padding is that between the
border and the child widget, not the padding around the entire Frame.
Some additional hoops must be jumped through to preserve padding values
not being changed in either callback. However, the way this is done
means I must set the initial paddings to 0, which simplifies main().
2017-03-07 01:04:34 +00:00
Daniel Boles
685493075f testframe: Add CheckButton to toggle border off/on
We should test this.
2017-03-07 01:04:34 +00:00
Daniel Boles
39d5f22774 testframe: Order controls better & improve labels
The :label-widget is drawn before the child, so put the controls that
set the alignment of the :label-widget before those that pad the child.

We set (horizontal|vertical) padding, not "[xy]thickness". Also change
to "label [xy]align" & use grid spacing, not spaces at end of Labels.
2017-03-07 01:04:34 +00:00
Daniel Boles
9f1916f29e testframe: Minimise typecasts 2017-03-07 01:02:08 +00:00
Daniel Boles
5059348d9f testframe: Set value before connecting callbacks
The value comes from the widget, and we were setting this after
connecting the callback, which applies the value to the widget…
2017-03-07 01:02:08 +00:00
Daniel Boles
4bec5432ce testframe: Use a generic widget pointer 2017-03-07 01:02:08 +00:00
Timm Bäder
2b2a538629 testframe: Pass correct state to GtkStyleContext API 2016-01-02 15:52:20 +01:00
Benjamin Otte
3d4277facb tests: Don't call gtk_style_context_invalidate()
It's not needed anymore.
2013-10-05 13:57:51 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Benjamin Otte
41e17d92c6 tests: Convert testframe from GtkTable to GtkGrid 2011-09-28 05:29:50 +02:00
Javier Jardón
e5c7daa828 tests: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
2011-05-31 19:12:24 +02:00
Matthias Clasen
757837b611 Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
Michael Natterer
3a0afce509 gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-10-31 19:22:28 +01:00
Javier Jardón
a9894d4cf4 Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 05:22:58 +02:00
Javier Jardón
1b7b30bf31 tests/testframe.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:56 +02:00
Javier Jardón
2d9aaf4cf3 Use accessor funtions to acces GtkFrame 2010-07-13 19:40:47 +02:00
Michael Natterer
b5f204ac3c tests/testbbox.c use g_object_ref/unref instead of deprecated functions.
2007-11-14  Michael Natterer  <mitch@imendio.com>

	* tests/testbbox.c
	* tests/testframe.c: use g_object_ref/unref instead of deprecated
	functions.


svn path=/trunk/; revision=18990
2007-11-14 10:00:37 +00:00
Tim Janik
9d21e46190 applied patch from Xan Lopez to eliminate gap in painted frame for
Fri Jun 22 12:13:39 2007  Tim Janik  <timj@imendio.com>

        * gtk/gtkframe.c (gtk_frame_paint): applied patch from Xan Lopez
        to eliminate gap in painted frame for yaling=0.0 or yalign=1.0.

        * tests/testframe.c: added test application from Xan Lopez to
        test xalign/yalign interactions with xthickness/ythickness.



svn path=/trunk/; revision=18216
2007-06-22 10:16:39 +00:00