Commit Graph

28096 Commits

Author SHA1 Message Date
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
Jakub Steiner
2dd73b7f76 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
034103b078 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
9f885ba16c Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
d5fcc8d522 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
213aeffd62 Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
25148ac344 Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8fc57f144c Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8a7023fe33 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
6ef7c2ef29 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-21 13:16:41 -05:00
Jakub Steiner
3fa0e4b0be 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-21 13:16:41 -05:00
Jakub Steiner
f7df4853e8 Merge branch 'wip/dboles/spinbutton-button-backdrop-disabled-3' into 'gtk-3-24'
SpinButton: Fix wrong background/icon colours in button:backdrop:disabled

See merge request GNOME/gtk!489
2019-01-21 13:57:43 +00:00
Matthias Clasen
b984074e29 Merge branch 'mcatanzaro/#1492' into 'gtk-3-24'
filechoosernative: Implement gtk_file_chooser_set_filter()

See merge request GNOME/gtk!435
2019-01-19 00:54:15 +00:00
Matthias Clasen
e2d9563a55 Merge branch 'wip/long-combo-boxes' into 'gtk-3-24'
Fix long combo box positioning

See merge request GNOME/gtk!514
2019-01-18 22:42:04 +00:00
Chun-wei Fan
5ffbeeff91 MSVC builds: Improve introspection build process
To avoid confusion, have the NMake Makefiles output the built introspection
files in the same location where the binaries are built for the project
files, according to the Visual Studio version, platform and configuration
where the build is carried out.

Also make generating the introspection NMake snippet portion more robust to
source additions and removals by checking on Makefile changes too.
2019-01-18 16:25:49 +08:00
Jonas Ådahl
c35878ecf1 menu: Adapt scroll offset if arrow is shown
When a popup is placed using move_to_rect(), it'll get feedback about
the position and size it got assigned. We use this feedback to update
the scroll offset, but while doing so, if the visibility of the arrow
changed, we didn't adapt the offset accordingly.

Fix this by offsetting the provided offset by the height of the arrow,
if it was made visible as a side effect of the scroll offset change
triggered by the feedback.

Related: mutter#105
Closes: #1463
2019-01-17 19:30:31 +01:00
Jonas Ådahl
3e586a82e6 menu: Force resize when remapping
A menu will be clamped to the work area as a side effect of the
move_to_rect() logic if the resize anchor flags was set. For it to work
a second time, the initial size needs to be the actual menu size before
being clamped again. Achieve this by forcing a size recalculation before
showing the menu.
2019-01-17 19:23:21 +01:00
Jonas Ådahl
00486efd51 menu: Don't constrain initial menu size
Don't constrain the initial menu size by the work area of some monitor;
instead let the move_to_rect() logic in the backend do the constraining.
This fixes two things:

1) The anchor delta provided to the backend will not be invalid. The
delta is calculated by looking at the active menu item, calculating the
offset given that, but since we clamped the window size before showing
the window, the delta became invalid. This caused visible issues when
the delta was large enough to make the initially calculated popup window
geometry to be placed outside the geometry of the parent window, which
is a violation of the Wayland protocol.

2) The scroll offset to be correct when receiving the positioning
feedback. While the scroll offset was based on the pre-clamped window
size, the feedback, which was used to calculate the new offset, was not,
causing the scroll offset to be clamped as well.
2019-01-17 19:14:37 +01:00
Michael Catanzaro
c0a0bfd388 filechoosernativeportal: stuff the current filter into options
We need to tell the portal what filter is supposed to be selected by
default, or it will just pick the first one, which could be wrong and
annoying.

This will require updated xdg-desktop-portal and xdg-desktop-portal-gtk
to work properly.

Fixes #1492
2019-01-16 17:45:44 -06:00
Matthias Clasen
ab748d05f0 about dialog: Use ::activate-link for license
This should behave the same as all the other links
in this dialog.

Closes: #1561
2019-01-15 23:16:16 -05:00
Emmanuele Bassi
ed39721aa7 Add fallbacks for GtkSwitch state labels
While the IEC power symbols have been part of Unicode since version 9.0,
released in 2016, not every font supports them.

We can use the old symbols as a fallback, as they seem to have the
better coverage, if not the best appearance.
2019-01-15 15:22:09 +00:00
Michael Catanzaro
3307944746 filechoosernativeportal: remove redundant casts
We are casting from GtkFileChooserNative to... GtkFileChooserNative.
Boo.
2019-01-14 20:53:19 -06:00
Michael Catanzaro
a136cbae8f filechoosernative: forward current_filter to delegate dialog
gtk_file_chooser_set_filter() doesn't work for GtkFileChooserNative. The
code forwards added and removed filters to the delegate dialog, but
doesn't do anything to set the selected one, so the wrong one gets
chosen. So fix that.

This only fixes the fallback dialog. The portal will be fixed in a
subsequent commit.

Partial fix for #1492
2019-01-14 20:07:01 -06:00
Matthias Clasen
da3100e99c Revert a non-working addition
Cell rendererers don't support <style> in ui files.
2019-01-13 22:06:51 -05:00
John Ralls
3c49c593f5 [GtkSearchEngineQuartz] Don't run off the end of the results array and crash. 2019-01-11 16:18:45 -08:00
Emmanuele Bassi
796e884c3f Use power symbols for GtkSwitch labels
Both the "on" and "off" IEC states have a corresponding Unicode glyph,
starting from Unicode 9.0.
2019-01-11 15:08:58 +00:00
Timm Bäder
ca583836d9 Merge branch 'wip/muktupavels/listbox' into 'gtk-3-24'
listbox: set selected_row before emitting signal

See merge request GNOME/gtk!479
2019-01-11 11:38:19 +00:00
Matthias Clasen
325b968567 Merge branch 'io-switch' into 'gtk-3-24'
switch: Always use I/O

See merge request GNOME/gtk!501
2019-01-10 22:23:03 +00:00
Matthias Clasen
45ee476e36 switch: Always use I/O
This allows for smaller switches, and goes better with
modern themes that have round switches.
2019-01-10 16:58:16 -05:00
Mohammed Sadiq
e7eec51772 gtkpopover: Fix popover when parent widget is partially visible
fixes https://gitlab.gnome.org/GNOME/gtk/issues/750
2019-01-09 17:08:40 +05:30
Matthias Clasen
d79de8657b Merge branch 'wip/jimmac/app-icon-helpers' into 'gtk-3-24'
Theme: add helper class names for Adwaita

See merge request GNOME/gtk!449
2019-01-08 01:26:58 +00:00
Matthias Clasen
c8f91c3f2d Document icon helper style classes 2019-01-07 20:20:23 -05:00
Michael Catanzaro
65311c8439 Revert "Revealer: Don’t (under)allocate child if not shown"
This reverts commit d179b0667d.

This broke the downloads popover in Epiphany. See #1057.
2019-01-07 18:20:01 -06:00
Daniel Boles
105dd5eda0 searchenginequartz: Fix naming of Beagle @ comment
As funny as that is, it's not very instructive. :P

https://gitlab.gnome.org/GNOME/gtk/merge_requests/490#note_400993
2019-01-07 20:35:40 +00:00
Matthias Clasen
9d1f751ead Merge branch 'issue1507-bis' into 'gtk-3-24'
a11y: Check display in `*grab_cell_focus()`

See merge request GNOME/gtk!457
2019-01-07 20:30:08 +00:00
Matthias Clasen
db4bd97732 Merge branch 'wip/carlosg/flowbox-late-claim' into 'gtk-3-24'
flowbox: Accept multipress gesture late

See merge request GNOME/gtk!480
2019-01-07 20:26:23 +00:00
Matthias Clasen
4fe28ba02a Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkSearchEngineQuartz Fixes

See merge request GNOME/gtk!490
2019-01-07 20:24:48 +00:00
Christian Hergert
ebcb0ea2a8 eventcontrollermotion: translate event to widget coordinates
When creating the motion controller, we know the widget that is of interest
based on gtk_event_controller_motion_new(). However, not all incoming
events are guaranteed to be of the GdkWindow associated to that widget.
They may also be for a descendant. Therefore, it is useful to translate
those coordinates into the target widget coordinate space as that is
likely what they care about.
2019-01-07 11:49:19 -08:00
John Ralls
ad9fd969de [GtkSearchEngineQuartz] Limit the returned hits.
When the result set is larger than the limit.
2019-01-06 16:19:49 -08:00
Daniel Boles
ae8be92437 [GtkSearchEngineQuartz] Resolve the path to a GtkFile* for the hit list.
Instead of a char* path, which the search_hit parser doesn't expect,
causing a crash.

Closes: $https://gitlab.gnome.org/GNOME/gtk/issues/815
2019-01-06 15:56:57 -08:00
Daniel Boles
d1b14a7deb HC: Fix fgcolor of backdrop:disabled spinbutton +-
We shouldn't give the icons here the same fg colour as the bg... which
makes them disappear and the buttons look like meaningless flat squares.

Fix by just using the same colour the same as foreground disabled. Note:
insensitive_fg_color is more prominent than !disabled, so clearly wrong.
2019-01-06 20:03:44 +00:00
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
Carlos Garnacho
c4949aef09 flowbox: Accept multipress gesture late
So it's able to operate properly with the DnD gesture set by
gtk_drag_source_set(). We usually just react on button release,
that's the right time to claim the gesture.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557
2019-01-02 21:09:53 +01: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
Alberts Muktupāvels
4ff4809ede listbox: set selected_row before emitting signal
Signal emittion was added in 6f857f87dc commit and it seems that
this is only place where selected_row is set after emitting signal.

Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
2019-01-02 01:14:17 +02: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
Olivier Fourdan
e91197a37f a11y: Check display in *grab_cell_focus()
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.

This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-17 14:17:54 +01: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
f518adde90 Theme: add helper class names for Adwaita
- helps legibility of app icons

Addresses https://gitlab.gnome.org/GNOME/gtk/issues/1434
2018-12-10 14:16:52 +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
António Fernandes
bb3653ad7d placesview: List only available protocols as available
We display a list of supported protocols in the server_addresses_popover.

However, this curated list contains protocols which may or may not be
available, depending on the respective gvfs backend being installed.

So, populate the list only with protocols which are available.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:43:39 +00:00
António Fernandes
4bdf968702 placesview: Set .error style if unsupported protocol
When the user types an address with a schema that is not supported,
the Connect button doesn't become sensitive, but there is no visible
feedback at all.

This feels unresponsive and leaves the user clueless.

While it doesn't help explain why the address doesn't work, this will
provide a hint that the input was acknowledged but doesn't work.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:41:55 +00: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
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
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
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
Jakub Steiner
06162a08b6 Adwaita: tone down purple cast
- sync with gtk4 changes
2018-11-14 17:52:37 +01:00
Jakub Steiner
b57a1a0b92 Revert "Adwaita: help fullcolor app icons"
- the app icon dropshadow patch was not meant to be part of the color changes

This reverts commit a8a545510d.
2018-11-14 17:32:41 +01:00
Ignacio Casal Quinteiro
a3744d4761 gtkclipboard-quartz: remove unused variable 2018-11-13 15:39:17 +01:00
Jakub Steiner
6f2b0cfcf3 Adwaita: use HIG grey for bg_color
- refresh with a light bg color, use the new color palette
2018-11-09 15:57:06 +01:00
Jakub Steiner
5a12934e90 Adwaita: fix osd bg color
- don't try deriving from bg_color, osd should be consistent
  for light & dark.

FIxes issue #1449
2018-11-09 11:30:21 +01:00
Adrien Plazas
f0e5b5bf88 Adwaita: Propagate bg color to titlebar separator descendants
Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231
2018-11-09 08:51:43 +01:00
Jakub Steiner
7034ab269f Merge branch 'wip/jimmac/hig-colors' into 'gtk-3-24'
Adwaita: use new HIG colors (gtk3)

See merge request GNOME/gtk!408
2018-11-09 07:23:46 +00:00
Daniel Boles
ec1786fdbc Popover: Minimally document the ::closed signal
This is better than nothing at all. The wording is taken from Carlos's
commit message when he added this shortly before 3.12, so add Since too.
Skip the bit from his commit message explaining what this replaced; we
don't need to say all the less good things our convenience API replaces.
2018-11-07 20:32:34 +00:00
Daniel Boles
08bafb4a52 TreeMenu: Don't manually reinvent g_list_index()
g_list_index() "Gets the position of the element containing the given
data (starting from 0)." That is exactly what we were manually doing.
2018-11-07 20:31:45 +00:00
Marco Trevisan
4048a1965a gtk-autocleanups: add cleanup function for GtkRecentInfo
(cherry picked from commit 9946dd2ab7)
2018-11-05 21:39:35 +00:00
Jakub Steiner
39645ab6f0 Adwaita: use new HIG colors
- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443
2018-11-05 16:10:50 +01:00
Jakub Steiner
a8a545510d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-05 15:03:11 +01:00
LRN
d45537a743 Merge branch 'win32-honest-clipboard' into 'gtk-3-24'
GDK W32: be more honest about clipboard format support

See merge request GNOME/gtk!382
2018-10-31 05:13:18 +00:00
John Ralls
60dafa38c7 Merge branch '1411-handle-null-from-nsgraphicscontex' into gtk-3-24. 2018-10-29 11:32:10 -07:00
Jakub Steiner
c1dbf96413 Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

    - removed teh last-child() selector for it doesn't work anymore.
      Better style all section of the headerbar than none. Proper fix pending.
2018-10-22 10:41:41 +02:00
John Ralls
7600c4e3f7 Modify Quartz gtk_drag_begin_internal to match 4172138. 2018-10-20 12:26:13 -07:00
Philip Chimento
df0e5cc8e6 quartz: Fix crash when realizing GtkOffscreenWindow
GtkOffscreenWindow doesn't have a NSView or NSWindow, so return NULL if
passed one of those.

Closes: #379
2018-10-19 05:38:28 +01:00
Matthias Clasen
00034c00be Merge branch '1371-flickering-tooltips-if-no-mouse-cursor-theme-loaded-gtk3' into 'gtk-3-24'
Tooltip: Fix the used cursor size if 0 in Settings

See merge request GNOME/gtk!374
2018-10-16 23:20:25 +00:00
Matthias Clasen
c0b5d66069 Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab' into 'gtk-3-24'
Notebook: Ensure menu label updates with tab_label

See merge request GNOME/gtk!385
2018-10-16 20:52:04 +00:00
Руслан Ижбулатов
4172138154 DnD: fix setting icon in drag-begin
Commit 1c96b703 changed the way icon
information is given to DnD. Previously an icon helper was kept at
the drag source site. Now an image definition is stored there.
The difference is that icon helper is an object that changes its
state in response to an icon being set, thus the object survived
multiple icon changes. Whereas image definition is destroyed and
re-created from scratch every time a drag icon is changed.
This created a problem where gtk_drag_begin_internal() would receive
the value of site->image_def when a drag just began, then it emits
"drag-begin" signal, in response to which an application can
set drag icon, changing the value of site->image_def. However,
gtk_drag_begin_internal() is unable to know about that change and
continues to use the old value it received from up the stack.

Not only does it prevent drag icon from being set from "drag-begin",
it also can induce a crash, since the old image_def value used
by gtk_drag_begin_internal() points to a freed memory region.

Fix this by only setting a default icon (which is created in-place)
in gtk_drag_begin_internal() if the caller does not care about icons.
Otherwise gtk_drag_begin_internal() will return a boolean that indicates
whether an icon needs to be set. Then the caller can invoke
gtk_drag_set_icon_definition() to set the icon, if needed.

Fixes #1407.
2018-10-16 19:04:54 +00:00
Руслан Ижбулатов
5e00fd25da Fix GtkDragSourceInfo disposal
gtk_drag_clear_source_info() immediately unrefs the info attached
to the context (the very same info we're in the process of destroying
in gtk_drag_source_info_free()). If that reference was the last one,
then accessing the info object after that is a use-after-free error.
Also, change the order a bit to first free the event, and only then
unref the context.

Fix this by copying all the fields of the info that we need, and
then working with these copies.
2018-10-16 03:07:13 +00:00
Timm Bäder
dbbc7b3859 emojichooser: Pass chooser to add_emoji
https://gitlab.gnome.org/GNOME/gtk/issues/1398
2018-10-13 14:01:08 +01:00
Daniel Boles
2856fb86a9 Adwaita: Regenerate CSS for new window.devel style
Commit 955aa8d54b forgot this, again.
2018-10-12 23:55:02 +01:00
Daniel Boles
80a3d7090a Notebook: Ensure menu_label updates with tab_label
This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397
2018-10-12 23:49:29 +01:00
Daniel Boles
82c5308947 Notebook: Don't notify 2x from set_tab_label_text
It calls set_tab_label(), which already does that.
2018-10-12 23:38:52 +01:00
Jakub Steiner
955aa8d54b Adwaita: backport nightly styling
- nightly apps get a headerbar styling
2018-10-10 09:38:50 +02:00
Hugo Lefeuvre
adbaee796d gtkstack: fix null pointer dereference
The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.

Add a != NULL check before dereferencing the pointer.

cherry-picked from https://gitlab.gnome.org/GNOME/gtk/merge_requests/361
2018-10-07 18:31:03 +01:00
Daniel Boles
9b7d886b72 Tooltip: Fix the used cursor size if 0 in Settings
Before the recent rework of positioning in GtkTooltip, the widget always
used the cursor_size of the GdkDisplay. That work redid this to instead
take GtkSettings::gtk-cursor-theme-size. But that property's doc says:

> Size to use for cursors, or 0 to use the default size.

and has 0 as its default. This is quite a likely scenario for anyone
whose desktop or settings.ini does not explicitly provide a cursor size,
which is the case for XFCE and win32, to name just two common platforms.

Then, it seems getting a cursor_size of 0 causes GtkTooltip to freak out
and hide/show itself at a very rapid speed, thus making it unusable.

So, we should check whether the Settings return 0 and, if so, still use
gdk_display_get_default_cursor_size (display) to ensure we get a size.

https://gitlab.gnome.org/GNOME/gtk/issues/1371
2018-10-07 18:26:30 +01:00
Руслан Ижбулатов
885672520a gtkselection: add a W32 tip about image/bmp support 2018-10-07 12:23:16 +00:00
Andrea Azzarone
2e24349fc6 entry: Handle no-window events in gtk_entry_event
gtk_entry_event's goal is to detect if a specific event concerns one of the two
entry icons. It can happen that this function is called during initialization
and/or before the entry is realized. In this case the entry icons (and the
event) will not yet have an associated window. The code should consider the
aforementioned situation and avoid matching a icon and an event with no
associated windows.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1366
2018-09-27 14:19:34 +02:00
Benjamin Otte
4ef082d2ed Merge branch 'wip/arnaudb/fix-dashed-border' into 'gtk-3-24'
Make dashed border-style work correctly

See merge request GNOME/gtk!349
2018-09-24 18:21:02 +00:00
Daniel Boles
ed57e564a9 SidebarRow: Set ::no-show-all on end_icon_widget
All the other conditionally visible child widgets have this. Without it,
it seems some cases can wrongly reveal it, with a nonsensical home icon.

https://gitlab.gnome.org/GNOME/gtk/issues/1345
2018-09-22 19:57:59 +01:00
Arnaud B
0feebcf145 Make dashed border-style work correctly
There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail occasionally to render a dashed line if the border-width is too big.
2018-09-21 12:25:23 +00:00
Matthias Clasen
8fd2d461fc gtk_application_inihit: allow no reason
We document this argument as nullable, so treat it as such.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
2018-09-13 23:32:45 -04:00
Matthias Clasen
b1d3beedc3 Add a missing include
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1325
2018-09-12 23:02:26 -04:00
Chun-wei Fan
5d903cb094 builds: Fix introspection with MSVC builds
For building the introspection dumper program on Visual Studio, leave out
the G_LOG_DOMAIN as g-ir-scanner does not like it when it constructs the
compiler command line for Visual Studio.

Also ensure that we are looking for the freshly-built libraries by looking
for the .lib's from the output directories of the Visual Studio project files.
2018-09-11 18:13:10 +08:00
Jakub Steiner
416feacfe3 Merge branch 'adwaita-fixes-3' into 'gtk-3-24'
Adwaita: Fix errors in two recent MRs

See merge request GNOME/gtk!330
2018-09-10 19:07:26 +00:00
Adrien Plazas
f893e668c8 Adwaita: Fix sidebar separator styling
Simplify the styling of sidebar separators by not setting their borders
and margins rather than trying to drop it afterward, which was actually
not working anyway.
2018-09-10 15:05:22 +02:00
Adrien Plazas
a0acdcd08c Adwaita: Fix dropping the backgroud on nested headerbars
Make the selector less greedy to not remove the background on
non-titlebar headerbars contained in non-headerbar titlebars and only to
the ones contained in headerbar titlebars. This avoid issues in some
applications.

Also make dropping the background more agressive to actually remove it.
2018-09-10 14:54:19 +02:00
Jakub Steiner
6ab9a85ac9 Merge branch 'wip/adwaita/linked-entry-error-state-fix-3-24' into 'gtk-3-24'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!316
2018-09-10 10:46:03 +00:00
Jakub Steiner
7e0aba77ff Merge branch 'selection-mode-ancestor-3' into 'gtk-3-24'
Adwaita: Set selection mode to headerbars if it's on ancestors

See merge request GNOME/gtk!325
2018-09-10 08:59:37 +00:00
Jakub Steiner
cbf76d4693 Merge branch 'separator-sidebar-3' into 'gtk-3-24'
Adwaita: Style separator.sidebar

See merge request GNOME/gtk!323
2018-09-10 08:59:04 +00:00
Adrien Plazas
43c458f45f Adwaita: Set selection mode to headerbars if it's on ancestors
This allows to set the container of the headerbars in selection mode
rather than having to set the mode to each element of the title bar.
2018-09-07 15:27:22 +02:00
Adrien Plazas
f0696dfae0 Adwaita: Drop the background of nested headerbars
This is needed to work around headerbar sliding animation issues without
refactoring Adwaita's support of titlebars and headerbars as it may
break applications.

https://gitlab.gnome.org/GNOME/gtk/issues/1264
2018-09-07 13:07:46 +02:00
Adrien Plazas
f9ba306116 Adwaita: Style separator.sidebar
Let separators be declared as sidebars to have the same style as those
drawn by GtkStackSidebar. This also let them handle the selection-mode
class, whether they are assigned it or they descend from something in
selection mode.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-07 12:42:26 +02:00
Matthias Clasen
47122288b8 Fix portal path handling
This was broken when I recently introduced this helper
function.
2018-09-05 19:58:03 -04:00
Jan Alexander Steffens (heftig)
3c7d5e749c
GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE 2018-09-05 21:46:28 +02:00
Alex Monday
e33b93a97e themes: Fix linked elements in error state
Add instructions for color of linked elements border which ajoints
entry, when parent linked entry is in error state.
2018-09-02 14:43:13 +05:00
Matthias Clasen
813c7b19ea GtkApplication: track screensaver state
A number of applications want to track the state of the screensaver.
Make this information available as a boolean property. We only listen
for state changes when ::register-session is set to TRUE.

This is implemented for unsandboxed D-Bus access by talking
directly to org.gnome.ScreenSaver or org.freedesktop.ScreenSaver,
and for sandboxed D-Bus by using a (new) portal API.
A Quartz implementation is missing.
2018-08-30 23:17:37 -04:00
Matthias Clasen
3fc319ff1b GtkApplication: Respect GTK_USE_PORTAL
When the environment variable is set, don't connect
to the session manager, but instead rely on the
inhibit portal.
2018-08-30 23:17:37 -04:00
Matthias Clasen
f734c3d3b0 file chooser portal: use request path utilities
Less code duplication, more sticky toffee!
2018-08-30 23:10:13 -04:00
Matthias Clasen
c3077467d0 print portal: use request path utilities
Less code duplication, more cookies!
2018-08-30 23:10:13 -04:00
Matthias Clasen
e2d066a2ec color picker portal: Add request path utility
Less code duplication, more cake!
2018-08-30 23:10:13 -04:00
Matthias Clasen
6829719d6d Add utility functions for portal paths
The paths that we create for requests and sessions
need some icky code to create. Keep it in one place.
2018-08-30 23:10:13 -04:00
Kai Willadsen
5111f7af99 FileChooserWidget: Don't show recent items with private hint set 2018-08-28 20:14:16 +00:00
Matthias Clasen
aa69b3af5a Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
Fix pre-C99 builds of the gtk-3-24 branch

See merge request GNOME/gtk!310
2018-08-28 20:10:04 +00:00
Matthias Clasen
2307f8ec67 Merge branch 'fix-warning-combobox-destroy' into 'gtk-3-24'
Fix warning on GtkComboBox destroy

See merge request GNOME/gtk!311
2018-08-28 19:27:24 +00:00
Luca Bacci
aa5d926c84 Check for NULL priv->popup_window in gtk_combo_box_popdown()
Fixes issue #125
2018-08-28 18:39:05 +02:00
Matthias Clasen
61921eba57 Fix a typo
Its Hieroglyphs!

Closes: #1292
2018-08-28 12:26:49 -04:00
Chun-wei Fan
6cf7297653 gtk/gtkeventcontrollerscroll.c: Include fallback-c89.c
... instead of just math.h, as it uses the C99 function trunc().  This
is so that the code builds on pre-C99 compilers.
2018-08-28 17:43:11 +08:00
Chun-wei Fan
723e50990f gtk/fallback-c89.c: Add C89 fallback for trunc()
Check for trunc() during configure and provide a fallback implementation
for it if it is not found.
2018-08-28 17:43:04 +08:00
Matthias Clasen
ac654740f3 Deprecate GtkRange::upper/lower-stepper-sensitivity
These properties have been removed in GTK+ 4.
Deprecate them here.
2018-08-26 18:58:59 -04:00
Benjamin Otte
da8994f941 Don't deprecate gtk_widget_show_all()
After discussions on IRC, the conclusion was reached that deprecations
only make sense if an action can be taken to not use the deprecated code
that makes the code more current and simplifies a later port to a newer
GTK version.

In this particular case, the suitable action would be adding
gtk_widget_show() calls whenever a widget is created, so that a call to
show_all() is not necessary.
However, in GTK4 these calls would not be necessary and end up just
bloating the codebase unnecessarily.

So it was decided the better solution would be to not deprecate the API
and instead leave this work to be done during potential GTK4 ports of
applications.

This reverts commit 4d71d2303d.

Fixes !1282
2018-08-22 19:48:20 +02:00
Rico Tzschichholz
2306c82df7 gesturestylus: Add missing array g-i annotation for *_get_axes params 2018-08-20 17:01:59 +02:00
Iain Lane
dce33fa830 colorpickershell: Unpack the tuple returned from PickColor()
When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which
GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with
messages like:

  GLib-CRITICAL **: 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o*}"))' failed

  Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.
2018-08-17 09:10:59 -04:00
Matthias Clasen
c9f875bd77 Merge branch 'fix-shifted-scrolling-gtk3' into 'gtk-3-24'
gtkscrolledwindow: Consider shift key presses when decelerating [gtk3]

See merge request GNOME/gtk!287
2018-08-15 22:02:45 +00:00