Commit Graph

62553 Commits

Author SHA1 Message Date
Alexander Mikhaylenko
18114bafe0 headerbar: Remove title button separators
They have had opacity: 0 for a while, just remove them.
2020-04-24 23:54:07 +05:00
Alexander Mikhaylenko
197fe80857 testsuite: Fix swapped params in notify test
The expected and counted params are swapped in literally every call, so
swapping the params to match them.
2020-04-24 23:54:07 +05:00
Matthias Clasen
8871327b08 Merge branch 'grab-leftovers' into 'master'
Drop gtk_widget_has_grab

See merge request GNOME/gtk!1752
2020-04-23 19:24:59 +00:00
Matthias Clasen
b2deab6adf Drop gtk_widget_has_grab
This was just a leftover in our public api.
All other grab-related apis are gone.
2020-04-23 14:10:44 -04:00
Benjamin Otte
389575ee18 Merge branch 'wip/exalm/window-headerbar' into 'master'
First steps for #2242

See merge request GNOME/gtk!1739
2020-04-23 15:26:30 +00:00
Matthias Clasen
fd47e86689 Merge branch 'focus-ring-experiment' into 'master'
Tweak visible focus behavior

See merge request GNOME/gtk!1750
2020-04-23 15:20:54 +00:00
Alexander Mikhaylenko
7c4694ca3c window: Stop listening to headerbar title changes
Remove another dependency.
2020-04-23 19:26:10 +05:00
Alexander Mikhaylenko
610d5794ac headerbar: Update window buttons automatically
Update the layout when any of the following properties changes:
 * modal
 * transient-for
 * resizable
 * deletable

Stop updating it from GtkWindow, make that function static.
2020-04-23 19:26:10 +05:00
Matthias Clasen
b0f2cd02ad window: Tweak visible focus behavior
Only turn on visible focus when a key event actually leads
to a change in focus location (ie, 'keynav').

Make the visible focus disappear after 5 seconds of no
keyboard interaction, to avoid permanent focus ring
distraction.

As an extra bonus, make it so that we make the focus
visible while the Alt key is pressed. This gives us
a 'find my focus!' shortcut, and goes well with the
prexisting use of Alt for finding mnemonics.

Discussed in: #2644
2020-04-23 09:33:26 -04:00
Jakub Steiner
7fe51a876c Merge branch 'wip/jimmac/uniform-checkboxes' into 'master'
Adwaita: lower glyph contrast for checkboxes

See merge request GNOME/gtk!1745
2020-04-23 11:44:47 +00:00
Jakub Steiner
424a86a6a6 Adwaita: lower glyph contrast for checkboxes
- stylistic choice didn't sit well with majority of the design team
2020-04-23 10:53:02 +02:00
Matthias Clasen
861bff44a8 Merge branch 'matthiasc/for-master' into 'master'
menusectionbox: Improve circular button spacing

Closes #2626

See merge request GNOME/gtk!1743
2020-04-23 04:02:12 +00:00
Matthias Clasen
f4b1762072 Adwaita: Add padding to circular button rows in menus
The lack of this was negatively affecting the spacing
of these buttons.

Fixes: #2626
2020-04-22 22:42:04 -04:00
Matthias Clasen
ba45d7a991 menusectionbox: Improve circular button spacing
In the n == 2 case, we want to avoid the buttons being
drawn all the way out to the ends of the box, but in the
n >= 3 case, that is exactly what we want for the first
and last button.
2020-04-22 22:16:46 -04:00
Benjamin Otte
8b1e857a67 Merge branch 'fix-icontheme-invalidation' into 'master'
Fix icontheme invalidation

See merge request GNOME/gtk!1733
2020-04-23 00:13:26 +00:00
Matthias Clasen
94906d076a Drop gtk_widget_reset_style
There was a single call left that should not be necessary.
Also drop no longer used attached-window functionality.
2020-04-22 19:30:48 -04:00
Matthias Clasen
a199060728 Drop gtk_style_context_reset_widgets
This is no longer used.
2020-04-22 19:30:48 -04:00
Matthias Clasen
7b4378bc46 widget: Update when font settings change
Update the pango context when font-related settings
change, using the new GtkSystemSetting mechanism.
2020-04-22 19:30:48 -04:00
Matthias Clasen
679863af4f image: Invalidate icon helper when icon theme changes
This is necessary to drop the cached image.
2020-04-22 19:30:48 -04:00
Matthias Clasen
a59cb5dfa6 icontheme: Call gtk_system_setting_changed
When the icon theme changes, we want to both initiate
a css SOURCE change (since css values may depend on the
icon theme), as well as calling gtk_system_setting_changed,
since widgets need to drop cached images, e.g. in GtkIconHelper.
2020-04-22 19:30:48 -04:00
Matthias Clasen
4b13d99cfe settings: Call gtk_system_setting_changed
Replace calls to gtk_style_context_reset_widgets by
gtk_system_setting_changed, with the appropriate setting,
and add style invalidation where required.
2020-04-22 19:29:59 -04:00
Matthias Clasen
129b8bb7f1 window: Use gtk_system_setting_change
Propagate GTK_SYSTEM_SETTING_DISPLAY when the display
of the window changes.
2020-04-22 19:29:15 -04:00
Matthias Clasen
723d57eeb5 widget: Add a system_setting_changed vfunc
This gives us a hook to walk the widget tree whenever a global
setting changes and do per-widget invalidations. This will
replace gtk_style_context_reset_widgets().
2020-04-22 19:29:15 -04:00
Matthias Clasen
58ca3b05c9 css: Compare icon theme serials
When comparing to icon theme image values for equality,
take the serial of the icon theme at compute time into
account.
2020-04-22 19:22:41 -04:00
Emmanuele Bassi
21fcef7306 Merge branch 'ci-custom-layout' into 'master'
Fix annotations for GtkCustomLayout

See merge request GNOME/gtk!1740
2020-04-22 19:23:17 +00:00
Matthias Clasen
fe6ef5256b icontheme: Keep a serial
This will let us identify when we have to re-lookup
icons because they may have changed despite the theme
object being the same.
2020-04-22 15:18:16 -04:00
Emmanuele Bassi
c0d18ebff2 Fix annotations for GtkCustomLayout
Silence the warnings from the introspection scanner.
2020-04-22 19:24:45 +01:00
Alexander Mikhaylenko
451c3279ee window: Introduce actions for window buttons
Add the following actions:
 * window.close
 * window.toggle-maximize
 * window.minimize

Ensure they are disabled when not appropriate, such as for modal windows.

Use them in GtkHeaderBar.
2020-04-22 23:01:12 +05:00
Alexander Mikhaylenko
016eac0645 header-bar: Track window icon changes
Listen to icon-name changes if it's in a GtkWindow. This allows to remove a
special case for headerbar-as-titlebar from GtkWindow.
2020-04-22 23:01:12 +05:00
Alexander Mikhaylenko
cead405831 header-bar: Don't assume there's only one icon
Instead of tracking the titlebar icon widget, and updating it when the icon
changes, update the window buttons completely.
2020-04-22 23:01:12 +05:00
Matthias Clasen
2ddff872cd css: Drop the -gtk-icon-theme property
We want to always use the current icon theme, and only
have the minimum amount of custom properties.
2020-04-22 12:35:30 -04:00
Matthias Clasen
7aeef71a49 css: Get the icon theme via the settings
We don't have a css value for it anymore, but we
still need the current icon theme to interpret
icon names.
2020-04-22 12:35:30 -04:00
Matthias Clasen
98611735ec Stop using the -gtk-icon-theme style property
We want to just use the current icon theme, always.
2020-04-22 12:35:22 -04:00
Alexander Mikhaylenko
2240eb5c99 header-bar: Stop showing application menu
The application menu isn't particular relevant anymore, and the support for
showing fallback appmenu as a headerbar icon is one of the things tying
GtkWindow to GtkHeaderBar.

Remove support for "menu" window decoration element completely, update
GtkHeaderBar docs.
2020-04-22 21:30:19 +05:00
Alexander Larsson
e75bc2833d icon-theme: Fix deadlock in GktIconTheme dispose
When freeing the display GtkIconTheme and that was the last owner we
ran into a deadlock, because we unref the "next-to-last" ref inside a
gtk_icon_theme_ref_aquire/release() pair, which makes the final unref
to happen in the release(), while the ref lock still was held.
The unref triggers dispose which tries to NULL out the ref, but that then
deadlocks on the mutex being held by the caller already.

We fix this by moving the release unref outside the lock. This is safe
because refcounts are atomic, and we *do* own the ref.
2020-04-22 12:20:57 -04:00
Jakub Steiner
bca608c531 Merge branch 'wip/jimmac/HC-slider-border' into 'master'
HC: fix switch slider borders

See merge request GNOME/gtk!1737
2020-04-22 11:47:54 +00:00
Jakub Steiner
9fe6bc0792 HC: fix switch slider borders
- HC got caught up on a condition made for color (suggested) buttons.
  the rule just made the slider a tag lighter on dark probably due to the
  overlaid AA making it stronger. Got rid of it for now, if someone cares
  enough we can reintroduce an exception (that doesn't break HC).
2020-04-22 11:59:40 +02:00
Matthias Clasen
e026a04e03 Merge branch 'fix-placesview-popover' into 'master'
placesview: Fix up the address entry help popover

Closes #2642

See merge request GNOME/gtk!1731
2020-04-21 22:27:57 +00:00
Emmanuele Bassi
30c386dde9 Merge branch 'missing-annotation' into 'master'
widget: Add missing callback annotation

See merge request GNOME/gtk!1732
2020-04-21 21:56:43 +00:00
Matthias Clasen
0ff67fa854 Merge branch 'wip/chergert/fix-toggle-caret-visibility' into 'master'
textview: fix assertion when toggling caret visibility

Closes #2647

See merge request GNOME/gtk!1736
2020-04-21 21:11:53 +00:00
Christian Hergert
55dd737ea0 textview: fix assertion when toggling caret visibility
When toggling caret visibility (with F7) we would hit an assertion if the
cursor is currently blinking. This adjusts things to ensure that we should
be showing the carent when scheduling our blink timeouts.

Fixes #2647
2020-04-21 13:39:50 -07:00
Matthias Clasen
c09b5ea7b4 Merge branch 'menu-section-title' into 'master'
Menu section title

See merge request GNOME/gtk!1735
2020-04-21 19:35:44 +00:00
Matthias Clasen
1edfd80528 Adwaita: Some styling for menu section titles
More fine-tuning needed.
2020-04-21 14:55:14 -04:00
Matthias Clasen
654af88529 Change the approach to menu section titles
Put the label below the separator, and give
it the title style class.
2020-04-21 14:48:39 -04:00
Florian Müllner
8e2ffb3b46 widget: Add missing callback annotation
GI can only figure out the correct scope if there's a GDestroyNotify
or GAsyncReadyCallback parameter.
2020-04-21 16:35:07 +02:00
Claudio Saavedra
e818bf8514 docs: migration guide fixes 2020-04-21 15:37:45 +03:00
Claudio Saavedra
0af16a77fc docs: fix typo 2020-04-21 14:49:13 +03:00
Matthias Clasen
0ebcf8c02e placesview: Fix up the address entry help popover
Popovers without parent don't work anymore. Set a
parent, a fix up the position.

Fixes: #2642
2020-04-21 07:43:52 -04:00
Jakub Steiner
76b16720fc Merge branch 'wip/jimmac/hc-public-colors' into 'master'
HC: export public colors

Closes #2641

See merge request GNOME/gtk!1730
2020-04-21 11:08:28 +00:00
Jakub Steiner
89ebe9e456 HC: export public colors
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2641
2020-04-21 12:39:34 +02:00