Commit Graph

27870 Commits

Author SHA1 Message Date
Daniel Boles
6eb1be27f7 Adwaita: Fix bg of backdrop:disabled spinbutton +-
The +/- buttons are meant to be transparent, showing the base_color,
but when backdropped they were picking up background-image from the base
button, meaning they suddenly became more like theme_bg_color instead,
and jumped out of the spinbutton when in backdrop unlike the rest of it.
This looks strange and achieves nothing (especially not indicating that
they are disabled, which is already served fine by their dim fg colour).

Fix this by explicitly saying we don't want any background-image there.
2019-01-06 20:03:35 +00:00
Matthias Clasen
4eee51b0e5 Check for the session bus before using it
Patch by Chris Allen, #475
2019-01-02 20:38:18 -05:00
Matthias Clasen
06ffbb2a22 Merge branch 'wip/nbenitezl/move-bookmark-placeholder-index-3' into 'gtk-3-24'
gtkplacessidebar.c: move bookmark at the placeholder index

See merge request GNOME/gtk!458
2019-01-03 01:28:34 +00:00
Orivej Desh
f6bc2415ab Zero-fill new GtkTextIter
iter_init_common() is used on uninitialized GtkTextIter, and since neither it
nor its callers initiliaze its padding fields, they contain garbage.

This is a problem for Go - which checks that structs passed to C functions do
not contain pointers to Go-allocated memory - when the garbage happens to be
such a pointer.  Although Go zero-fills all GtkTextIter that it allocates, this
does not help when GTK functions such as insert_pixbuf_or_widget_segment called
for gtk_text_buffer_create_child_anchor copy garbage from their stack-allocated
GtkTextIter into a clean iter.  To work around this a GtkTextIter has to be
discraded after use in text buffer anchor inserting functions:
https://github.com/gotk3/gotk3/pull/307
2019-01-02 20:05:10 -05:00
Timm Bäder
dea38f0222 Merge branch 'wip/carlosg/revealer-fix-interrupted-animations' into 'gtk-3-24'
revealer: Fully set the target state if unmapped during animation

See merge request GNOME/gtk!465
2019-01-02 08:50:36 +00:00
Daniel Boles
63e0eb5de5 Fix 'Fix "A11y: Add support for AtkTableCell"'...
...since one of the "fixes" there was wrong, at least cosmetically:
.get_position() is declared as returning a gboolean, which is in fact an
int in practice, but we should say what we mean, like we already did.
2018-12-30 18:11:50 +00:00
Chun-wei Fan
c876c74eb7 Fix "A11y: Add support for AtkTableCell"
Make sure that the return types of the vfuncs match the ones that are
specified for post-atk-2.11.x AtkTableCellIface, since we already
require atk-2.15.1 and later.
2018-12-26 12:17:20 +08:00
Tomasz Miąsko
d3b6d16d85 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```
2018-12-22 13:17:58 +01:00
Timm Bäder
b69aae4ab3 Merge branch 'cherry-pick-5b049364' into 'gtk-3-24'
Merge branch 'fix-polygon-svg-recolor' into 'master'

See merge request GNOME/gtk!468
2018-12-22 09:10:49 +00:00
Christoph Reiter
ea518ec2f5 Merge branch 'fix-typo-win32-compilation-speedup-macro' into 'gtk-3-24'
Win32: Fix typo on compilation speedup macro define

See merge request GNOME/gtk!470
2018-12-22 07:13:31 +00:00
Luca Bacci
a9d7d41b59 Win32: Fix typo on compilation speedup macro define
There is a typo, the correct macro to define is WIN32_LEAN_AND_MEAN.
After this change <shellapi.h> must be included in order to use
ExtractIconExW().
2018-12-22 00:48:10 +01:00
Matthias Clasen
b283b0b910 Merge branch 'fix-polygon-svg-recolor' into 'master'
icontheme: Recolor <polygon> elements in SVGs too

See merge request GNOME/gtk!443

(cherry picked from commit 5b049364dc)

284d9093 icontheme: Recolor <polygon> elements in SVGs too
2018-12-20 03:01:36 +00:00
Mike Gorse
e9f527b328 A11y: Add support for AtkTableCell 2018-12-19 21:09:59 -05:00
Carlos Garnacho
32ad0ffa0f revealer: Fully set the target state if unmapped during animation
If the revealer is told do animate and then unrealize itself, we do
(correctly) stop the animation, but used to do a shortcut where we
just set the target state as current.

Other things are dependent on the animation properly finishing though,
like the contained widget child visibility. This may lead to inconsistent
state where gtk_revealer_get_child_revealed() returns TRUE but the child
widget is unmapped, or vice-versa.

Fully finish the animation here, so the child state is coherent the next
time the revealer is mapped. We can also skip notifying on the property
since it will be handled by gtk_revealer_set_position().

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/316
2018-12-19 19:37:42 +01:00
Daniel Boles
d179b0667d Revealer: Don’t (under)allocate child if not shown
If the child is not (partly) revealed, don’t allocate it, or we spam the
console with warnings about giving negative width to children’s gadgets.
We can check :child-visible, which is FALSE if (current&target)_pos == 0

Close https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Nelson Benítez León
f7eb7efeb5 gtkplacessidebar.c: move bookmark at the placeholder index
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.

https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904
2018-12-17 19:17:17 +00:00
Daniel Boles
112645edf2 EventControllerKey: Add missing docs from master
These never got backported, meaning a pretty useless documentation page.

We still need to add other missing bits, but let's sync these up first.
2018-12-14 22:59:56 +00:00
Matthias Clasen
8b0fd8e148 Merge branch '1476-nautilus-does-not-enable-to-connect-to-an-nfs-share' into 'gtk-3-24'
Resolve "Nautilus does not enable to connect to an NFS share"

See merge request GNOME/gtk!427
2018-12-14 17:26:35 +00:00
Alberts Muktupāvels
31d896c5cf statusicon: Create pixbuf at correct size
Surface returned from gtk_icon_helper_load_surface can be smaller
then requested pixel size. This happens when icon is embedded in
panel that has bigger size then loaded pixbuf.
2018-12-12 19:55:20 +02:00
Szunti
4c8fcd6a6f Add gdk_x11_display_get_parent_relative_pattern().
Fixes #1280, tray icons not drawing background. This is a magic pattern only
usable for gdk_window_set_background_pattern() that sets the underlying
X window's background to ParentRelative.
2018-12-12 02:56:35 +01:00
Jakub Steiner
4247fb606a Adwaita: revert all gnome 3.32 changes
- all changes now in wip/jimmac/gnome-3-32 branch
2018-12-10 20:23:22 +01:00
Olivier Fourdan
ffeacd5ae3 a11y: Check X11 display at runtime
`gtk_widget_accessible_grab_focus()` code checks that X11 isenabled at
build time and uses X11 specific functions such as
`gdk_x11_get_server_time()` regardless of the actual backend being used.

Check that we are using an X11 display when X11 is backend enabled, so
we do not crash when running on Wayland

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-10 17:09:42 +01:00
Jakub Steiner
fcecc761cb Adwaita: selected borders darker for :dark
- switches in particular looked undefined
2018-12-10 12:36:39 +01:00
Jakub Steiner
ecfdd186fe Adwaita: tone down $base_color saturation 2018-12-10 12:29:08 +01:00
Jakub Steiner
720bc7083c Adwaita: special case round buttons
- defining gradients outside of _drawing while Lapo isn't
  looking. Surely this will bite us in the future.
2018-12-10 12:19:09 +01:00
Jakub Steiner
ad7eeb7a23 Adwaita: gradient undershoots
- based on a patch by frederik.feichtmeier <frederik.feichtmeier@gmail.com>
  I'm certain this is something we had initially, but can't recall
  why we got rid of it for the more visually distracting dashed line.
  We can always revert when Lapo shows up and slams us with that broken
  use case. I'm guessing non-white bgs.

- So far it looks way less distracting than the dashed line
2018-12-10 11:57:13 +01:00
John Ralls
cf279a14fa Don't attempt to dereference icon_theme until after checking it. 2018-12-07 16:39:12 -08:00
John Ralls
6ac81545ef Prevent crash from passing NULL style provider.
gtk_internal_return_val_if_fail operates only in debug mode,
quartz can call this with a NULL that crashes in
GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE.
2018-12-07 16:39:12 -08:00
Jakub Steiner
239c95af47 Adwaita: buttons
- less dramatic gradient on the buttons
2018-12-07 18:20:57 +01:00
Jakub Steiner
a4f3021693 Adwaita: regenerate CSS
- for the previous patch
2018-12-07 12:04:17 +01:00
Jakub Steiner
f4d2cb0b08 Merge branch 'context_menus_gtk-3-24' into 'gtk-3-24'
GtkTheme: Menu border-radius and box-shadow changes

See merge request GNOME/gtk!439
2018-12-07 10:27:00 +00:00
Jakub Steiner
152b89e812 Adwaita: lower selection border contrast
- to mimic what happened to regular borders
2018-12-07 00:58:58 +01:00
frederik.feichtmeier
1d90c72f44 Menu border-radius and bos-shadow changes
- introduce $menu_radius
- use it for menus and context-menus
- use the popover box-shadow also for menus
- use padding for menus to avoid edge overlapping
- remove the background for menus to avoid bleeding out of the round edges
2018-12-06 22:49:38 +01:00
Jakub Steiner
5e127cff12 Adwaita: buttons & headerbar tweaks
- tone down the button z-depth
- flatter headerbars
2018-12-05 16:19:46 +01:00
Daniel Boles
b0fdaf3bf0 Box, Grid: Improve various bits of documentation
Issue #1495 showed that the docs of GtkGrid retain outdated implications
that (as was once, but is no longer, the case) it is intended to replace
GtkBox, by discussing HfW and widget properties in a way that suggests
GtkBox can't handle them. But of course it does, and it's preferable for
simple single-row/column cases. Worse, we said GtkGrid “provides exactly
the same functionality” for the latter case, but the original point of
that Issues was that it doesn’t, at least for CSS positional selectors!

Box:
• Use an actually meaningful @Short_description.
• Remove unhelpful @See_also references to unrelated containers.
• Remove references to “rectangular area”: it might be another shape
  via CSS, or “rectangular” might falsely imply 2 dimensions of children.
• Mention Orientable:orientation.
• Emphasise usefulness of :[hv]align for allocating in the other axis.
• Don’t say that Grid “provides exactly the same functionality” for a
  single row or column, since (A) it is overkill for that case and (B)
  said Issue proved that it *doesn’t* for CSS child order, for example.
• Note in the child properties that are remove in master that we have
  better, preferred alternatives available now in GtkWidget/CSS props.
  There’s no nice way to deprecate these, though they’re gone in GTK+ 4.
• Correct a copy-paste-o from the blurb of :expand to :fill.

Grid:
• Remove references to deprecated widgets: GtkTable and Gtk[HV]Box.
• Don’t dwell on widget properties and height-for-width in a way that
  wrongly implies that Box can’t handle those (or Grid can better). In
  fact, just get rid of that bit altogether: Box handles them fine, and
  Table is so old as to be not worth mentioning (in anything except the
  2 => 3 migration guide) and points to Grid in its deprecation notice.
• Point to GtkBox as being preferred for the simple row/column use case.
2018-12-04 20:45:07 +00:00
Matthias Clasen
b74e3209a5 emoji chooser: Actually force Emoji presentation
The previous commit was using the text presentation selector
instead of the Emoji one. Oops.
2018-12-03 21:47:09 -05:00
Matthias Clasen
aac38198a3 Force emoji presentation
Append a variation selector to the Emoji sequences,
to force Emoji presentation. Without this, some
Emoji come out with text presentation by default.

Closes: Pango #334
2018-11-30 16:39:07 -05:00
Jakub Steiner
be75460913 Adwaita: updated switch control
- might be nasty to hide labels with CSS. We can fix properly later.
- the blue border seesm aliased when :checked
2018-11-30 20:53:13 +01:00
Jakub Steiner
ea7a7e0425 Adwaita: shade buttons
- it was a bit too flat
2018-11-29 21:54:56 +01:00
Jakub Steiner
e68e75c34c Adwaita: unbreak icon-shadow again
- Somehow I keep messing this one up

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1456
2018-11-29 20:49:43 +01:00
Jakub Steiner
8e3541b28f Adwaita: active state for dark buttons
- was a bit too light. Tricky to tell which is pushed when
  you have two stackswitcher buttons.
2018-11-29 20:21:58 +01:00
Jakub Steiner
9a8f92f068 Adwaita: button tweaks
- step back on toning down the borders. Flatness !> legibility.
- darker active state for light
- draw gradinets from bottom up, to keep px sized shading regardless
  of button size.
2018-11-29 20:18:08 +01:00
Jakub Steiner
4cceccd129 Adwaita: headerbar backdrop state 2018-11-29 14:35:57 +01:00
Jakub Steiner
96f0b541bb Adwaita: sync headerbar styling for devel mode 2018-11-29 13:14:09 +01:00
Jakub Steiner
a386bc98d7 Adwaita: flatten the headerbar again 2018-11-28 20:27:44 +01:00
Jakub Steiner
9b9b15c1a0 Adwaita: tune button & hederbar colors 2018-11-28 14:17:37 +01:00
Jakub Steiner
00556bd6cb Adwaita: buttons & headerbars
- tone down the bottom border contrast (increase bottom lightness,
  decrease overall lightness)
- darken headerbars slightly (might require darkening wm colors when
  dust settles)
2018-11-28 00:19:25 +01:00
Federico Mena Quintero
3312d78863 (#1471): base64-encode included SVGs to avoid mis-escaped characters
We wrap SVG data from icons within another SVG with extra styling
information.  The wrapped SVG may contain characters that cannot be
part of a data: URL (https://fetch.spec.whatwg.org/#data-urls).

Librsvg 2.45 got more strict in its parsing of data: URLs; whereas
previously it ignored '#' characters in them, now it considers them to
be the start of a fragment identifier, which is not allowed in data:
URLs anyway.

To avoid unallowed characters, we now create a data: URL with a
base-64 encoded SVG.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1471
2018-11-27 12:13:31 -06:00
Jakub Steiner
0271471b81 Adwaita: app icon shadow fix
- of course I'd miss the _ to - change
2018-11-26 17:31:19 +01:00
Jakub Steiner
ffde7d780d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-26 17:29:17 +01:00