better drawing of GtkMenuItem add notes about GtkMenu remove leftover

Sun Jul  6 17:21:23 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/widget_geometry.txt: better drawing of GtkMenuItem
	* docs/widget_geometry.txt: add notes about GtkMenu
	* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
This commit is contained in:
Soeren Sandmann 2003-07-06 15:33:56 +00:00 committed by Søren Sandmann Pedersen
parent c8515b2f8d
commit e9b612a8a1
7 changed files with 116 additions and 24 deletions

View File

@ -1,3 +1,9 @@
Sun Jul 6 17:21:23 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/widget_geometry.txt: better drawing of GtkMenuItem
* docs/widget_geometry.txt: add notes about GtkMenu
* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk> Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: add vertical_padding style property. * gtk/gtkmenu.c: add vertical_padding style property.

View File

@ -1,3 +1,9 @@
Sun Jul 6 17:21:23 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/widget_geometry.txt: better drawing of GtkMenuItem
* docs/widget_geometry.txt: add notes about GtkMenu
* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk> Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: add vertical_padding style property. * gtk/gtkmenu.c: add vertical_padding style property.

View File

@ -1,3 +1,9 @@
Sun Jul 6 17:21:23 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/widget_geometry.txt: better drawing of GtkMenuItem
* docs/widget_geometry.txt: add notes about GtkMenu
* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk> Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: add vertical_padding style property. * gtk/gtkmenu.c: add vertical_padding style property.

View File

@ -1,3 +1,9 @@
Sun Jul 6 17:21:23 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/widget_geometry.txt: better drawing of GtkMenuItem
* docs/widget_geometry.txt: add notes about GtkMenu
* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk> Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: add vertical_padding style property. * gtk/gtkmenu.c: add vertical_padding style property.

View File

@ -1,3 +1,9 @@
Sun Jul 6 17:21:23 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/widget_geometry.txt: better drawing of GtkMenuItem
* docs/widget_geometry.txt: add notes about GtkMenu
* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk> Sat Jul 5 10:34:00 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c: add vertical_padding style property. * gtk/gtkmenu.c: add vertical_padding style property.

View File

@ -2,35 +2,98 @@ This file is some notes about how different widgets are drawn.
============= =============
GtkMenu
=============
+----------------------------------------------------------------------------+
| A |
| +------------------------------------------------------------------------+ |
| |############################# C ########################################| |
| |# D #| |
| |# +-------------------------------------------------------------------+#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | Item 1 |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# +-------------------------------------------------------------------+#| |
| |# +-------------------------------------------------------------------+#| |
| |# | |#| |
| |# | |#| |
|A|B | |B|A|
| |# | Item 2 |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# +-------------------------------------------------------------------+#| |
| |# [...] #| |
| |# +-------------------------------------------------------------------+#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | Item n |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# | |#| |
| |# +-------------------------------------------------------------------+#| |
| |# D #| |
| |############################# C ########################################| |
| +------------------------------------------------------------------------| |
| A |
+----------------------------------------------------------------------------+
A: GtkContainer::border_width
B: xthickness
C: ythickness
D: vertical_padding
=============
GtkMenuItem GtkMenuItem
============= =============
arrowspacing +----------------------------------------------------------------------------+
togglespacing | A |
horizontal_padding | +------------------------------------------------------------------------+ |
| |############################# C ########################################| |
| |#+-+------------+--+-------------------------------+--+-------------+-+#| |
| |#| |\\\\\\\\\\\\| | /|\ |**| | |#| |
| |#| |<------E------>| | |**| G | |#| |
| |#| |\\\\\\\\\\\\| | | |**| | |#| |
| |#| |\\\\\\\\\\\\| | | |**| >> | |#| |
| |#| |\\\\\\\\\\\\| | | |**| >>>> | |#| |
| |#| |\\\\\\\\\\\\| | | |**| >>>>>> | |#| |
|A|B|D|\\\\\\\\\\\\| F| Child G |*H| >>>>>>>> |D|B|A|
| |#| |\\\\\\\\\\\\| | | |**| >>>>>> | |#| |
| |#| |\\\\\\\\\\\\| | | |**| >>>> | |#| |
| |#| |\\\\\\\\\\\\| | | |**| >> | |#| |
| |#| |\\\\\\\\\\\\| | | |**| | |#| |
| |#| |\\\\\\\\\\\\| | | |**| | |#| |
| |#| |\\\\\\\\\\\\| | \|/ |**| | |#| |
| |#+-+------------+--+-------------------------------+--+-------------+-+#| |
| |############################# C ########################################| |
| +------------------------------------------------------------------------+ |
| A |
+----------------------------------------------------------------------------+
B A: GtkContainer:border_width
------------------ B: xthickness
A C D E G A C: ythickness
+----+----------+-----+----------------------+----+-----------+----+ D: horizontal_padding
| | | | ^ | | | | E: toggle_size
| | | | | | | | | F: toggle_spacing
| | | | | | | | | G: Requested height of child (also used for width of arrow
| | | | | | | | | H: arrow_spacing spacing (when the item has a non-vertical submenu)
| | icon | | child | G | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | v | | | |
+----+----------+-----+----------------------+----+-----------+----+
A: horizontal_padding
B: width of icon or indicator + toggle_spacing
C: toggle_spacing
D: child's requested size
E: arrow spacing (if the item has a submenu
G: child's requested height (also used for width of arrow field
============= =============

View File

@ -35,7 +35,6 @@
#include "gtkthemes.h" #include "gtkthemes.h"
#include "gtkiconfactory.h" #include "gtkiconfactory.h"
#include "gtksettings.h" /* _gtk_settings_parse_convert() */ #include "gtksettings.h" /* _gtk_settings_parse_convert() */
#include "gtkhandlebox.h"
#define LIGHTNESS_MULT 1.3 #define LIGHTNESS_MULT 1.3
#define DARKNESS_MULT 0.7 #define DARKNESS_MULT 0.7