Cosimo Cecchi
0740f23c77
menuitem: don't read wide-separators or separator-height
...
Separators inside menus are working completely through CSS since
GtkMenuItem has been ported to use a gadget.
Remove this unused code from here.
2016-01-03 00:42:51 -08:00
Cosimo Cecchi
664bbe12ba
menuitem: move chaining up to draw inside gadget
...
This is more consistent with what other widgets do.
2016-01-02 15:31:21 -08:00
Cosimo Cecchi
354eb5678b
menuitem: fix a crash when reserve_indicator is TRUE
...
In that case, code expects an arrow gadget to be present but we're not
creating it in every occurrence.
Fix it by ensuring there will be an arrow gadget when reserve_indicator
is TRUE.
2015-12-29 18:31:10 -08:00
Cosimo Cecchi
efb8e5bd43
menuitem: don't use content allocation to resize the GdkWindow
...
This is a fallout from the gadget conversion.
2015-12-22 15:36:00 -08:00
Matthias Clasen
164e8ed6bd
menuitem: Simplify separators
...
For regular separators, we just rely on standard CSS background
rendering nowadays. Do the same for separators in menus.
https://bugzilla.gnome.org/show_bug.cgi?id=759765
2015-12-22 10:30:51 -05:00
Cosimo Cecchi
729801c2a1
menuitem: trivial doc improvement
2015-12-21 09:22:16 -08:00
Cosimo Cecchi
ce6cd49475
menuitem: port arrow gadget to GtkBuiltinIcon
...
Saves a lot of code.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
22ec899f23
menuitem: simplify code
...
Only cast once.
2015-12-19 21:22:37 -08:00
Cosimo Cecchi
5a87b5bbce
menuitem: deprecate toggle-spacing style property
...
We can move this to just use the actual GtkCssGadget of the menu item.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
3af5c83cd3
checkmenuitem: use a gadget for the check indicator
...
This will make margins and other CSS properties work correctly on the
indicator.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
b602dc2eed
menuitem: trivial cleanup
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
7959c3fb6e
menuitem: deprecate arrow-scaling style property
...
With this, we can also remove the custom measure function of the arrow
gadget.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
2d5d7d8cf2
menuitem: convert arrow rendering to GtkCssGadget
...
This also deprecates the arrow-spacing style property, which can be now
replaced with a simple margin.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
f49a5bf116
menuitem: deprecate width-chars style property
...
Instead, we can just set min-width.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
f2adb5779f
menuitem: port to gadgets
...
This is not a complete conversion yet - more changes will come in later
commits.
2015-12-19 21:21:16 -08:00
Cosimo Cecchi
11d9da08a9
menuitem: use gtk_container_class_handle_border_width()
2015-12-19 21:21:16 -08:00
Matthias Clasen
2f544655f9
Revise CSS node documentation
...
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Benjamin Otte
971a277419
cssnode: Change style-changed signal
...
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.
This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
2015-12-12 02:16:04 +01:00
Matthias Clasen
43f822e70f
Annotate deprecated style properties
...
Use G_PARAM_DEPRECATED with deprecated style properties.
This will make it easier to identify and remove such stale
properties from css, since it will now trigger warnings.
2015-11-16 15:13:33 -05:00
Matthias Clasen
bab98a8427
menuitem: Document some style properties as deprecated
...
No code change.
2015-11-16 07:20:18 -05:00
Matthias Clasen
eca9549c72
Cosmetic: Avoid explicit state variables
...
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
8e5c7ac028
menu: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
aede5c65d3
menu item: Use CSS nodes
...
Use the element name menuitem for GtkMenuItem, GtkCheckMenuItem
and GtkRadioMenuItem. GtkSeparatorMenuItem gets the name separator.
Add a subnode with name arrow if a submenu is attached.
Give the radio and check menu items a subnode with name check or
radio.
2015-11-02 23:42:14 -05:00
Matthias Clasen
c0d9e3a1ad
menu item: Convert to g_object_notify_by_pspec
...
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:13:38 -04:00
Matthias Clasen
a0dddbbafa
menu: Fix compiler warnings
...
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:15 -04:00
Matthias Clasen
f5d9644591
GtkMenuItem: Simplify code
...
No need to explicitly specify a parser function, it will be
correctly guessed from the property type.
2014-10-19 22:06:37 -04:00
Matthias Clasen
caa47b2ef4
GtkMenuItem: fix display of accelerators
...
The accel label in menus was getting a small allocation that
caused its draw code to always omit the accelerator string.
Fix that by setting halign to fill. To keep the menu label
left-aligned, set xalign to 0 to compensate.
2014-07-20 00:12:40 -04:00
Benjamin Otte
c906aa7e08
menuitem: Use .arrow style class for submenu indicators
...
As requested by the Adwaita guys.
2014-06-10 13:47:51 +02:00
Matthias Clasen
bce70ca75e
GtkMenuItem: Use G_PARAM_EXPLICIT_NOTIFY
2014-06-09 13:31:00 -04:00
Evan Nemerson
54ec42f035
gtk: port many nullability annotation fixes from Vala bindings
...
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-30 13:24:20 -07:00
Matthias Clasen
8a8ce85ea0
GtkMenuItem: Stop using gtk_misc_set_alignment
...
GtkMisc is heading for deprecation. Just use GtkWidget h/valign.
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2014-05-13 07:06:06 -04:00
Benjamin Otte
b4ee8a9daf
menuitem: Remove unneeded checks
...
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:28 +02:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47
Docs: Remove all entities and turn off sgml mode
...
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456
docs: Use "#" for refsect2 instead of ##
2014-02-04 21:00:58 -05:00
Matthias Clasen
09d1b28249
docs: Convert to markdown
...
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
4c8bd8e7cf
docs: Identify examples that are C code
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081
docs: use |[ ]| instead of <programlisting></programlisting>
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
f3f7c385d9
Remove references to removed gtk_item_select api
2014-01-20 12:31:21 -05:00
Lars Uebernickel
d736e8baf9
GtkMenuItem: only set 'separator' class on the separator line
...
To make the separator line distinguishable from the widget's normal
border from css.
https://bugzilla.gnome.org/show_bug.cgi?id=719861
2013-12-05 12:35:12 +01:00
Bastien Nocera
438cd857c4
all: Add names to timeouts
...
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Benjamin Otte
7f8497f850
gtkmenuitem: Remove dead assignment
2013-08-13 16:25:26 +02:00
Matthias Clasen
0aa57d26b5
Move wholly deprecated classes to gtk/deprecated/
...
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.
Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9
gtk: Use new macros for defining private data
...
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
c96a1c4980
Deprecate GtkAction and GtkUIManager
...
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
William Jon McCann
76936193d5
Deprecate and ignore gtk-menu popup and popdown delay settings
...
Just pick good defaults. The a11y team confirmed that they don't
rely on them.
2013-06-26 14:08:37 -04:00
Xavier Claessens
92823b2201
GtkMenuItem: Take padding into account to position submenu arrow
...
Since commit a69619edbc
, it not
possible anymore for the style to add space between the border
and the arrow.
https://bugzilla.gnome.org/show_bug.cgi?id=700779
2013-05-29 14:53:17 +02:00
Luc Pionchon
0e08ff19ba
Add doc to set markup and accelerator on a MenuItem.
...
https://bugzilla.gnome.org/show_bug.cgi?id=699289
2013-05-19 21:24:01 -04:00