Commit Graph

32263 Commits

Author SHA1 Message Date
Guido Günther
e98973e2c0 GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.
2019-05-06 12:59:20 +02:00
Emmanuele Bassi
c6b2184aa0 Allow specifying the layout manager for a widget type
Some widgets have a well-defined layout manager created alongside their
own instance; if they do, we can handle the layout manager creation at
the GtkWidget instantiation.
2019-05-06 11:57:32 +01:00
Benjamin Otte
562e492056 csstokenizer: Consume the \ when encountering an error
Otherwise we infinitely end up with the error again.

Testcases added.
2019-05-06 05:56:06 +02:00
Matthias Clasen
15b8ee4564 Merge branch 'simplify-tests' into 'master'
Simplify tests

See merge request GNOME/gtk!820
2019-05-05 20:19:13 +00:00
Matthias Clasen
d8e92d4859 builder-tool: Handle layout properties more properly
Change things so we first rewrite the whole tree,
and then simplify the rewritten tree. And look
for paramspecs for layout properties.
2019-05-05 17:13:38 +00:00
Matthias Clasen
4eb00a3e41 builder-tool: Stop warnings for stack rewrites
When rewriting a GtkStack from 3 to 4, we were emitting
warnings for missing child properties. Stop doing that.
2019-05-05 17:13:38 +00:00
Matthias Clasen
84d3848c01 Merge branch 'focus-fixes' into 'master'
Focus fixes

See merge request GNOME/gtk!819
2019-05-05 14:20:04 +00:00
Matthias Clasen
c4013eeb26 Merge branch 'builder-tool-fixes' into 'master'
Builder tool fixes

See merge request GNOME/gtk!817
2019-05-05 06:57:21 +00:00
Matthias Clasen
96cce3ae23 Merge branch 'emoji-chooser-fixes' into 'master'
Emoji chooser fixes

See merge request GNOME/gtk!816
2019-05-05 06:41:31 +00:00
Matthias Clasen
09b6dbb7ef builder-tool: Handle default values changing
The default value of GtkWidget::visible changed
from FALSE to TRUE from GTK 3 to 4. Make --3to4
deal with this by ensuring the visible property
is explicitly set, before simplifying.
2019-05-04 23:41:30 -07:00
Benjamin Otte
6594ccf716 gsk: Export gsk_gl_renderer_new() 2019-05-05 07:18:39 +02:00
Benjamin Otte
3c6aa84e44 cssparser: Add gtk_css_parser_has_number() 2019-05-05 07:18:39 +02:00
Matthias Clasen
44b0a893fc entry: Drop our own Emoji chooser
We were using one Emoji chooser when triggered
via the context menu, and another one when
triggered via the icon.

Change things to always use the same Emoji
chooser instance.
2019-05-04 18:54:37 +00:00
Matthias Clasen
32fd55a66d window: Stop duplicating focus change events
We had code in gtkwindow.c that generated duplicate,
and defective, focus-change events, in the following
way:
- gtkmain.c generates a chain of focus-change events
  for moving focus from one window to another
- gtkwindow.c catches a focus-in event in the middle
  of this chain and sets itself as 'active'
- and then it proceeds to generate focus-change
  events towards its own focus widget without a
  related target
This is not necessary since we gtkmain.c already
generates a complete sequence of focus-change events.
So stop doing it.
2019-05-04 18:22:33 +00:00
Matthias Clasen
9af01bea5e window: Make _gtk_window_set_is_active static
It is not used outside gtkwindow.c.
2019-05-04 18:22:28 +00:00
Matthias Clasen
40fe3d94ac builder-tool: Handle GtkWidget::visible properly
This property has a 'smart' default that depends
on the class of the object we're creating. Take
that into account when deciding whether to omit
properties that are set to their default value.
2019-05-04 18:18:42 +00:00
Matthias Clasen
6fe203d0e2 emoji chooser: Make Escape work again
Escape is expected to close the Emoji chooser.
2019-05-04 18:18:20 +00:00
Matthias Clasen
7b6f652630 emoji chooser: Fix handling of no recent Emoji
If the recent section is empty, we want to hide
it, make its button insensitive, and select the
next section, initially. This was not working
properly, since nothing was ever setting the
section box to invisible.
2019-05-04 18:18:09 +00:00
Matthias Clasen
67e6d1087e emoji chooser: populate incrementally
It takes half a second on my system to initially
populate the Emoji chooser. That is too long. Do
the work in 8 millisecond chunks to give GTK a
chance to get some frames done.
2019-05-04 02:12:02 +00:00
Timm Bäder
d702bfe7b7 filechooserbutton: Clean up finalize & destroy 2019-05-03 20:06:25 +02:00
Timm Bäder
596c9a3c0b filechooserbutton: Clear model in destroy()
Since we're destroying priv->chooser right after. We can't wait until
finalize() since clearing the model will try to work with priv->chooser.
2019-05-03 20:06:23 +02:00
Timm Bäder
c675d1c9e1 filechooserbutton: Use a bin layout 2019-05-03 20:06:10 +02:00
Matthias Clasen
1c9a486d60 css: Use multiple font-family values
Pango API to support this, so we can implement
this very easily.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1854
2019-05-03 01:44:02 +00:00
Matthias Clasen
299422994a fixup! event controller: Don't deliver events to insensitive widgets 2019-05-02 20:20:20 +00:00
Matthias Clasen
b1d90cc171 spin button: Listen for ::cancel on gestures
Otherwise, we keep spinning when we should stop.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1861
2019-05-02 15:54:17 -04:00
Matthias Clasen
af2207bc0b widget: Reset controllers when going numb
Reset event controllers when their
widget is going insensitive. This is
the expected behavior.
2019-05-02 15:53:30 -04:00
Matthias Clasen
522bbc182d gesture: Chain up in filter_event
This is the right thing to do.
We want to exclude more events.
2019-05-02 15:53:30 -04:00
Matthias Clasen
65233726f8 event controller: Don't deliver events to insensitive widgets
This is another way to avoid delivering events
to insensitive widgets.
2019-05-02 15:50:44 -04:00
Matthias Clasen
ed52c029a0 gtk: Small documentation fixes 2019-05-01 23:24:14 -04:00
Matthias Clasen
7b1201cd4d box layout: Documentation additions 2019-05-01 23:24:14 -04:00
Matthias Clasen
eff4b6377d Merge branch 'inspector-menus' into 'master'
inspector: Fix showing of menus

See merge request GNOME/gtk!810
2019-05-02 02:12:28 +00:00
Matthias Clasen
a18647af0e Merge branch 'inspector-actions' into 'master'
inspector: Show the default.activate action

See merge request GNOME/gtk!809
2019-05-02 02:09:03 +00:00
Matthias Clasen
c7df0c907a inspector: Fix showing of menus
We were hitting an assertion in some leftover
code that assumed property editors are popovers.
2019-05-02 02:05:46 +00:00
Matthias Clasen
b74407a343 Merge branch 'filechooser-save-again' into 'master'
Make file chooser saving work again

See merge request GNOME/gtk!808
2019-05-02 01:55:28 +00:00
Matthias Clasen
cd5c39834d inspector: Show the default.activate action
We were hardcoding that GtkApplicationWindow only
has a single action group with prefix 'win', but
that is no longer the case. Simply use the code
for the general widget case that can handle multiple
action groups.
2019-05-02 01:53:57 +00:00
Matthias Clasen
6e0b13b81f Make file chooser saving work again
I was a little overzealous when going
for the new default handling here. We
can't switch to gtk_widget_activate_default
before we actually handle the default.activate
action.
2019-05-02 01:41:23 +00:00
Matthias Clasen
bea8025fb5 Drop the GtkWidget::display-changed signal
Display changes now happen exclusively through
the ::root and ::unroot vfuncs. Third parties
can observe display changes by listening
for notify::root.
2019-05-02 01:33:41 +00:00
Matthias Clasen
965d0e04d1 gtk: Use root/unroot instead of display-changed
The display-changed signal is going away
2019-05-02 01:33:41 +00:00
Matthias Clasen
d7c54920ee menu: Listen only for notify::root
We no longer emit the display-changed signal,
so stop listening.
2019-05-01 23:05:09 +00:00
Matthias Clasen
33a8108f19 window: Implement display change via root/unroot
Export gtk_widget_root/unroot privately,
make them work on roots, and use them in
gtk_window_set_display. This gets us to a
single way to listen for display changes,
the root property.
2019-05-01 23:05:09 +00:00
Matthias Clasen
78d254370c Merge branch 'inspector-menu-fix' into 'master'
Inspector menu fix

See merge request GNOME/gtk!804
2019-05-01 23:01:50 +00:00
Matthias Clasen
377ec33069 menus: Fix menus on non-default displays
Currently, we sometimes emit display-changed
when the display changed, and sometimes we don't
since the display is changed via gtk_widget_root.

Listen for notify::root as well and update our
display. This is a temporary fix - all display
changes should go through gtk_widget_root,
eventually.
2019-05-01 22:50:29 +00:00
Matthias Clasen
62b7ea7611 Remove gtk_menu_set_display
Menus should always be attached to a toplevel,
in which case they get their display that way.
2019-05-01 21:54:57 +00:00
Matthias Clasen
d53981fdbb Merge branch 'add-color-button-fix' into 'master'
Adwaita: Fix 'add color' button corners

Closes #1856

See merge request GNOME/gtk!801
2019-05-01 17:26:34 +00:00
Matthias Clasen
e09beee62a Adwaita: Fix 'add color' button corners
The specification for border-radius goes
top-left top-right bottom-right bottom-left.
The css for the add button in the color
chooser got this wrong, and was showing
a broken top-right corner.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1856
2019-05-01 17:18:39 +00:00
Rico Tzschichholz
724ec3ca92 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:03:16 +02:00
Matthias Clasen
e41596d6a1 text: Make Emoji insertion work properly
We are now getting focus-out and focus-in events
when the Emoji chooser is shown and hidden, and
this is causing the text to select-on-entry before
inserting the Emoji, which then deletes the selection.

Avoid this by saving and restoring the selection
when presenting the Emoji chooser.
2019-05-01 05:13:52 +00:00
Matthias Clasen
0fa4d54316 inspector: Track readonly property values
That a property can't be set does not mean
its value can't change. This was showing up
as the cursor-position and selection-bound
properties in GtkText not showing their
current value in the inspector.
2019-05-01 04:57:54 +00:00
Matthias Clasen
e7cbb7a76c inspector: Don't listen for notify twice
The property list now uses property editors
for the value, which listen for updates by
themselves, so no need for the list to do it.
2019-05-01 04:44:07 +00:00
Matthias Clasen
b2a23a9a90 entry: only notify properties we have
GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.
2019-05-01 04:41:28 +00:00
Matthias Clasen
1f30b7742b textutil: Fix signedness issues in api
A length argument that can be -1 should be signed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:25:29 +00:00
Matthias Clasen
54e7a94d70 builder: Fix signedness issues in apis
Whenever we take a length argument that can
be -1 for 'nul-terminated', it should be
gssize, not gsize.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:21:29 +00:00
Matthias Clasen
26b17473aa window: Prevent resize cursors from sticking
When a modal dialog is smaller than its parent,
we were keeping the resize cursor from the dialogs
edge all over the parent window, which looks
really irritating, since the resize cursors are
closely associated with the window edge. Fix
this by falling back to the default cursor
outside the grab widgets surface.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/23
2019-04-30 20:19:35 -04:00
Timm Bäder
074a0014c1 filechooserwidget: Only query clock-format setting once
We don't support that setting life-updating anyway. So, instead of
getting the value *every time we format a time*, get it once for the
filechooserwidget and reuse that value.
2019-04-30 06:43:42 +02:00
Timm Bäder
091cac00b2 Adwaita: Fix active spinbutton button image color
The spinbutton>button>image is currently blue when the image is clicked
and dark-ish when the button is clicked(but not the image). This was not
the case before since we didn't even propagate :active down to the image
child. Fix this by only applying the blue color to direct image children
of entries.
2019-04-30 05:54:00 +02:00
Timm Bäder
175e3d751d filechooserwidget: Remove unnecessary deprecation guards 2019-04-30 05:36:20 +02:00
Timm Bäder
83e9361005 filechooserwidget: Stop using gtk_widget_get_allocat* 2019-04-30 05:36:20 +02:00
Timm Bäder
17bb1248b5 filechooserwidget: Shorten cancel_all_operations() impl 2019-04-30 05:36:20 +02:00
Timm Bäder
8211e79be9 filechooserwidget: Shorten dispose impl a bit 2019-04-30 05:36:20 +02:00
Timm Bäder
d5282862e5 filechooserwidget: Remove some unnecessary show() calls
Widgets are visible by default now.
2019-04-30 05:36:20 +02:00
Timm Bäder
26b6d18563 filechooserwidget: Use a bin layout
Instead of implementing size_allocate and measure manually.
2019-04-30 05:36:20 +02:00
Timm Bäder
31fb5cc2d4 filechooserwidget: Shorten finalize implementation a bit 2019-04-30 05:36:20 +02:00
Timm Bäder
90301c6813 filechooserwidget: Inline fuction into only caller 2019-04-30 05:36:20 +02:00
Timm Bäder
ccdf50aafd filechooserwidget: Fix rename popover widget alignment 2019-04-30 05:36:20 +02:00
Timm Bäder
af5c80248d placesview: Bring spacing in the actionbar back
In particular between the Connect button and the adjacent button/entry
combination.
2019-04-30 05:36:20 +02:00
Timm Bäder
1d81a58cf1 filechooserwidget: Pick reasonable default sidebar width
The old default of 148px doesn't work everywhere. Instead, pick a
default value of -1 and measure() the sidebar widget in the
filechooserwidget in that case. Other values >= 0 are still handled as
before.
2019-04-30 05:36:20 +02:00
Timm Bäder
09cec2e6a1 filechooserwidget: Delay view switch to search hits
Leave it to the ::hits-added handler to switch to the list of search
hits. This way we don't get a weird transition when the current search
didn't have any hits and the next one doesn't either.
Searches with hits still feel good.
2019-04-30 05:36:20 +02:00
Matthias Clasen
7a06859f38 Adwaita: Give model buttons visible focus
Hard to use keynav, otherwise.  Also, hard
to debug focus issues if you can't see where
the focus is.
2019-04-29 15:21:40 -04:00
Matthias Clasen
89861faa04 Merge branch 'tooltip-cleanup' into 'master'
tooltip: Remove an unused gdk_surface_get_root_coords call

See merge request GNOME/gtk!793
2019-04-29 19:04:49 +00:00
Benjamin Otte
5fd94e2027 Merge branch 'window-cursor' into 'master'
window: Set cursor on the right surface

See merge request GNOME/gtk!792
2019-04-29 19:02:21 +00:00
Matthias Clasen
0023b9036b tooltip: Remove an unused gdk_surface_get_root_coords call
The tx and ty variables are not used, so don't
bother setting them.
2019-04-29 14:56:00 -04:00
Matthias Clasen
89d1f8c3ca window: Set cursor on the right surface
Set the cursor on the surface of the target
widget, not the surface of some of its parents.

This does not make a difference currently.
But it will in the future, when we have
parented widgets with surfaces.
2019-04-29 14:51:55 -04:00
Matthias Clasen
7d9364655d icon view accessible: Stop presenting windows
Thats really not its business.
2019-04-29 14:46:40 -04:00
Jakub Steiner
6fbf13965c Adwaita: tone down lowres icon aid
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818
2019-04-29 15:08:49 +02:00
Matthias Clasen
92e21c3f1c Drop the can-default property
It was added at a time when default buttons
had a very large external border that would disrupt
aligment. Not a problem nowadays.
2019-04-28 23:28:39 +00:00
Matthias Clasen
8880d27460 inspector: Stop showing default widget in misc
This is just a regular window property now,
no need for special casing.
2019-04-28 23:23:11 +00:00
Matthias Clasen
59d50be737 widget: Drop gtk_widget_grab_default
The default widget is mostly a dialog concept,
and does not really need this generic api.

If you need to mark a widget as default,
use gtk_window_set_default() directly.
2019-04-28 23:23:11 +00:00
Matthias Clasen
6d73443131 widget: Remove special handling for has-default
We used to handle has-default specially in ui
files. It was awkward, so stop doing that. If you
need to influence the default widget in a window,
you can just set the default-widget property.
2019-04-28 23:23:11 +00:00
Matthias Clasen
89f7b974f2 Stop using gtk_widget_grab_default
Replace gtk_widget_grab_default by gtk_window_set_default_widget.
2019-04-28 23:21:51 +00:00
Matthias Clasen
0ae958d45b Drop gtk_window_activate_default
This api has been replaced by an action that
can be activated with gtk_widget_activate_action.
2019-04-28 23:21:50 +00:00
Matthias Clasen
3d1fdf77dc file chooser: Stop using gtk_window_activate_default
Instead, use the new way of activating default.

I think most of the default handling in
GtkFileChooserDialog should be dropped, but
for now this keeps things working.
2019-04-28 23:20:13 +00:00
Matthias Clasen
0ae71cacb4 mount operation: Handle default activation via action
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
218d635ca2 entry: Activate default via action
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
7553d0c471 label: Activate default via action
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
f4880f5df5 Add gtk_widget_activate_default
This is a convenience wrapper for
activating the "default.activate" action.
2019-04-28 23:20:13 +00:00
Matthias Clasen
3ccdad76de popover: Add a default.activate action
This is a first example of a widget intercepting
the default.activate for its own handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
e464c08545 window: Add a default.activate action
Activating this action will replace other
activate_default apis. It is more flexible,
since intermediate widgets can intercept the
action and do their own handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
56e95ddfc8 popover: Add a default-widget property
This is part of redoing default widget handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
65052a5d6c Rename gtk_window_set_default
Call it gtk_window_set_default_widget, to match
the getter, and the property name. Update all
callers.
2019-04-28 23:20:13 +00:00
Matthias Clasen
1364eb2f62 window: Add a default-widget property
This is a part of redoing default widget handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
aa8ada3fed widget: Add a convenience api to activate actions
Since actions are used increasingly, we should
have a convenient way to trigger an action in
the context of a widget.
2019-04-28 23:19:05 +00:00
Matthias Clasen
3643a9fe86 Merge branch 'focus-cleanup' into 'master'
Focus cleanup

See merge request GNOME/gtk!788
2019-04-28 23:17:46 +00:00
Matthias Clasen
25f4bb2e17 Avoid critical warnings
These critical warnings break the tests, otherwise.
2019-04-28 22:55:43 +00:00
Matthias Clasen
3b62d9c027 Drop gtk_window_activate_focus
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.
2019-04-28 22:21:09 +00:00
Matthias Clasen
c92938b378 widget: Remove special handling of has-focus
We used to handle has-focus in ui files specially.
It was awkward, so stop doing that. If you need
to influence the initial focus of a window, you
can just set the focus-widget property.
2019-04-28 22:21:03 +00:00
Matthias Clasen
c98313016e window: Fix up the buildable implementation
We were assuming that the parent class has a custom
set_property, which may not be the case. Be more
careful.
2019-04-28 22:20:55 +00:00
Matthias Clasen
b6c1786165 inspector: Make property list sortable again
We lost this when moving from a treeview to
a listbox. Bring it back, with homegrown list
headers.
2019-04-28 21:56:10 +00:00
Matthias Clasen
ff604e1906 file chooser: Stay focused
When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851
2019-04-28 16:08:21 +00:00
Matthias Clasen
34974a8a66 Merge branch 'wip/baedert/filechooser2' into 'master'
Assorted filechooser improvements

See merge request GNOME/gtk!783
2019-04-28 15:33:07 +00:00
Matthias Clasen
b9467a4dc7 file chooser: Prevent accidental search
When hitting Escape, the file chooser will go
into search mode, because the search entry
consumes the key to emit the ::search-stopped
signal. Recognize this situation and avoid
switching to search mode in this case.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1850
2019-04-28 15:20:07 +00:00
Timm Bäder
5a1c37a8c8 filechooserwidget: Use a center box for the search entry
This way we can avoid a slight position offset when we show or hide the
spinner during a search.
2019-04-28 11:30:13 +02:00
Timm Bäder
b75bc8aa64 filechooserwidget: Allow keynav from the treeview to the search entry 2019-04-28 11:27:42 +02:00
Timm Bäder
ed4c08d9b3 window: Check whether the new focus widget is the old one
We generally do that for all properties.
2019-04-28 11:27:21 +02:00
Timm Bäder
929cdd9259 treeview: Don't always grab_focus() when moving the cursor
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
2019-04-28 11:26:40 +02:00
Timm Bäder
78049f452a filechooserwidget: Remove unneeded function prototype 2019-04-28 11:08:09 +02:00
Timm Bäder
cf2ef4863b filechooserwidget: Don't focus treeview when searching
It's just weird that the search entry does not have focus while we type.
2019-04-28 11:07:14 +02:00
Timm Bäder
2bd348558e filechooserwidget: Remove some GdkEvent usage 2019-04-28 11:05:37 +02:00
Timm Bäder
0f6d83bb5f filechooserbutton: Remove some dead code 2019-04-28 11:02:59 +02:00
Timm Bäder
7e20232607 colorbutton: Remove unneeded snapshot implementation 2019-04-28 10:55:10 +02:00
Timm Bäder
dcc55e3a73 Adwaita: Bring filechooserbutton spacing back
Add some space between the icons and the text, like there was in gtk3.
2019-04-28 10:40:54 +02:00
Timm Bäder
59fd48cee0 entry: Fix primary icon allocation in RTL entries
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
2019-04-28 08:36:36 +02:00
Timm Bäder
1e16cb088a treeview: Always update expand when allocating columns
It doesn't make sense to keep track of all the last_* values anymore now
that widgets only get allocated when their size changes anyway.
Remove all the associated (and thus now unused) flags as well.
2019-04-28 06:54:10 +02:00
Timm Bäder
f4cf43359d treeview: Remove a useless check 2019-04-28 06:50:57 +02:00
Timm Bäder
6c8a5f5e2f treeview: Remove unused member 2019-04-28 06:45:33 +02:00
Matthias Clasen
936aba884a Merge branch 'file-chooser-search' into 'master'
file chooser: Fix Ctrl-L

Closes #1829

See merge request GNOME/gtk!781
2019-04-27 17:52:02 +00:00
Matthias Clasen
eea1388cf4 file chooser: Fix Ctrl-L
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
2019-04-27 17:43:59 +00:00
Matthias Clasen
6277f2fccc fontchooser: Fix type-to-search
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
2019-04-27 15:59:45 +00:00
Timm Bäder
cc4b3798e5 searchentry: Always measure and allocate icon
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).

Fixes #1831
2019-04-27 08:40:33 +02:00
Timm Bäder
8634a51aa5 Adwaita: separate '.view text' from textview>text
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
2019-04-27 08:40:33 +02:00
Timm Bäder
4bb6e70d01 tooltip: Initialize tooltip coords to given event coords
Otherwise the coordinates passed to the query-tooltip signal are always
0.
2019-04-26 18:05:32 +02:00
Matthias Clasen
2bd9b42479 Merge branch 'wip/surface-transform-data' into 'master'
Surface transform listener fixes

See merge request GNOME/gtk!776
2019-04-25 16:42:42 +00:00
Jonas Ådahl
3a1ef7aa2c widget: Move surface relative transform fields into its own struct
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Jonas Ådahl
1ad406e15d widget: Remove leftover parent-changed handler removal
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Matthias Clasen
b9770fa752 widget: Drop gtk_widget_set_parent_surface
And the getter, too. Widgets no longer have
extra surfaces that could serve as parent surfaces.
2019-04-24 20:57:09 -04:00
Matthias Clasen
52d4bcf1be popover: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
33f034d0d7 a11y: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
2019-04-24 20:54:05 -04:00
Matthias Clasen
2516f1142d Merge branch 'wip/widget-position-changed-callbacks' into 'master'
widget: Add surface relative position changed callback

See merge request GNOME/gtk!760
2019-04-24 19:26:27 +00:00
Matthias Clasen
ec37e1e462 Merge branch 'fix-and-improve-linked-button-style' into 'master'
themes: Fix and improve linked button style

Closes #1294

See merge request GNOME/gtk!730
2019-04-24 19:23:12 +00:00
Matthias Clasen
79180f62d7 Merge branch 'wip/jimmac/type-experiments' into 'master'
Adwaita: generic type styles

See merge request GNOME/gtk!772
2019-04-24 19:08:40 +00:00
Jakub Steiner
5cd4ec510d Adwaita: generic type styles
- try to define a basic typographic structure

See https://gitlab.gnome.org/GNOME/gtk/issues/1808
2019-04-24 19:23:05 +02:00
Kjell Ahlstedt
c21063e71e csserror: Add G_BEGIN_DECLS and G_END_DECLS
Necessary when the header file is included in C++ code.

Merge request !773
2019-04-24 16:32:54 +02:00
Jonas Ådahl
477ad2505b widget: Add surface relative transform changed callback
Added two new private GtkWidget API:

 * gtk_widget_add_surface_transform_changed_callback()
 * gtk_widget_remove_surface_transform_changed_callback()

The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Matthias Clasen
491829a2b5 builder-tool: Check canonical names
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
2019-04-23 17:30:00 -04:00
Matthias Clasen
28be1c5d3a builder-tool: Fix property check
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
2019-04-23 21:25:59 +00:00
Timm Bäder
65ff19d149 eventcontrollermotion: Document missing signal parameters 2019-04-23 17:24:51 +02:00
Timm Bäder
3da6e83609 cssprovider: Fix a parameter name mismatch 2019-04-23 17:24:07 +02:00
Matthias Clasen
c91371951a window: Remove dropped api from headers
This was forgotten in fed2db1493.
2019-04-23 01:23:01 +00:00
Matthias Clasen
fed2db1493 window: Drop some x11-specific apis
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
77ff83cdd1 Fix a compiler warning 2019-04-19 13:58:52 -04:00
Matthias Clasen
0e26e95b00 window: Fix an oversight
We must still reset cursors.
2019-04-18 20:15:39 +00:00
Matthias Clasen
ba1c5cf43f Merge branch 'cursor-things' into 'master'
Cursor things

See merge request GNOME/gtk!764
2019-04-18 19:38:56 +00:00
Matthias Clasen
f3821031e0 window: Stop juggling cursors
We have convenience api for this.
2019-04-18 15:07:01 -04:00
Matthias Clasen
e37f4d0ea6 text: Stop juggling cursors
We have a convenience api for this.
2019-04-18 15:06:35 -04:00
Matthias Clasen
b26087845d label: Stop juggling cursors
We have a convenience api for this.
2019-04-18 15:06:09 -04:00
Matthias Clasen
8727b0708e css: Kerning affects text size
Thats the point. And we were missing the proper
flags to make GTK do the right thing when
changing font-kerning in the inspector.
2019-04-18 18:08:10 +00:00
Matthias Clasen
1932a50d36 css: Some updates to internal docs
Minor corrections to the AFFECTS flags docs.
2019-04-18 18:04:58 +00:00
Matthias Clasen
8400d8e75d css: Letterspacing affects text size
It does. And we were missing the proper
flags to make GTK do the right thing when
changing letter-spacing in the inspector.
2019-04-18 17:34:44 +00:00
Benjamin Otte
83696639a7 themes: Regenerate CSS
Seems to have been forgotten a few times.
2019-04-18 02:28:15 +02:00
Benjamin Otte
1aa1610611 cssprovider: Export correct API
gtk_css_provider_get_named() is the old GTK3 style API to load themes.

Instead, export the function we currently use,
gtk_css_provider_load_named().

As a side effect we allow people to load a theme as often as they want
without conflicting with GTK's theme.
2019-04-18 02:26:04 +02:00
Matthias Clasen
0c87b62251 Survive absence of librsvg without criticals
We can't guarantee that we can load svgs, so
we shouldn't spew criticals when some of our
own resources fail to load due to that reason.
2019-04-18 00:14:00 +00:00