Commit Graph

28264 Commits

Author SHA1 Message Date
Guido Günther
b1b9de6836 GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2019-05-06 13:14:02 +02:00
Matthias Clasen
4f9ea5e54b 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 16:38:13 -04:00
Ernestas Kulik
b558f7c9ee treeview: Draw rubber band rectangle more often
If the cursor coordinates are outside of the content (the GtkRBTree),
gtk_tree_view_bin_draw() will return and not draw the rubber band
rectangle.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1859
2019-05-01 22:18:50 +02:00
Rico Tzschichholz
c860a2db85 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:06:15 +02:00
Jakub Steiner
c734c7e918 Adwaita: tone down lowres icon aid
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818
2019-04-29 15:07:10 +02:00
Felix Riemann
370d8242e7 GtkTextBufferSerialize: Add missing format string argument
The format string has two string parameters however only one was supplied.
2019-04-27 14:41:48 +02:00
Felix Riemann
0dcbbc3344 GtkTextBufferSerialize: Add G_GNUC_PRINTF() to set_error()
This allows the compiler to warn if format string and arguments do not match.
2019-04-27 14:36:35 +02:00
Christoph Reiter
0f957ca4f7 meson: underscorify immodule name when using it as a macro name
This resulted in -DINCLUDE_IM_ti-et getting passed to gcc resulting in
lots of warnings. Use underscorify() so we get the correct -DINCLUDE_IM_ti_et instead.
2019-04-12 20:59:14 +02:00
Emmanuele Bassi
a04fef4b9e meson: Preserve compatibility with Autotools build
The Meson build is missing the libtool versioning of the shared
libraries.
2019-04-11 19:33:25 +01:00
Chun-wei Fan
651715b8e8 meson: Fix building with builtin immodules
We also need to ensure that we pass in -DINCLUDE_IM_xxxx when building
the GTK DLL/.so, in addition to building the respective (static)
immodules, so that we did really link in the immodules into the final
GTK DLL/.so.
2019-04-11 16:46:22 +02:00
Christoph Reiter
5aba13f62d autotools: dist gen-c-array.py and gen-rc.py 2019-04-11 16:46:22 +02:00
Christoph Reiter
749a58ab26 meson: simplify builtin_immodules build option
Make it a yes/no/auto combo. "yes" means all modules are built into libgtk,
"no" that none are and "auto" uses the platform defaults, yes on win32,
no otherwise.

If we need more we can always extend it later.
2019-04-11 16:46:22 +02:00
Christoph Reiter
28833783cc meson: Various config.h related fixes
Various adjustments to make the config.h output between autotools
and meson more similar by testing on Linux and Windows/MSYS2.

Setting things to 1 instead of true and shifting things around is motivated
by reducing the diff between the generated files.
2019-04-11 16:46:22 +02:00
Christoph Reiter
8cfbf63c5a meson: static immodules: depend on generated headers 2019-04-11 16:45:37 +02:00
Christoph Reiter
068f7f7423 meson: set the soversion to just '0' everywhere
This is what glib did for the meson port, so can't be that wrong.
This also makes the DLL names match the autotools Windows DLLs.
2019-04-11 16:45:37 +02:00
Christoph Reiter
7391a078b3 meson: build print backends
This changes the configure option into two states:
auto: build all that can be build (default)
A list of backend names: build them and fail if we can't

"papi" is missing because it's not in Debian and I can't test it.
2019-04-11 16:45:36 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00
Christoph Reiter
26d32f3bd0 meson: build all input modules; fix static build on Linux 2019-04-11 16:45:36 +02:00
Christoph Reiter
fd758bb2e9 meson: install unix-print headers 2019-04-11 16:45:36 +02:00
Christoph Reiter
b1bc86e905 meson: mkenums: only write basenames in the comments
The autotools build uses relative filenames here while with meson
we get absolute paths. Switch to basename so we get the same result
for both and don't break reproducible builds with absolute paths
in public headers.
2019-04-11 16:45:36 +02:00
Christoph Reiter
331a92d559 meson: gtk gir: depend on xlib and include gtkx.h if X11 is enabled
To match what the autotools build does.
2019-04-11 16:45:36 +02:00
Christoph Reiter
c9d4f53cfc meson: install gtkbuilder.rng/its/loc files 2019-04-11 16:45:36 +02:00
Christoph Reiter
9709d7eb61 meson: Install key themes 2019-04-11 16:45:36 +02:00
Christoph Reiter
74f6832001 meson: add fribidi dep 2019-04-11 16:45:36 +02:00
Chun-wei Fan
5e8edec254 meson: Build the input modules
Build the input modules for GTK+, either as modules or built directly
into GTK.  Also provide a configure option to build the specified
immodules, or all, or the backend immodule(s) or none of the immodules
into GTK.  Note that for Visual Studio all immodules are built into
the GTK DLL by default, like what is done in the Visual Studio projects.

Note that building the backend immodules for Quartz, X11 and Wayland are
currently untested.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
1cd99d63d1 meson: Build the .rc files on Windows
This will ensure that the version info is easily visible from the
GDK/GTK+ DLLs, and ensure that the print dialogs will have a more modern
look and feel.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
b0a31fefd7 meson: Fix Broadway builds
Make sure the source files are in line with GTK+-3.x Broadway backend
sources.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
20c29fd8c0 meson: Fix introspection generation on Linux 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
3b246fbc56 gtk: Fix compiler warning about deprecated declaration 2019-04-11 16:45:36 +02:00
Philippe Normand
215c2be76f meson: Set the compatibility version correctly on macOS
And bump to Meson 0.48 as this feature requires it.
2019-04-11 16:45:36 +02:00
Philippe Normand
89d5c543ac meson: Build fixes for macOS 2019-04-11 16:45:36 +02:00
Philippe Normand
cde5a3f4b4 gtk: Fix paste/clipboard usage on macOS
In Mojave the build fails because declareTypes is nil. Instead use the
clearContents method, although I'm not really sure this is the same.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
00842f4d4e gtk-launch: Fix compilation with MSVC 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
a4fe15d9f0 meson: Sync build files with master and update to 3.24 2019-04-11 16:45:27 +02:00
Nirbheek Chauhan
8ec004cc08 Import meson build files from an 3.22
Specifically, from 6dd6660c68
2019-04-11 16:40:33 +02:00
Matthias Clasen
c19ae9635e Merge branch 'uajain/clean-gtktypefuncs' into 'gtk-3-24'
gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES

See merge request GNOME/gtk!732
2019-04-11 13:55:55 +00:00
Jakub Steiner
152e65f07a Adwaita: less purple OSD style
- one of the bits that escaped the purple cast is the osd background color
2019-04-11 15:31:31 +02:00
Umang Jain
adbd9b22d6 gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES
Otherwise, it errors out on make distcleancheck in debian packaging

```
ERROR: files left in build directory after distclean:
./gtk/gtktypefuncs.c
make[1]: *** [Makefile:1005: distcleancheck] Error 1
```
2019-04-11 11:27:21 +05:30
Matthias Clasen
08e20ce597 Silence a compiler warning 2019-04-10 15:46:31 -04:00
Iain Lane
d151223b1b
cellrendererpixbuf: Use fallback icons with icon-name
This gives us a better chance of finding an icon to show.

Closes: #1809
(cherry picked from commit fbe0e32813)
2019-04-08 16:30:03 +01:00
segfault
3f77da62bd gtkplacessidebar: Add loop devices 2019-04-05 18:59:50 +02:00
Matthias Clasen
3a770b1b80 Merge branch 'adwaita-selected-row-switch-fix' into 'gtk-3-24'
Adwaita: Fix switch slider border on selected row

See merge request GNOME/gtk!703
2019-04-02 15:49:29 +00:00
Alex Monday
3770defce7 Adwaita: Fix switch slider border on selected row
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1802
2019-04-02 20:12:56 +05:00
Carlos Garnacho
a6eb593370 Merge branch 'startup-id-private' into 'gtk-3-24'
Centralize DESKTOP_STARTUP/AUTOSTART_ID handling

See merge request GNOME/gtk!659
2019-04-02 12:38:18 +00:00
Jan Alexander Steffens (heftig)
2d3936cbe6
Centralize DESKTOP_STARTUP/AUTOSTART_ID handling
Add private API to GDK to move these variables from the environment into
static scope. Also move the DESKTOP_STARTUP_ID validation here to reduce
code duplication.

Use constructors to read them as early as possible; however, do not
unset them until first requested. This avoids breaking gnome-shell and
gnome-settings-daemon, which want to use the DESKTOP_AUTOSTART_ID in
their own gnome-session clients.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1761
2019-04-02 09:14:35 +02:00
Emmanuele Bassi
6ed7d60a20 Set the a11y name of the "create folder" button
Otherwise it'll get a generic "Menu" name.

https://gitlab.gnome.org/GNOME/gtk/issues/137
2019-04-01 14:44:25 +01:00
Matthias Clasen
59a272fdef Close a documentation gap 2019-03-31 18:36:38 -04:00
Rick Yorgason
446659e80f Fixed bug that prevented GTK from storing printer driver preferences in the print dialogue on Windows. Also saving devmode->dmDeviceName so the dialogue remembers which printer your selected last, and doesn't try to feed to saved preferences to the wrong printer. 2019-03-31 13:57:12 -07:00
Benjamin Otte
cd4b6a77a4 flowbox: children per line may not be 0 2019-03-29 23:59:52 -05:00
Christian Hergert
8dfb33fb5f flowbox: check for flowbox when updating selection 2019-03-29 16:26:20 -07:00
Matthias Clasen
f9e19dca49 Merge branch 'portal-session-state' into 'gtk-3-24'
Portal session state

See merge request GNOME/gtk!519
2019-03-29 23:22:47 +00:00
Matthias Clasen
08da4a2377 application: Add a query-end signal
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
2019-03-29 19:12:40 -04:00
Matthias Clasen
a3e070f59c Application: Support sandboxed session state changes
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
2019-03-29 19:12:20 -04:00
Matthias Clasen
a6f35772e7 Merge branch 'separate-marks-margins-on-scales' into 'gtk-3-24'
themes: Optimize code for marks margins on scales

See merge request GNOME/gtk!612
2019-03-29 22:58:49 +00:00
Christoph Reiter
567cc15132 Fix some translation domains in .ui files copied from gtk4
gtk40->gtk30
2019-03-29 17:35:35 +01:00
Matthias Clasen
1e2bd15b22 Merge branch 'wip/jimmac/list-image-buttons' into 'gtk-3-24'
list image buttons

See merge request GNOME/gtk!656
2019-03-29 14:26:13 +00:00
Matthias Clasen
1bb106012a Merge branch 'fix-gi-build-with-lto' into 'gtk-3-24'
Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692

See merge request GNOME/gtk!665
2019-03-27 05:56:15 +00:00
Benjamin Otte
bbb70857be gtk: Remove all gtk_widget_set_redraw_on_allocate() calls
They're either wrong (when using FALSE because the widgets don't account
for changes to the CSS) or unnecessary (when using TRUE because it's the
default).

Fixes !1777
2019-03-27 00:02:34 +01:00
Matthias Clasen
f35ce26336 color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
2019-03-25 16:52:40 -04:00
Jakub Steiner
fc3317138e Adwaita: tone down app icon shadows
- based on Tobias' and Allan's feedback, the app icon dropshadow
  were too prominent.
2019-03-25 17:59:24 +01:00
Christoph Reiter
55e73682cc Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692
The above flags in combination with "-fvisibility=hidden" break the
g-i build because it results in the g-i generated dumper executable not
linking against the libraries because they are detected as unused and
thrown out.

Fix by only using -fvisibility=hidden for the library and not g-i.
2019-03-25 09:54:54 +01:00
Руслан Ижбулатов
c33f9a2769 Inspector: Find themes the same way GtkCSSProvider does
Look for subdirectories named "gtk-3.x", where 'x' starts as current
minor version and counts down to 14, then drops to 0.
Only look for gtk.css in these directories though. If a theme only
provides gtk-dark.css, it won't be found.
2019-03-22 23:31:18 +00:00
Matthias Clasen
17665f06e3 Merge branch 'wip/jimmac/adwaita-selection-checked-buttons' into 'gtk-3-24'
Adwaita: checked buttons workaround

See merge request GNOME/gtk!657
2019-03-20 14:05:23 +00:00
Matthias Clasen
17dc55474b Merge branch 'adwaita-headerbar-switch-margins' into 'gtk-3-24'
Adwaita: Adjust switch margins on headerbars

See merge request GNOME/gtk!650
2019-03-20 14:04:32 +00:00
Jakub Steiner
e60b55626e Adwaita: focus ring radius
- backport from master

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-20 13:40:21 +01:00
Jakub Steiner
e7e31a4835 Adwaita: only tone down image buttons
- Rather than making labeled buttons inside lists toned down,
  only tone down image buttons, so that we don't have to include
  icon-only actions. Places like Software can continue using label
  buttons with no change without having those less visible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1748
2019-03-20 11:31:50 +01:00
Jakub Steiner
c9cfdf7a91 Adwaita: checked buttons workaround
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1642 once and for all

(until it resurfaces)
2019-03-19 17:22:42 +01:00
Alex Monday
430caaa167 Adwaita: Adjust switch margins on headerbars
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:46:00 +05:00
Kristian Rietveld
91f2ad4a2f Bug 743717 - Crashes on clipboard operation, influence by clipboard ...
The problem here was that NSPasteboard would release the clipboard
owner if all data items were transferred. When trying to re-use this
owner at a later point, GTK+ would attempt a retain call on a released
object and crash.

Fix this by not immediately releasing the owner after declaring types,
so by keeping our own reference around.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/529
2019-03-18 14:00:51 -07:00
John Ralls
93bf85e92f [Quartz] Fix some compile warnings in gtkclipboard-quartz.c. 2019-03-18 13:33:40 -07:00
Carlos Garnacho
224a53d97b gtkapplication: Stash DESKTOP_STARTUP_ID on a constructor
It might be too late to do it at GtkApplication::add_platform_data time,
since the envvar may be consumed earlier on if gdk_display_open() happened
to be called before (eg. through gtk_get_option_group(TRUE)).

Stash the envvar in a constructor function, so its ensured to happen before
it can get consumed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1754
2019-03-18 12:28:48 +01:00
Matthias Clasen
967c5f7f7f Merge branch 'wip/carlosg/include-constructors-header-3-24' into 'gtk-3-24'
gdk: Include copy of glib/gconstructor.h

See merge request GNOME/gtk!643
2019-03-18 01:09:40 +00:00
Carlos Garnacho
05bc2f4dc1 gdk: Include copy of glib/gconstructor.h
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:50:35 +01:00
Matthias Clasen
7b2c731fae entry: Use a better icon for Caps Lock warning
Use the same icon we use in master now.
2019-03-15 18:57:46 -04:00
Matthias Clasen
9e658cb51d Merge branch 'wip/kalev/gtk_window_present-runtime-warnings' into 'gtk-3-24'
window: Undo runtime gtk_window_present deprecation warnings

See merge request GNOME/gtk!632
2019-03-15 00:46:51 +00:00
Руслан Ижбулатов
3fe8b66b3b Fix UAC manifest RC file
CREATEPROCESS_MANIFEST_RESOURCE_ID is a macro defined in winbase.h,
so we need an include to resolve that macro to its value, 1.

Without that it stays as a literal CREATEPROCESS_MANIFEST_RESOURCE_ID,
and ends up in the .exe file as-is, and Windows can't find it by that name,
resulting in UAC manifest not working and gtk-update-icon-cache bringing
up UAC prompt.
2019-03-14 09:24:17 +00:00
Matthias Clasen
67f1113370 Merge branch 'adwaita-remove-selectionmode-assets' into 'gtk-3-24'
Adwaita: Drop checkbox-selectionmode assets

See merge request GNOME/gtk!633
2019-03-14 03:07:19 +00:00
Emmanuele Bassi
7771869ab3 Move the gtkunixprint.h include in the gtk-doc stanza
Every time a new <INCLUDE> directive is used inside a gtk-doc
sections.txt file it overrides the current include header until the next
<INCLUDE> directive. This has the unfortunate effect of making every
single section following the print-related ones to generate
documentation that says to include gtkunixprint.h.

In order to avoid re-arranging the gtk3-sections.txt file, we can tell
gtk-doc what's the default header to include for GTK, and override it
using `@Include` directives directly into the gtk-doc stanzas of the
sections that require a different header.

Fixes: #1746
2019-03-13 17:44:32 +00:00
Alex Monday
1edf11774c Adwaita: Drop checkbox-selectionmode assets 2019-03-13 14:13:42 +05:00
Kalev Lember
a8bbcf33ec window: Undo runtime gtk_window_present deprecation warnings
Now that gtk_window_present is no longer deprecated, remove the runtime
warnings as well.
2019-03-12 21:50:04 +01:00
Matthias Clasen
f88e8ea6fe Undo the gtk_window_present deprecation
It doesn't make sense to have it in 3.x if we don't
have it in master.
2019-03-12 16:25:10 -04:00
Matthias Clasen
e910ee2c19 Merge branch 'control-enter' into 'gtk-3-24'
atk key: Always convert control character events into key names

See merge request GNOME/gtk!630
2019-03-12 18:13:10 +00:00
Samuel Thibault
728f6869cb atk key: Always convert control character events into key names
including when the control modifier is present, i.e. when one is typing
control-I for instance.

Orca would convert them back to the corresponding ASCII letter anyway, and
when pressing control-tab, we do want to pass "tab", not pass "\t" that Orca
would erroneously convert to "control-I".

Fixes #1743
2019-03-12 18:22:36 +01:00
Jakub Steiner
ff6b519286 Merge branch 'monday15/gtk-adwaita-selectionmode-checkboxes2' into gtk-3-24 2019-03-12 17:24:41 +01:00
Alex Monday
a58d7573f6 Adwaita: Fix selection-mode checkboxes
Use object-select-symbolic as a check icon, adjust styles.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/28
2019-03-12 17:24:19 +01:00
John Ralls
942a2dede5 [GtkSearchEngineQuartz]Don't create file paths from NULL. 2019-03-11 17:58:38 -07:00
John Ralls
75b8abbf24 [GtkSearchEngineQuartz] Limit the scope of the Spotlight search.
If the query has a non-null location, set the scope to that directory,
otherwise set it to the local computer.

There is unfortunately no way to get Spotlight to search
non-recursively, nor does NSFileManager offer a convenient search of
the contents of a directory's regular files.
2019-03-11 17:58:38 -07:00
Matthias Clasen
e74622b0b8 Merge branch 'clipboard-quartz' into 'gtk-3-24'
gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets

See merge request GNOME/gtk!624
2019-03-11 15:13:37 +00:00
Jakub Steiner
e8e2f5163c Merge branch 'adwaita-radii-fixes' into 'gtk-3-24'
Adwaita radii fixes

See merge request GNOME/gtk!619
2019-03-11 10:59:55 +00:00
Tomasz Miąsko
593025a917 gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets
Copy documentation for gtk_clipboard_wait_for_targets from gtk/gtkclipboard.c
to quartz implementation. Primarily to add transfer container annotation as
otherwise pygobject tries to deallocate individual GdkAtoms.

Issue #1584.
2019-03-10 20:54:46 +01:00
Matthias Clasen
31a33593cd Merge branch 'adwaita-fix-backdrop-label' into 'gtk-3-24'
Adwaita: Fix label color on backdrop devel window

See merge request GNOME/gtk!623
2019-03-10 01:04:44 +00:00
Alex Monday
22d9241ab4 Adwaita: Fix label color on backdrop devel window
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1734
2019-03-10 00:52:48 +05:00
Matthias Clasen
54899a369e Merge branch 'adwaita-typo-fix' into 'gtk-3-24'
Adwaita: Fix typo (missing comma)

See merge request GNOME/gtk!617
2019-03-04 17:35:55 +00:00
Alex Monday
1d960d7028 Adwaita: Adjust entry border-radius
Replace entry border-radius value with $button_radius variable.
2019-03-04 22:25:37 +05:00
Alex Monday
44fcc0435c Adwaita: Replace spinbutton border-radii with variables
Replace hardcoded border-radius values with $button_radius
variable on spinbuttons.
2019-03-04 22:25:11 +05:00
Alex Monday
625a0e3d6c Adwaita: Replace all %linked radii with variables
Some of hardcoded border-radius values on linked elements were left
unchanged during Adwaita refresh.
2019-03-04 22:24:20 +05:00
Alex Monday
0b61d6f6ae Adwaita: Fix typo (missing comma)
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
2019-03-04 20:30:43 +05:00
Benjamin Otte
28ea04efca Merge branch 'treeview-separator-fix-drawing-zero-height' into 'gtk-3-24'
treeview: make sure separator nodes have a height > 0

See merge request GNOME/gtk!614
2019-03-04 12:22:42 +00:00
Emmanuele Bassi
c830ab2d55 Merge branch 'master' into 'master'
A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells

See merge request GNOME/gtk!505

(cherry picked from commit 95c0f07295)

a52431d2 A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells
2019-03-03 20:22:09 +00:00
Christoph Reiter
af6dd6bf35 treeview: make sure separator nodes have a height > 0
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.

This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.

Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
2019-03-03 10:44:52 +01:00
Alex Monday
deba92f729 themes: Optimize code for marks margins on scales
Separate marks margins for horizontal/vertical scales. Prevents
generation of unused margins.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1703
2019-03-02 14:20:02 +05:00
Jakub Steiner
2cd62574ac Adwaita: define insensitive links
- tone down the disabled/insensitive links.

Fixes issue #1645
2019-02-27 12:10:56 +01:00
Jakub Steiner
1a91c953eb Adwaita: scrolled context menus
- fix margins as per merg request #547
2019-02-27 11:45:27 +01:00
Martin Blanchard
d6840ad3dd menu: Fix accel-group property reset
GtkMenu's "accel-group" property setter, gtk_menu_set_accel_group(),
currently returns in failure if the caller passes it a NULL `accel_group`
argument. This argument is annotated with `(allow-none)`. This patch
add support for the NULL case.
2019-02-23 10:42:23 +00:00
Bastien Nocera
8ed0471785 window: Warn when gtk_window_present_with_time() is passed 0
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
2019-02-22 18:38:13 -05:00
Bastien Nocera
5d7183ee0c all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-22 18:38:11 -05:00
Bastien Nocera
2ca4a3cb41 window: Deprecate gtk_window_present()
And expect gtk_window_present_with_time() to be used instead.
2019-02-22 18:34:24 -05:00
Jakub Steiner
864e1ca526 Adwaita: circles for .circular buttons
- doesn't catch all cases, but most buttons need uniform paddings
  to remain circular, not elliptical.

fixes issue #1695
2019-02-22 12:35:32 +01:00
Emmanuele Bassi
2934482aee treeview: Don't show empty tooltips
If the column used for the GtkTreeView:tooltip-column contains NULL
we're already skipping a tooltip; let's ignore empty strings as well,
as an empty tooltip is pretty much pointless.

Close #1681
2019-02-18 17:44:17 +00:00
Emmanuele Bassi
6058495f50 Use C locale when building gtktypefuncs.c
We're using [a-z] ranges with sed and grep, and POSIX does not specify
their behaviour in non-ASCII locales:

  In the POSIX locale, a range expression represents the set of
  collating elements that fall between two elements in the collation
  sequence, inclusive. In other locales, a range expression has
  unspecified behavior
    -- IEEE Std 1003.1-2017, § 9.3.5 (7)

This can lead to no results, or invalid replacements, which in turn can
lead to broken builds or broken build artifacts.

Fixes: #1662
2019-02-14 17:06:49 +00:00
Jakub Steiner
03394c559d Adwaita: lost selectionmode resources
- somehow we lost the selection mode image resources
- FIXME: checkbox-active-selectionmode is not being used.
2019-02-08 15:53:00 +01:00
Jonas Ådahl
57300b4960 menu: Fixate size calculated by gdk_window_move_to_rect()
When we receive a size from the move-to-rect implementation, force GTK
to continue using that size until reconfigured by move-to-rect, or
when remapped.

Fixes: #1651
2019-02-07 10:01:05 +01:00
Jonas Ådahl
7298e73c44 menu: Force recalculation of size before positioning
On X11, the position of the menu is calculated synchronously by
gdk_window_move_to_rect(). This means that calculating the window size
when showing is too late, as that'd mean the size used when calculating
the position is out-of-date. The first time a menu is mapped, however,
the size is calculated during realization; but a window is only realized
once, so it doesn't work for subsequent maps.

Currently, this is harmless, as a GtkMenu can change its size however it
wants after it has been mapped. This, however, is problematic, as it
means the position calculated by gdk_window_move_to_rect() might no
longer be valid, or constraints made by the same function might no
longer be respected.

Thus, this is a preparation for making GtkMenu popups stay the same size
until they are remapped again at a later point.
2019-02-07 10:01:05 +01:00
Jonas Ådahl
461f5fde03 window: Add private API to force-resize
Sometimes (read for GtkMenu on X11) it's not enough to resize on show,
and relying on the size to be calculated on realization only works the
first time a menu is popped up, so add an API that GtkMenu can use to
ensure the size of a menu is "refreshed" before passing anything along
to gdk_window_move_to_rect().
2019-02-07 10:01:05 +01:00
Jonas Ådahl
edb57a9202 window: Add private API to fixate size
This causes window size guessing to always use the remembered size (the
size of the GdkWindow). This will be useful for menus which size is
managed by gdk_window_move_to_rect(), to avoid overriding the size
calculated by the move-to-rect implementation.
2019-02-06 19:34:20 +01:00
Emmanuele Bassi
43980583e3 sw: Do not cast clear function in g_clear_pointer()
We don't need to do it, since g_clear_pointer() will do it for us, and
will also check if the function conforms to a GDestroyNotify. Using an
explicit cast will generate a compiler warning.
2019-02-05 15:35:27 +01:00
Emmanuele Bassi
eb732b3f68 container: Disable deprecation warnings
We know we're using deprecated GtkContainer API, because we're
implementing it.
2019-02-05 15:23:09 +01:00
Emmanuele Bassi
c2ddb932b2 popover: Disable deprecation warning
For gtk_render_frame_gap().
2019-02-05 15:22:06 +01:00
Emmanuele Bassi
d9d3ec7cad menu: Fix condition check
A logical "and" became a binary "and" in commit c35878ec.
2019-02-05 15:18:41 +01:00
Jakub Steiner
224213dad6 Adwaita: selection mode buttons fix
- don't allow the headerbar :active darkening (bug #1588) to override
  selection-mode blue buttons.

Fixes issue #1642
2019-02-04 17:24:55 +01:00
Alex Monday
7c325ed852 HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:08:07 +01:00
Alex Monday
950480cea4 HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:07:56 +01:00
Jakub Steiner
57ba052522 Revert "HighContrast: Add style for overflow buttons"
This reverts commit ff4dcf5fa4.
2019-02-04 15:05:43 +01:00
Jakub Steiner
af3bcc6adc Revert "HighContrast: Add menu padding"
Revert conflicting patches to rebase adwaita-3-32 easily. will apply afterwards.

This reverts commit a7ea8248ce.
2019-02-04 15:05:43 +01:00
Matthias Clasen
ffa8fef2fa gtk: Stop using deprecated pango api 2019-02-04 15:05:43 +01:00
Matthias Clasen
13c126b277 gtk: Add a copy of some deprecated pango api
We use pango_find_base_dir() in a few places, and
this api has been deprecated.
2019-02-04 15:05:43 +01:00
Alex Monday
806e98d67e HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:05:43 +01:00
Alex Monday
377b2872be HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:05:43 +01:00
Emmanuele Bassi
e28c7a41ee switch: Take gadget clip into account
Now that we've switched the on and off states to gadgets, we need to
ensure that the widget's clip take into account the clip of every
gadget.

Fixes #1631
2019-02-04 15:05:43 +01:00
Alex Monday
933765204f Adwaita: Horizontal OSD spinbutton entry fix
Add placeholder to hande horizontal spinbutton entries,
add instructions for horizontal OSD spinbutton entry to use this
placeholder.
2019-02-04 15:05:43 +01:00
Alex Monday
7395160e5b Adwaita: Improve dropdown menu buttons
Improve overflow arrow buttons drawing on a scrollable dropdown menu:
reduce top button's margin-top to match size of a bottom button, add
margin-top for bottom button to compensate bottom margin (otherwise
button overlaps with menu content).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1539
2019-01-31 16:42:32 +01:00
Jakub Steiner
b522c59880 Adwaita: switches with no labels
- it's less busy and still clearer without the label
- It may be right that color alone is a poor differentiator,
  but labels do still exist for the accessible theme.
2019-01-28 12:34:48 +01:00
Jakub Steiner
519ff2ac6a Merge branch 'fix-button-icon-position' into 'wip/jimmac/adwaita-3-32'
Adwaita: Fix wrong icon position in some buttons

See merge request GNOME/gtk!533
2019-01-28 11:57:42 +01:00
Jakub Steiner
6f1e611c3b Merge branch 'wip/jimmac/adwaita-3-32' into 'fix-button-icon-position'
# Conflicts:
#   gtk/theme/Adwaita/_common.scss
#   gtk/theme/Adwaita/gtk-contained-dark.css
#   gtk/theme/Adwaita/gtk-contained.css
2019-01-28 10:46:48 +00:00
Sam Hewitt
17ab084f28 Adwaita: fix padding and rounding on menubar submenus 2019-01-28 11:43:54 +01:00
Jakub Steiner
4d08be5d03 Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-28 11:43:54 +01:00
Jakub Steiner
b6082efdc0 Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-28 11:43:54 +01:00
Jakub Steiner
aa1e565fb5 Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-28 11:43:54 +01:00
feichtmeier
fec7874d0e Reduce vertical menu padding from 8px to 4px 2019-01-28 11:43:54 +01:00
Jakub Steiner
72010d7894 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-28 11:43:54 +01:00
Jakub Steiner
25bf546eee Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-28 11:43:54 +01:00
Jakub Steiner
24e6995d92 Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-28 11:43:54 +01:00
Jakub Steiner
079aef0b8d Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-28 11:43:54 +01:00
Jakub Steiner
7da52e5255 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-28 11:43:54 +01:00
Jakub Steiner
568ea3b7f9 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-28 11:43:54 +01:00
Jakub Steiner
0f764eb16e Adwaita: make switcher buttons' active darker
- create more contrast against the headerbar background without lowering
  contrast with the label and border.
- top border shaded for extra aid of the state being pressed (in the two button   scenatio)

Addesses issue #1588
2019-01-28 11:43:54 +01:00
Jakub Steiner
de1f87b1f4 Adwaita: tone down the window roundounding 2019-01-28 11:43:54 +01:00
Jakub Steiner
86acf52032 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-28 11:43:54 +01:00
Jakub Steiner
c514cf75e4 Adwaita: darker active state for buttons 2019-01-28 11:43:54 +01:00
Jakub Steiner
5c67d7d7b1 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-28 11:43:54 +01:00
Jakub Steiner
5a7fc7e352 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
3b81932981 Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
71cfb8e077 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
37c47d70f6 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
0e95206697 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
99a48fe7e7 Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
60230b4653 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
9b820cde49 Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
15bd30d222 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
8d205fd518 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
b06712d3c9 Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
83a45d3bb0 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
aa1593505d Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
501bce47ea Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
585569f66e Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
5541152724 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
1c5071c346 Adwaita: round buttons
- Grumpy old man commits the first thing he dislikes on
  Allan's proposal.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
7e623b4f12 Adwaita: GNOME 3.32 changes
- colorsheme based on the new icon HIG color palette
- new switches
- darker headerbar to contrast with unfocused windows
- raised buttons derived from the icon style
2019-01-28 11:43:53 +01:00
Matthias Clasen
80b5024239 switch: Update the .symbolic.png icon too
Regenerate switch-off-symbolic.symbolic.png from switch-off-symbolic.svg.
2019-01-25 15:27:45 -05:00
Jakub Steiner
f900087f30 switch: fix off icon shape
- the recoloring would only work on rects and paths
2019-01-25 20:21:57 +01:00
nana-4
d82edf0c91 Adwaita: Fix wrong icon position in some buttons
This commit reverts min-width sizes and changes horizontal padding instead in
order to avoid off-centered button icons.

Fixes #1621
2019-01-25 21:02:47 +09:00
Matthias Clasen
75a4ae2aba switch: use icons
Use the newly added icons.
2019-01-24 20:15:47 -05:00
Matthias Clasen
9fe0ef42a1 Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 17:47:28 -05:00
Sam Hewitt
cde6ae938e Adwaita: fix padding and rounding on menubar submenus 2019-01-24 11:32:25 -05:00
Matthias Clasen
6a4ce55a69 switch: Avoid problems with glyph availability
If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
2019-01-23 12:04:08 -05:00
Iain Lane
882c81dab2 Fix -Wincompatible-pointer-types warnings 2019-01-23 12:18:18 +00:00
Jakub Steiner
e7d7cb580e Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-22 12:15:47 +01:00
Jakub Steiner
f2c3481b5c Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-22 11:59:40 +01:00
Jakub Steiner
393a016c5a Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-22 11:55:10 +01:00
Jakub Steiner
1f9ee936e8 Merge branch 'Menus_based_on_wip/jimmac/adwaita-3-32' into 'wip/jimmac/adwaita-3-32'
Reduce vertical menu padding from 8px to 4px

See merge request GNOME/gtk!520
2019-01-21 21:24:44 +01:00
feichtmeier
254719ee50 Reduce vertical menu padding from 8px to 4px 2019-01-21 20:31:19 +01:00
Jakub Steiner
dc144d1266 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-21 19:34:33 +01:00
Jakub Steiner
c82d6f9872 Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-21 13:16:42 -05:00
Jakub Steiner
6ff9e5ab7d Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-21 13:16:42 -05:00
Jakub Steiner
b8d142f8b8 Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-21 13:16:42 -05:00
Jakub Steiner
e66c0a45d4 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-21 13:16:42 -05:00
Jakub Steiner
83dcdaa402 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-21 13:16:42 -05:00
Jakub Steiner
091b189ce3 Adwaita: make switcher buttons' active darker
- create more contrast against the headerbar background without lowering
  contrast with the label and border.
- top border shaded for extra aid of the state being pressed (in the two button   scenatio)

Addesses issue #1588
2019-01-21 13:16:42 -05:00
Jakub Steiner
0fc284bf61 Adwaita: tone down the window roundounding 2019-01-21 13:16:42 -05:00
Jakub Steiner
e51f08bda0 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-21 13:16:42 -05:00
Jakub Steiner
1efa376b83 Adwaita: darker active state for buttons 2019-01-21 13:16:42 -05:00
Jakub Steiner
6d391b89b8 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-21 13:16:42 -05:00
Jakub Steiner
4300a5c609 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
914813c44a Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
c529de1765 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
71a97accf2 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
7a51da1e69 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
2badd5f45a Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
92ebd74101 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
df40f2cc2b Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00