Commit Graph

50288 Commits

Author SHA1 Message Date
John Ralls
f30ed5ddc7 Fix Cocoa style and event constants for MacOS X 10.12 and later. 2018-12-07 16:59:44 -08:00
John Ralls
941f3c3887 Move the CGDisplayReconfigurationCallback to gdkdisplay-quartz.c.
Handling more flags, handling them correctly, and emitting the requisite
signals.

Change screen layout to use CGGetActiveDisplayList instead of NSScreens,
eliminating the latency between updating screens and recomputing the
root window.
2018-12-07 16:39:13 -08:00
John Ralls
9773b1951c Clean up some unused variables. 2018-12-07 16:39:13 -08:00
John Ralls
85f52dceaa Replace NSInputManager for MacOS 10.6 and later. 2018-12-07 16:39:13 -08:00
John Ralls
08b871fa51 Replace the deprecated GdkDisplayManager with GdkSeat. 2018-12-07 16:39:13 -08:00
John Ralls
28b8bbda45 Implement the GdkMonitor/GdkDisplay API.
Moving the initialization of the GdkQuartzMonitors to GdkQuartzDisplay from
the now-obsolete GdkQuartzScreen. Use QuartzDisplayServices for
monitor enumeration and to populate the GdkMonitor properties. This is
better aligned with acting on the Quartz Services callbacks for monitor
changes and with Cairo which also uses CoreGraphics for drawing.
2018-12-07 16:39:13 -08: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
John Ralls
4d0cae4468 Replace convertBaseToScreen & convertScreenToBase.
With convertPointToScreen & convertPointFromScreen when
MacOS version is > =10.7, when the earlier functions were
deprecated and replaced.
2018-12-07 16:39:12 -08:00
John Ralls
74aecac6fe Remove commented-out code copied from X11 implementation. 2018-12-07 16:24:58 -08:00
John Ralls
2b1c3fba96 Reorder virtual method assignments and fill in missing ones.
Makes auditing easier.
2018-12-07 16:24:58 -08:00
Jakub Steiner
239c95af47 Adwaita: buttons
- less dramatic gradient on the buttons
2018-12-07 18:20:57 +01:00
Iñaki Larrañaga Murgoitio
9c6c1641f1 Update Basque translation 2018-12-07 12:45:50 +00:00
Iñaki Larrañaga Murgoitio
0fbb32a6fa Update Basque translation 2018-12-07 12:44:34 +00: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
Christoph Reiter
2de5572076 Merge branch 'win32-fontconfig-defaults' into 'gtk-3-24'
GDK W32: set default settings for fontconfig

See merge request GNOME/gtk!437
2018-12-01 16:02:51 +00:00
Christoph Reiter
5a23c0f038 GDK W32: set default settings for fontconfig
Enables hinting, antialiasing and set the subpixel orientation according to the
active clear type setting. This ensures that font rendering with the fontconfig backend
looks similar to the win32 backend, at least with the default system font.
2018-12-01 10:43:53 +01: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
Matthias Clasen
1dd0b8e6aa Merge branch 'escape-included-svg' into 'gtk-3-24'
(#1471): base64-encode included SVGs to avoid mis-escaped characters

See merge request GNOME/gtk!429
2018-11-27 18:59:13 +00: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
Christoph Reiter
d48c95a562 Merge branch 'win32-remove-scroll-multiplier' into 'gtk-3-24'
win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408

See merge request GNOME/gtk!426
2018-11-24 09:33:35 +00:00
Christoph Reiter
83204dd882 win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408
GTK widgets expect the scroll deltas to be 1 or -1 and calculate a scroll value from that.
Multiplying the delta by the Windows scroll line setting (which defaults to 3) results
in a much larger delta and vastly different behaviour for running a GTK app on Windows
vs on Linux. For example text view and tree view scroll by 9 lines per scroll wheel tick
per default this way while on Linux it is around 3.

Remove the multiplication for now.
2018-11-24 10:24:27 +01:00
Jakub Steiner
a139b63304 Adwaita: tone down borders, buttons
- very contrasty lines feel dated in today's flat world
- tone down the contrast a little
2018-11-23 17:37:00 +01:00
Jakub Steiner
f968fdf3a1 Adwaita: list buttons
- tone down buttons when inside lists

Fixes issue #1473
2018-11-22 13:20:10 +01:00
Timm Bäder
91129be95c Merge branch 'emit-transient-for' into 'gtk-3-24'
window: Actually emit notify::transient-for

See merge request GNOME/gtk!425
2018-11-21 06:31:23 +00:00
Zander Brown
b150699510 window: Actually emit notify::transient-for
Because it seems we weren't doing that
2018-11-20 15:32:40 +01:00
Benjamin Berg
356f1f59ae container: Document that removal from foreach is permissible
It is permissable to remove a widget using gtk_container_remove from the
gtk_container_foreach callback handler. Document this fact to make it
more discoverable.

Fixes #1461
2018-11-19 18:39:58 +00:00
Timm Bäder
0040b256fe Merge branch 'gdk-cursor-new-deprecated-for' into 'gtk-3-24'
gdk: Add deprecated for macro for gdk_cursor_new

See merge request GNOME/gtk!416
2018-11-19 08:04:48 +00:00
Timm Bäder
5e78646256 Merge branch 'more-nullable-gtk3' into 'gtk-3-24'
g-i: Add some nullable annotations

See merge request GNOME/gtk!420
2018-11-19 07:40:41 +00:00
Christoph Reiter
31b810abca g-i: Add some nullable annotations
Based on grepping arg docs for NULL.
See https://gitlab.gnome.org/GNOME/pygobject/issues/261
2018-11-18 13:40:24 +01:00
Robert Ancell
dea9525f68 gdk: Add deprecated for macro for gdk_cursor_new 2018-11-17 21:23:40 +13:00
Timm Bäder
446cb9a217 Merge branch 'fix-issue-1366' into 'gtk-3-24'
entry: Handle no-window events in gtk_entry_event

See merge request GNOME/gtk!363
2018-11-15 10:03:19 +00:00