Commit Graph

842 Commits

Author SHA1 Message Date
Matthias Clasen
dbfaa99107 image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.

Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01 image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.

As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.

Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
5a1a11bcde dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Matthias Clasen
08be6651d6 Expand the cursors demo text
Explain what why we show each cursor 4 times.
2017-11-05 11:27:06 -05:00
Benjamin Otte
e6f5085255 gtk-demo: Fix popover positioning in popover test 2017-11-05 15:22:14 +01:00
Benjamin Otte
3a3f73a4dc gtk-demo: Don't use get_allocation()
Use get_width()/get_height() instead.
2017-11-05 15:01:30 +01:00
Benjamin Otte
9b37f5a45f gtk-demo: Update cursors demo
It's all glade-ified, hurray!
It also now properly tests image cursors, named cursors and fallbacks.
I'm not gonna tell how many bugs I found though.
2017-11-05 00:07:18 +01:00
Benjamin Otte
f7646cf541 textview: Remove GdkWindow usage from the public API
A sideeffect is that we don't set the correct parent window on child
widgets anymore, but that is hopefully going to be fixed once we get rid
of child windows completely.
2017-11-04 15:22:25 +01:00
Benjamin Otte
9323d098a6 gdk: Cursors no longer have a display
Change constructors to reflect that.

While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
bd6b6ed93c gdk: Remove VisibilityNotify events 2017-11-01 22:00:34 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
ecd5b399a4 icontheme: Use GdkDisplay instead of GdkScreen 2017-10-31 03:05:55 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Benjamin Otte
a2e625692e gtk-demo: Remove calls to gtk_style_context_reset_widgets()
Those calls have been unneeded for a long time - since we gained the
changed signal on the StyleProvider in fact.
2017-10-31 03:05:54 +01:00
Alexander Larsson
96b04836d8 Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
2b194089dd GtkImage: Drop support for storing pixbufs
This drops the pixbuf property and the pixbuf getters. We keep
gtk_image_new/set_from_pixbuf, but these are small helpers that
immediately convert to a surface, and there is no way to later get
back the pixbuf you passed in.

The from file/resource codepaths are also changed to load a surface
instead of a pixbuf.
2017-10-23 15:28:33 +02:00
Matthias Clasen
ff6698cf5f gtk-demo: Use surface apis in the clipboard demo
Stop using gtk_drag_set_icon_pixbuf.
This api is going away.
2017-10-23 05:58:54 +02:00
Matthias Clasen
0c61095630 gtk4-demo: Stop using pixdata resources
This does not really help, and pixdata is deprecated.
2017-10-18 17:30:20 +02:00
Matthias Clasen
515f5268c2 gtk4-demo: fix a typo
The blend mode is called saturation, not saturate.
2017-10-07 23:26:57 -04:00
Matthias Clasen
e1338e4e12 gtk4-demo: Fix the scrollbar popup menu example
A scrollbar is not a range anymore, so the callback
needs some adjustments (!).
2017-10-07 19:54:47 -04:00
Matthias Clasen
4d3cdfae44 gtk-demo: Deal with big images
We don't want to grow our window to huge size just because
there is a big source image.
2017-10-06 21:59:34 -04:00
Matthias Clasen
481ba13e8e gtk-demo: Add a new overlay demo
Replace the not very impressive transparent demo with
the blur-behind example.
2017-10-06 21:58:56 -04:00
Matthias Clasen
f352a0ec2b gtk-demo: Fix the overlay demo
We must make the label and the entry separate overlays, or
the entry will also be clickthru.
2017-10-06 21:35:21 -04:00
Matthias Clasen
6d75d0966a gtk-demo: Fix up the drawingarea example
This was not working anymore.
2017-10-06 20:42:04 -04:00
Matthias Clasen
0caec25ee0 gtk-demo: Make the color chooser example non-resizable
No need for it.
2017-10-06 20:42:04 -04:00
Matthias Clasen
ad9c70537d gtk-demo: Fix the assistant demo
The progress bar was no longer expanding as intended,
due to the demise of GtkBox::expand.
2017-10-06 19:38:16 -04:00
Matthias Clasen
e7b79e2097 gtk-demo: Keep treeviews expanding
This is fallout from GtkBox::expand child property going away.
2017-10-06 14:21:19 -04:00
Benjamin Otte
defcf17d3d gtk-demo: Remove old build file
The includes are now generated with a Python script, so remvoe the old
perl script.
2017-10-06 16:03:07 +02:00
Matthias Clasen
25ab8f7c6b gtk-demo: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Daniel Boles
4cb00d9546 gtk-demo/theming: Don’t mislead about raised class
This class is not added by any widgets nor themed by Adwaita/HC.
However, it is presented here as if it does something. It doesn’t.

But we changed the 2 buttons with the .raised class to use symbolic
icons, unlike their ‘unraised’ counterparts, which is unnecessarily
confusing and might make people think .raised affects icons somehow.

So, make them use the same icons in all cases; that way, if .raised is
ever made to do anything, 6 years later, what it does will be clear.

https://bugzilla.gnome.org/show_bug.cgi?id=644248
2017-09-14 18:35:18 +01:00
Matthias Clasen
ff0f5f57f1 gtk4-demo: Fix up the event axes demo
Use a drawing area instead of drawing directly on the
window, which doesn't work well with csd.
2017-09-06 07:05:01 -04:00
Matthias Clasen
b3b6c42e18 gtk4-demo: add a few missing window titles 2017-09-06 07:05:01 -04:00
Emmanuele Bassi
6240082e12 Drop old MSC makefiles 2017-08-14 22:23:09 +01:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Benjamin Otte
5be94c1fd7 gtk-demo: Get rid of GtkEventBox 2017-08-02 14:05:02 +01:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
a0444b9c42 gtk4-demo: Add widgetbowl demo
Same as fishbowl, but with widgets
2017-07-19 21:27:15 -04:00
Timm Bäder
60e053f52a Remove calls to gtk_widget_set_allocation
gtk_widget_size_allocate_with_baselines does it automatically now.
2017-07-19 21:27:12 -04:00
Timm Bäder
46007df8a5 spinbutton demo: Spinbuttons are no Entries 2017-07-19 21:27:11 -04:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Daniel Boles
8ddadecb57 gtk-demo: ui: Replace leftover uses of Box:expand
commit 5729ea7744 skipped these
2017-05-13 18:39:28 +01:00
Daniel Boles
9e6b59c5f4 demo/toolpalette: Restore ToolItemGroup child prop
…erties clobbered by commit c92b7d4224.
That and its counterpart were for removing :expand and :fill child props
from GtkBox, but they ended up catching these for GtkToolItemGroup too.

While GtkToolItemGroup still has these, we may as well keep demoing them
2017-05-13 18:39:13 +01:00
Emmanuele Bassi
17518ef89b build: Improve consistency of the "coding" style
We're mixing a lot of styles in the Meson build files. This is an
attempt at making everything slightly more consistent in terms of
whitespace and indentation.
2017-05-03 15:10:57 +01:00
Tim-Philipp Müller
7966ab6001 meson: demos: disable add_install_script() calls that don't work right yet
Errors out. Might really wants a script and not a binary.
2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
d6a824476d meson: gtk-demo: update and sync up with Makefile.am 2017-05-03 15:10:53 +01:00
Timm Bäder
4fcca9945f meson: update build files 2017-05-03 15:10:52 +01:00
Timm Bäder
6dd6660c68 meson: Conditionally check for dependencies 2017-05-03 15:10:52 +01:00
Timm Bäder
0748c415da meson: Build gtk utils 2017-05-03 15:10:52 +01:00
Timm Bäder
2144b776b2 meson: Generate demos.h for gtk3-demo 2017-05-03 15:10:51 +01:00