Commit Graph

28447 Commits

Author SHA1 Message Date
Jakub Steiner
de348ba984 Adwaita: notebook legibility fixes
- make inactive tabs more legible

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652
2020-06-23 22:24:57 +02:00
John Ralls
c6036592c9 [Quartz]Silence type mismatch warning. 2020-06-20 10:20:20 -07:00
Friedrich Beckmann
7d9a939f99 quartz: gtk-application - inhibit openFiles events from cmdline
When an application is started via cmdline, then openFiles events
from MacOS are generated although gtkapplication already interprets
the cmdline arguments and opens suitable arguments as files. So they
would be opened twice. Depending on the exact situation the
openFiles event can also be issued before the startup signal
is given. Depending on the application this can result in a crash
due to unexpected behaviour. I took this idea from the
gedit-app-osx.m file. Also from Jesse van den Kieboom.

See:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2098#note_842975
https://gitlab.gnome.org/GNOME/gtk/-/commit/a3ad7fa80f764fb7bcbe
https://gitlab.gnome.org/GNOME/gedit/-/blob/master/gedit/gedit-app-osx.m#L592
2020-06-18 21:08:28 +02:00
Matthias Clasen
a3ad7fa80f Merge branch 'gtk-application-quartz' into 'gtk-3-24'
quartz: Bugfix - Add openFiles delegate to gtk_application (#463)

See merge request GNOME/gtk!2098
2020-06-16 16:41:27 +00:00
Friedrich Beckmann
665f8b6b87 quartz: added open capability to gtk_application
This patch implements the openFiles delegate which is required
to open files which are associated with an application via the
Finder or via open on the command line. The patch has been
proposed by jessevdk@gmail.com.

See: https://gitlab.gnome.org/GNOME/gtk/-/issues/463

I tested the patch with the GNU pspp application on MacOS with
the quartz backend.
2020-06-16 16:59:06 +02:00
Benjamin Otte
947c3e9f72 Merge branch 'benzea/fix-css-update' into 'gtk-3-24'
Fix CSS update loop

See merge request GNOME/gtk!2093
2020-06-15 20:13:56 +00:00
Benjamin Berg
7a5caf1bc0 cssnode: Don't queue_validate/deque_validate invisible nodes
Otherwise setting/unsetting the parrent may cause on an invisible widget
may cause the style to be continuously updated.

Fixes: #2849
2020-06-15 21:31:16 +02:00
Matthias Clasen
3065f47ab5 Merge branch 'michaelweghorn/issue1820_gtkfilechoosernativeportal_get_filter' into 'gtk-3-24'
Make gtk_file_chooser_get_filter work for the portal GtkFileChooserNative (issue #1820)

See merge request GNOME/gtk!1960
2020-06-15 17:52:58 +00:00
Matthias Clasen
46a7ffc336 Merge branch 'michaelweghorn/issue1820_gtkfilechoosernative_get_filter' into 'gtk-3-24'
gtk_file_chooser_get_filter Make gtk_file_chooser_get_filter work for the non-portal GtkFileChooserNative (issue #1820)

See merge request GNOME/gtk!1959
2020-06-15 17:51:36 +00:00
Philip Withnall
fb998ff52d gtkbuilder: Eliminate array reallocations in get_parameters()
`gtk_builder_get_parameters()` is a hot path, being called twice for
each object in each UI file in an application. The majority of objects
have ≤ 8 properties, which are each filtered into either `parameters` or
`filtered_parameters`.

Unfortunately, both of those arrays are created as empty `GArray`s, and
adding 8 elements to an empty `GArray` hits the worst possible case of
reallocating and `memcpy()`ing the array 3 times. As the array size is
doubled with each reallocation, the cost is not particularly well
amortised when the array size is small.

From the `ObjectInfo`, we actually know how many properties there are in
total, so just allocate the arrays at the right size to begin with.

This saves 7% of the instruction cycles needed to start up
gnome-software to the point where it’s showing its main window,
according to callgrind. gnome-software is making around 5500 calls to
`gtk_builder_get_parameters()`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-10 19:59:03 +01:00
Michael Weghorn
d59b28d5f4 Make gtk_file_chooser_get_filter work for portal case
This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.

In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)

Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.

* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311

This fixes #1820 for desktop portal case.

Fixes: #1820
2020-06-09 22:52:11 +02:00
Thomas Holder
1573ff6803 gtk_file_chooser_set_current_name: fix type of name argument
The description says UTF-8 string, but the annotation said filename.
2020-06-05 12:43:49 +02:00
Emmanuele Bassi
d60746ae6c Merge branch 'issue-2820' into 'gtk-3-24'
docs: Update the link to the GtkBuilder schema

See merge request GNOME/gtk!2042
2020-06-05 09:46:56 +00:00
Emmanuele Bassi
e9c4c80102 docs: Update the link to the GtkBuilder schema
The link to the file is still using the old cgit format, which redirects
to master, where the RNC file is gone.

Fixes: #2820
2020-06-05 10:16:19 +01:00
Kjell Ahlstedt
52d944ec44 flowbox: Don't use a removed child after it has been unparented
In gtk_flow_box_remove(), call g_sequence_remove() before the child is unparented.

See MR !2029
2020-06-04 08:24:08 -04:00
Neville
7fd126e2af Adwaita: Remove .tile from checkbox style selector
Currently .tile style is required for the larger blue checkboxes.
The .tile style is removed since it adds unwanted style to elements.
Also the selector to ignore list elements has been modified since
it currently checks for checkboxes that are not lists.
2020-06-03 20:56:39 +05:30
Matthias Clasen
92f11144f3 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix GPtrArray sorting function

See merge request GNOME/gtk!1984
2020-06-01 14:46:14 +00:00
Alexander Mikhaylenko
60f69462fc Adwaita: Revert black decoration background
Before I tried this change, I thought it might break apps that do
transparent window background. So I checked a few that did this:
gnome-terminal, tilix, kgx. It worked, so it must work everywhere, right?

However, it just so happens that vte is drawn using CAIRO_OPERATOR_SOURCE
operator rather than CAIRO_OPERATOR_OVER like everything else. This means
that if vte widget is transparent, anything below it, like a black
decoration background, won't be shown.

So really it is still broken, so reverting it.
2020-05-30 15:22:40 +05:00
Tristan Partin
6a507c0b63
Fix GPtrArray sorting function
GPtrArray's GCompareFunc passes a double pointer that needs to be
dereferenced in order to use the data you are actually wanting to
compare.

See: https://developer.gnome.org/glib/stable/glib-Pointer-Arrays.html#g-ptr-array-sort
2020-05-29 15:24:09 -05:00
Michael Weghorn
baddc90c26 filechoosernative: Make get_filter work for (non-portal) native chooser
'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.

This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.

Bug: #1820
2020-05-23 14:02:34 +02:00
Jakub Steiner
1f8c019d1e Merge branch 'theme-linked-button-fixes-gtk3' into 'gtk-3-24'
Adwaita: Fix and simplify the linked buttons styling (GTK3)

See merge request GNOME/gtk!1948
2020-05-22 09:30:16 +00:00
Ondrej Holy
cb9b7278d6 trash-monitor: Rate limit updates
Trash monitor queries info from gvfsd-trash after each file monitor
change which can be problematic when too many changes happen in
a short time. Let's rate limit the number of queries...

Fixes: #1010
2020-05-21 21:16:20 -04:00
nana-4
34d85329a9 Adwaita: Fix and simplify the linked buttons styling
- Remove various unnecessary overrides for linked buttons.
- Add missing outline styles to the %linked_vertical ones.
- Consistently use :not(.vertical) instead of :dir(ltr|rtl) for linked
  combo buttons.
- Remove :only-child styling from the messagedialog button. The
  :only-child is equivalent to :first-child:last-child, so we don't need
  the styling there specially.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2752
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2549
2020-05-21 00:51:54 +09:00
Matthias Clasen
88fc1640ed Merge branch 'BUG_double_popover_focus_filechooser_GTK3' into 'gtk-3-24'
filechooser: set default widget early for 'Rename' popover

See merge request GNOME/gtk!1592
2020-05-19 23:26:56 +00:00
Carlos Garnacho
df8e6ea32e gtksearchenginetracker3: Pre-fill GFileInfo from query
Provide the minimal info necessary. Improves apparent responsiveness
(since we don't visibly clear and repopulate the list) and saves doing
file stat/reads on every file in the result set.
2020-05-19 22:03:39 +02:00
Carlos Garnacho
ae776046fc gtksearchengine: Add tracker3 search engine
Make this dependency optional at build time, and prefer it over
the old tracker <= 2.x implementation.
2020-05-19 22:03:39 +02:00
Carlos Garnacho
5858f7c5bd gtksearchengine: Add autoptr handler for this type
So subclasses can just use G_DECLARE_*_TYPE.
2020-05-19 22:03:20 +02:00
Carlos Garnacho
99031f885e gtksearchengine: Add "got_results" argument to ::finished
The filechooser tries to figure out whether it got results by poking
the model, but all files might go through the async GFileInfo querying
state.

Make all search engines (and the composite one) just notify about this
fact, so the file chooser can behave appropriately without waiting for
the async operations to finish.
2020-05-19 22:03:20 +02:00
LRN
0e8eedee16 Merge branch '324-print-paper' into 'gtk-3-24'
W32: Ensure paper size/orientation is preserved

See merge request GNOME/gtk!695
2020-05-18 08:55:47 +00:00
Alexander Mikhaylenko
97f540622a eventcontrollerscroll: Fix the history push condition
Once upon a time, there was a function called gdk_event_get_scroll_deltas().
It returned %TRUE when an event had scroll deltas and that was used as the
condition to decide whether to push scroll deltas to the scroll history,
even when the both deltas are 0 for the stop event at the end of scrolling.

When GtkScrolledWindow kinetic scrolling code was adapted for
GtkEventControllerScroll, it was replaced with a (dx != 0 && dy != 0)
check. This prevented the stop event from getting into the history, and
instead allowed non-smooth scrolling to affect the history as they have
synthetic deltas with one of the values being -1 or 1 and the other on 0.

Instead, check the direction as we already have it as a local variable.
2020-05-15 01:37:40 +05:00
Matthias Clasen
4f7c3610d6 Merge branch 'wip/sadiq/entry-select-all' into 'gtk-3-24'
entry: Always show “select-all” button on touch popup

See merge request GNOME/gtk!1857
2020-05-13 15:05:21 +00:00
Simon McVittie
4db3f142d7 aboutdialog: Document the new licenses added in 3.24.20
Originally part of b4c79bad "Assorted documentation fixes" by
Matthias Clasen.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-05-11 18:35:58 +01:00
Simon McVittie
177aeca5a1 aboutdialog: Update precondition checks for new licenses added in 3.24.20
To avoid making this mistake again, add a static assertion that the
enum is in sync with gtk_license_info, and use the length of
gtk_license_info for the precondition check.

Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: #2734
2020-05-11 18:35:58 +01:00
Alynx Zhou
530f0c0300 Remove platform specific code 2020-05-11 10:13:17 +08:00
Mohammed Sadiq
c823a4d673 entry: Always show 'select-all' button on touch popup
On touch, the popup shown shall contain the 'select-all' button
only if a selection is in progress and if the entry is editable.
Let the button be shown always if selectable so that it’s more helpful.
2020-05-07 18:09:40 +05:30
Matthias Clasen
86b0b80dfa filechooser: Translate type column
When the code for this was copied from nautilus,
we forgot to adapt it for running in a library
instead of an application - gettext() doesn't work
in a library.

Fixes: #2690
2020-05-02 20:07:33 -04:00
Florian Müllner
f28c6d34a7 appchooserdialog: Don't show broken subtitles
Commit 07beb6dba2 made GtkAppChooserWidget useful with no content-type,
however when used in a GtkAppChooserDialog, this will lead to a confusing
"Opening (null) files" subtitle.

Fix this by omitting the subtitle altogether in that case.
2020-05-01 18:22:39 +02:00
Nelson Benítez León
1a9aa675e4 GtkTreeviewColumn: don't focus-on-click header buttons
currently when mouse clicking on a column header
to sort it it is grabbing keyboard focus, this
should not happen, keyboard focus should remain
where it was before. This can be seen on the
GtkFileChooser widget, when having the keyboard
focus on the file list items and clicking on a
column header to sort it the keyboard focus is
now on the header.
2020-04-30 22:30:17 -04:00
Alynx Zhou
721ce22a86 menu: Fix touch support by using pointer emulation under X11
GtkMenu under X11 cannot handle touch events properly,
so just disable touchscreen grabbing for it, which makes
it fallback to pointer emulation.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/945

menu: Fix grab on other backend
2020-04-30 10:16:25 +08:00
Matthias Clasen
521a382d79 HighContrast: regenerate css 2020-04-27 08:47:35 -04:00
Peter Bloomfield
3b5e10ef4d file-system-model: Refactor a helper
Push more common code into the helper for
gtk_file_system_model_query_done() and
gtk_file_system_model_one_query_done().
2020-04-27 08:21:45 -04:00
Peter Bloomfield
326077d2ed file-system-model: Avoid use-after free
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657

Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid derferencing a stale pointer.
2020-04-27 08:18:48 -04:00
Jakub Steiner
be159ab93c Merge branch 'wip/exalm/solid-csd' into 'gtk-3-24'
theme: Fix decoration background

See merge request GNOME/gtk!1742
2020-04-23 14:26:32 +00:00
Alexander Mikhaylenko
d46aa9f49e theme: Fix decoration background
'window' is not the only toplevel css name, there are also 'dialog' etc.

Move it before .solid-csd style so that .solid-csd background takes
precedence.
2020-04-23 19:06:33 +05:00
Jakub Steiner
16b4ae8486 HC: export public colors
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2641 and
https://gitlab.gnome.org/GNOME/gtk/-/issues/2650
2020-04-23 14:24:46 +02:00
Jakub Steiner
30906f3240 Adwaita: lower glyph contrast for checkboxes
- stylistic choice didn't sit well with majority of the design team
2020-04-23 13:57:58 +02:00
Nelson Benítez León
7c343a87d1 GtkPlacesSidebar: avoid location clicks to grab focus
Sibebar location rows should not grab focus on click.

Fixes filechooser issue #1469
2020-04-18 14:38:47 -04:00
Emmanuele Bassi
633f0fa52a Merge branch 'jjardon/3_24_more_licenses' into 'gtk-3-24'
3.24: gtk/gtkaboutdialog: Add some more very common licenses:

See merge request GNOME/gtk!1672
2020-04-17 21:50:45 +00:00
Matthias Clasen
3483a3e134 Merge branch 'BUG_filechooser_async_data_loss_GTK3' into 'gtk-3-24'
GtkFilechooserWidget: prevent oblivious selection of file

See merge request GNOME/gtk!1682
2020-04-17 20:30:07 +00:00
Matthias Clasen
0459569b49 Avoid a critical in the Emoji chooser
If event_widget is NULL, just dismiss the popover.

https://gitlab.gnome.org/GNOME/gtk/-/issues/2199
2020-04-14 15:37:59 -04:00
Nelson Benítez León
e6ff990145 GtkFilechooserWidget: prevent oblivious selection of file
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.

The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently just after
confirming the "file overwrite" dialog.

Fixed by adding a flag to ignore any button/key press
events sent to the file list. We set this flag just
after the user accepts the "file overwrite" dialog,
which means the enclosing GtkfilechooserDialog is about
to get closed. And we restablish the flag when the dialog
is shown again (in its map() handler).

Fixes data loss issue #2288
2020-04-13 16:33:10 -04:00
Mathieu H
73737bcc4f Remove the blacklist list in convert-emoji.c since now it is supported 2020-04-13 15:27:40 +00:00
Matthias Clasen
e51cfe2349 Merge branch 'window-set-focus-docstring-fix' into 'gtk-3-24'
window: Fix docstring formatting on 'set-focus' signal

See merge request GNOME/gtk!1677
2020-04-12 22:50:07 +00:00
Collin May
d536fa5aa4 window: Fix docstring formatting on 'set-focus' signal
This comment was added in 93bcca7f02 but missed a
colon so it never actually generated documentation and the nullable annotation
never made it into GObject-introspection language bindings.

This crude regex does not catch any other instances of this mistake. The @
symbol is used to disambiguate signal doc comments from property doc comments,
since property docs usually don't have parameters.

$ pcre2grep -rM '\\* [A-Z][A-Za-z]*:([a-z\-]*):\n +\* @' gtk/
2020-04-12 15:09:54 -07:00
Luca Bacci
0352d88b8a
Fix message dialog not shown when the user tries to create a folder but a file with the same name exists
Fixes issue #2604
2020-04-12 15:05:18 +02:00
Javier Jardón
adc2f4ad9e 3.24: gtk/gtkaboutdialog: Add some more very common licenses:
- BSD 3-Clause "New" or "Revised" license
- Apache License 2.0
- Mozilla Public License 2.0
2020-04-12 13:11:22 +01:00
Simon McVittie
c37bbb2641 Add miscellaneous unpackaged files to dist tarball
Various files are in git but not in dist tarballs. Some of them look
like potentially useful references for downstream distributors.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-08 13:43:28 +01:00
Matthias Clasen
5a0891c69d Merge branch 'gtk-3-24' into 'gtk-3-24'
docs: Do not call GTK APIs if gtk_init_check returns FALSE

See merge request GNOME/gtk!1617
2020-04-04 03:18:01 +00:00
Nicola Fontana
392d4de8a9 docs: Do not call GTK APIs if gtk_init_check returns FALSE
See issue #994.
2020-04-03 22:59:59 +02:00
Matthias Clasen
da1686eb47 Fix build issues with HighContrast theme 2020-04-03 12:54:32 -04:00
Matthias Clasen
58cfd44307 Merge branch 'BUG_filechooser_new_folder_focus_GTK3' into 'gtk-3-24'
gtkfilechooserwidget: set 'New folder' button focus-on-click

See merge request GNOME/gtk!1595
2020-04-01 04:28:22 +00:00
Nelson Benítez León
527a99e598 GtkMenuButton: disable focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

GtkScaleButton and GtkVolumeButton set focus-on-click
to FALSE for this same reason.

Fixes #2557
2020-03-31 21:00:32 -04:00
Nelson Benítez León
3997cdf2f4 gtkfilechooserwidget: set 'New folder' button focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

So this is also the case for the 'New Folder' button on
the filechooser.

Fixes #2557
2020-03-31 20:15:34 -04:00
Nelson Benítez León
6d98edf89f filechooser: set default widget early for 'Rename' popover
because otherwise this second[1] popover will not be
able to save the filechooser default widget (the 'save'
button) because the first popover has not yet restablish
it (as will be done on popover's unmap handler).

[1] second because 'Rename' popover is launched from inside
    the 'file properties' popover.

Fixes #2555
2020-03-31 14:32:03 -04:00
Matthias Clasen
21e0e3f863 Merge branch 'wip/jimmac/HC-redesign-gtk3' into 'gtk-3-24'
HC: derive from Adwaita

See merge request GNOME/gtk!1587
2020-03-30 17:48:22 +00:00
Bastien Nocera
8dfb1d197a gtkprivate: Remove g_auto usage
Fixes: 93ab478af1
2020-03-30 17:50:50 +02:00
Bastien Nocera
fa16b682ef colorpickerportal: Remove g_auto usage
Fixes: 7b1b3fa0cb
2020-03-30 17:50:09 +02:00
Jakub Steiner
98148d9d60 HC: derive from Adwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1450
2020-03-30 16:49:44 +02:00
Matthias Clasen
a923ee9b87 Don't forget to dist gtktexttagprivate.h 2020-03-27 16:50:15 -04:00
Matthias Clasen
5e7650729b Merge branch 'wip/hadess/portal-select-folders' into 'gtk-3-24'
filechoosernativeportal: Allowing selecting folder(s)

See merge request GNOME/gtk!1523
2020-03-27 18:34:02 +00:00
Jakub Steiner
f4c705b404 Adwaita: work around holes in unfocused windows
- works around holes in rounded corners of backdrop windows

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2537
2020-03-26 19:09:57 +01:00
Bastien Nocera
35fec1c6b2 filechoosernativeportal: Allowing selecting folder(s)
Use the "directory" portal option when asked to select folders.
2020-03-23 15:41:10 +01:00
Bastien Nocera
93ab478af1 Add portal version checking helper
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-23 15:05:40 +01:00
Bastien Nocera
f70f2d7cae colorpickerportal: Don't throw warnings on missing version
If the version can't be fetched, don't throw a warning.
2020-03-23 14:59:51 +01:00
Bastien Nocera
4c71bf74f1 colorpickerportal: Simplify portal version fetching 2020-03-23 14:59:51 +01:00
Bastien Nocera
7b1b3fa0cb colorpickerportal: Use convenience function to fetch uint
Rather than open coding it.
2020-03-23 14:59:51 +01:00
Matthias Clasen
72689c52a5 Merge branch 'adwaita-tnum' into 'gtk-3-24'
theme: use tabular figures where appropriate

See merge request GNOME/gtk!1493
2020-03-20 20:35:57 +00:00
Carlos Garnacho
2647dc1d98 Merge branch 'imm-context-use-after-free' into 'gtk-3-24'
Fix crash with certain IME

See merge request GNOME/gtk!1290
2020-03-20 15:05:43 +00:00
Christian Hergert
9fc7c3b1b3 textbtree: short-circuit visibility check when possible
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.

Not using invisible tags is overwhelmingly the common case.
2020-03-18 12:56:19 -07:00
Christian Hergert
2aba6f0ba4 texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
2020-03-18 12:50:32 -07:00
Christian Hergert
4f0842c713 texttagtable: move private functions to gtktexttagtableprivate.h
This makes backporting changes from 4.x a bit easier.
2020-03-18 12:42:40 -07:00
Jakub Steiner
5be08a4d09 Adwaita: dark switches/check/radios
- unescape variables (gtk3 didn't raise warnings like gtk4, but it was broken)
2020-03-18 13:07:05 +01:00
Jakub Steiner
71bdf20cff Adwaita: dark switches/check/radios
- lighten up radios, switches and checkboxes

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:19:50 +01:00
Emmanuele Bassi
b4808c187f Silence a compiler warning
GCC complains with boxed out arguments that may be unset.
2020-03-13 16:05:13 +00:00
Emmanuele Bassi
c08908b488 Fix build when G_ENABLE_DEBUG is undefined 2020-03-13 15:51:57 +00:00
Emmanuele Bassi
7c23119e8f Use ifdef when checking G_ENABLE_DEBUG
Don't use `if`, as we don't unconditionally define the symbol.
2020-03-13 15:51:57 +00:00
Eivind Naess
2c85be990d Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497
The 'selection-changed' signal is emitted unconditionally, even in the case
when there is no selection to be cleared. As a result, the subscriber receives
the initial signal and if he calls gtk_file_chooser_get_uri(), no value is
currently selected.
2020-03-08 18:54:10 -07:00
Lukas K
82b9be3297 theme: use tabular figures where appropriate
Set font-feature-settings: "tnum" on spinbuttons, progress bars and
scales

fixes #1478
2020-02-29 14:33:49 +01:00
Bastien Nocera
53b0c5fd88 filechooser: Fallback if content-type unavailable
Fallback to fast-content-type if the content-type attribute isn't
available, as is the case for most remote filesystems.

Closes: #2482
2020-02-28 16:59:19 +01:00
Bastien Nocera
22b0400f5e filechooser: Fix crash when file has no content-type
This might happen for slow filesystems where a fast-content-type might
be provided instead. Don't try to manipulate that content_type if it's
NULL, otherwise we'll either throw warnings (at best) or crash (at
worse).
2020-02-28 16:56:29 +01:00
Lukas K
2e2b647833 css: add support for font-feature-settings 2020-02-25 22:54:00 +01:00
Florian Müllner
dc6ba8d688 Adwaita: Leave .circular .osd buttons alone!
.osd suggests a particular color/background/hover style, while .circular
only suggests roundness. So for buttons that use both classes, make sure
the former takes precedence with regard to background/hover.
2020-02-18 20:37:53 +01:00
Sebastian Dröge
d9fc2bffdd GtkDialog: Add type Gtk.XXX annotations for return values of action_area/headerbar getters 2020-02-18 10:51:20 +02:00
Sebastian Dröge
1f96d57a0f GtkInfoBar: Add type Gtk.Box annotation for action_area/content_area getters 2020-02-18 10:45:34 +02:00
Matthias Clasen
86ac6d447c Merge branch 'recursive-search' into 'gtk-3-24'
GtkSearchEngineSimple: Disable recursive search

See merge request GNOME/gtk!1356
2020-02-14 13:15:07 +00:00
António Fernandes
90a006b362 treeview: Prevent fuzzy centered expander arrows
We want expander arrows to be vertically centered in their row, so we
pass the cell area's height to the renderer.

However, if the cell area's height is an odd number while the
"expander-size" style property is an even number, or vice versa, the
arrow will be centered in a half pixel, and fuzzily rendered.

So, round the render height to the same parity as the expander-size.

(This is not necessary for the arrow width because it's assumed equal
to the "expander-size" style-property.)
2020-02-14 08:38:29 +00:00
António Fernandes
5d46f3c2e7 treeview: Respect expander-size style property.
An expander arrows's render width is supposed to be derived from the
"expander-size" style property.

However, we are actually rendering it for a width equal to
expander-size + 1. This results in ugly blurry rendering.

There is a comment justifying this "+ 1", which has been there for
almost 2 decades. But the justification doesn't seem to apply to
the current code, so the original motivation is likely obsolete.

Let's remove this "+ 1" to render the arrow to a width exactly equal
to the "expander-size" style property.
2020-02-14 08:38:29 +00:00
António Fernandes
0494090afa Revert "treeview: respect expander-size style property"
This reverts commit d6a29e1b8c.

It fixed blurry rendering of expander arrows.

However, it also introduced a regression in that the arrows are no
longer vertically centered if rows are taller than twice the
expander-size style property.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1464
2020-02-14 08:38:29 +00:00
Alberts Muktupāvels
840ef37bfd infobar: fix initial window position
Call gtk_widget_set_allocation after chaining up to parent class
to ensure that GtkInfoBar has correct allocation. Otherwise x and y
is set to zero causing wrong window position in gtk_info_bar_realize.

This fixes info-bar-message-types.ui reftest.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1428
2020-02-14 00:50:27 +02:00
Michael Catanzaro
fe2370a5ba window: prepare for window destruction after gtk_window_close()
Epiphany is doing something weird after calling gtk_window_close(),
because by the time the callback executes, the window has no GdkWindow.
Frankly, I don't know what's happening there, but we should probably not
crash.

Fixes #2424
2020-02-10 22:09:10 -06:00