Commit Graph

51977 Commits

Author SHA1 Message Date
Matthias Clasen
e7b79e2097 gtk-demo: Keep treeviews expanding
This is fallout from GtkBox::expand child property going away.
2017-10-06 14:21:19 -04:00
Carlos Garnacho
a0de570e47 gtktreeview: Transform cell area to widget coordinates
GtkCellArea uses event coordinates (thus in treeview relative
coordinates), but calculations used to happen in bin window coords.
We can just offset the cell area by the bin window, fixes cell
renderer activation and edition.
2017-10-06 18:26:08 +02:00
Carlos Garnacho
f7d02bfb61 treeviewcolumn: Don't swallow motion/crossing events
If the column is not clickable, it may make some sense to stop
event propagation here for button events. However motion events
should be left alone.

Fixes treeview column resize pointer cursors, since that's
implemented up the bubbling phase in the treeview.
2017-10-06 18:25:44 +02:00
Carlos Garnacho
0724fa7f61 treeview: Transform motion event coords to "bin window" coords
The operations rely there on bin window relative coordinates, but we
are receiving GtkTreeView relative coordinates there. Fixes clicking
on treeview expanders, which was offset by visible headers.
2017-10-06 18:23:26 +02:00
Timm Bäder
d832e5b2dd modelbutton: set_relative_to(NULL) the popover in dispose
We do set_relative_to(menu_button) when creating it so we should do this
here (or nothing).
2017-10-06 17:35:28 +02:00
Timm Bäder
2c28c627c1 treeviewcolumn: Don't leak button
We g_object_ref_sink the button in _create_button, so we need to unref
it ourselves.
2017-10-06 17:23:34 +02:00
Timm Bäder
d292ebc7bd filechooserbutton: Don't leak priv->model 2017-10-06 17:14:31 +02:00
Timm Bäder
b34c84ab6d applicationwindw: Don't leak show-help-overlay action 2017-10-06 16:30:31 +02:00
Timm Bäder
9115291515 widget-factory: Don't leak GPropertyAction instances 2017-10-06 16:30:20 +02:00
Benjamin Otte
c1e9869329 build: Don't turn off critical warnings
-Wint-conversion is important because it checks casts from ints to
pointers.

-Wdiscarded-qualifiers is important to catch cases where we don't
strings when we should.
2017-10-06 16:03:08 +02:00
Benjamin Otte
defcf17d3d gtk-demo: Remove old build file
The includes are now generated with a Python script, so remvoe the old
perl script.
2017-10-06 16:03:07 +02:00
Benjamin Otte
2936953d9f build: Remove old Makefile.inc files
They seem to have been forgotten in the meson transition
2017-10-06 16:03:07 +02:00
Piotr Drąg
0fa46b4123 Update Polish translation 2017-10-06 15:55:55 +02:00
Matthias Clasen
ec1addf618 Some updates 2017-10-06 09:15:23 -04:00
Timm Bäder
869d9e8fe7 Widget: make sure windowed widgets have a 1×1 min size 2017-10-06 14:38:07 +02:00
Timm Bäder
3b9aa2f8d9 widget: Allow 0×0 allocations
Don't MAX the allocations with 1 anymore.
2017-10-06 14:38:07 +02:00
Timm Bäder
aef86a8b2c searchbar: Remove superfluous padding
So it's not 6px high when the child revealer is concealed.
2017-10-06 14:38:07 +02:00
Timm Bäder
9125dc7069 box: Drop priv pointer 2017-10-06 14:24:52 +02:00
Timm Bäder
02a526c04a image: Remove mention on gdk-pixbuf-csource
gdk-pixbuf-csource as well as gdk_pixbuf_new_from_inline are deprecated.
Mention GResource instead.
2017-10-06 10:40:23 +02:00
Daniel Boles
fbf24d1bd0 HC: Add border/hilight when hovering flat buttons
The border and icon highlight are useful feedback that was defeated by
CSS precedence. It worked for .titlebuttons due to their implementation,
but the same was not true for custom .flat buttons. This makes it so.

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:40:42 +01:00
Daniel Boles
70fa5be983 HC: Flat titlebuttons became non-flat in backdrop
When the window was backdropped, they suddenly regained their border.
This was clearly not intentional or of any practical use to anyone.

Shuffle around some selectors so that the backdrop ones do not override
the flat ones and make the borders magically reappear when backdropped.

Note that, whereas standard titlebuttons get the border on :hover, other
.flat buttons in the headerbar do not. That should probably be fixed too

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:40:15 +01:00
Daniel Boles
018bee64aa HighContrastInverse: Make window borders visible
They were hard-coded to a transparent black, but that is our bg colour
in HC Inverse, so windows stacked on top of each other or a dark
background blended together into a mush.

Fix this by making the $_wm_border* colours relative to the fg colour,
so that HighContrastInverse gets borders that are transparentised white.

https://bugzilla.gnome.org/show_bug.cgi?id=788575
2017-10-06 00:38:53 +01:00
Daniel Boles
efaf9948be HC: Fix MessageDialog’s rounded bottom borders
A missing decoration selector meant that we got a solid black background
behind the rounded corners of the dialog.

Copy the equivalent code from Adwaita, including nicely rounding the
focus outline too (& sorry, but this needs more newlines to be readable)
2017-10-06 00:25:10 +01:00
Daniel Boles
84de918ce0 HighContrast: Fix titlebar containing >1 headerbar
by migrating the relevant code from Adwaita, to dodge unwanted doubling
up of the bottom border and such.

https://bugzilla.gnome.org/show_bug.cgi?id=769877
2017-10-05 23:03:01 +01:00
Marco Trevisan (Treviño)
d2a577d797 HighContrast: set min-height for headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-05 22:36:52 +01:00
Daniel Boles
0fb4a018f5 HC: Copy working tooltip code from Adwaita & tweak
There were various problems, like only selecting on .tooltip and not the
widget node tooltip, not being specific enough for tooltip.csd, etc. So,
specific theming was absent, and default popup window styles got applied

This commit copies in the better working tooltip CSS from Adwaita, but
applies a couple of changes to make it work better in the HC themes:
 • Reduce the transparency of the tooltip, so we achieve higher contrast
 • Drop the black text-shadow, as it is not useful on this more black bg

Note: we may then need to re-add some of this to the .tooltip class. But
it is unclear what needs done there. While Adwaita is not doing it, we
are better not to confuse by keeping it in HC only; we should try to be
as close as possible, to make it easier for HC to keep up with Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 19:40:36 +01:00
Daniel Boles
6b2c8bfcf1 HC: Give tooltips a border for contrast on Inverse
https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 18:44:04 +01:00
Daniel Boles
3ad7a86961 HighContrast: Actually style tooltips...
We need to select on the widget itself too, not just other things with
the .tooltip class.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 18:44:04 +01:00
Xavi Ivars
fd7d0067c3
[l10n] Updated Catalan (Valencian) translation 2017-10-05 18:05:24 +02:00
Timm Bäder
7770bdcb36 switch: Fix int/double comparison
We get a double coordinate.
2017-10-05 10:21:54 +02:00
Timm Bäder
786d89cd9d scrolledwindow: Make sure gtk_get_current_event_state returned a state
Technically correct and pleases Coverity.
2017-10-05 10:21:54 +02:00
Timm Bäder
3515a27f8e appchooserdialog: Remove unused macro 2017-10-05 10:21:54 +02:00
Timm Bäder
f9744cf194 combobox: Remove unneeded queue_resize call
The remove/add/set_parent/unparent calls in there already do the
necessary work.
2017-10-05 10:21:47 +02:00
Daniel Boles
a4fda99539 HighContrast: Correctly select window decoration
We need

    .window-classes decoration

but within the decoration parent selector, we were doing
&.window-classes, which gave us

    decoration.window classes

We need to fix this by selecting on .window-classes &

https://bugzilla.gnome.org/show_bug.cgi?id=788496
2017-10-05 01:40:24 +01:00
Matthias Clasen
090b833d8b wayland: fix a typo
This was noticed in the gtk3 backport of these changes.
2017-10-04 20:04:12 -04:00
Daniel Boles
88b15beb0a updateiconcache: Avoid confusing loop construct
n_attach_points is the result of g_strv_length(): the index at which the
string vector ends in NULL. So by definition, when i == n_attach_points,
string[i] == NULL, and there is no need to check for the latter. The
fact that we did appears to confuse static analysers, as the dereference
and index check were inverted from what would normally be safe. We could
reverse them, but we may as well just remove the unnecessary NULL check.

https://bugzilla.gnome.org/show_bug.cgi?id=788458
2017-10-04 22:59:11 +01:00
Colomban Wendling
e4754a007b Enter submenus when activating their parent item
This gives consistent behavior with e.g. Qt, Mozilla's suites and
LibreOffice (with non-truly native backends like "gen" and "gtk",
but unlike "gtk2" and "gtk3" ones that probably use true GTK menus).

This behavior is expected by at least some accessibility users, and
it seems good to behave like other common applications and toolkits
in this area.  There should be no issue in doing so either for current
users, as it only enters the submenu instead of not doing anything.

https://bugzilla.gnome.org/show_bug.cgi?id=778811
2017-10-04 22:52:18 +01:00
Georges Basile Stavracas Neto
04456404be -wayland: Safeguard against NULL gtk_surface1
There is no guarantee that the gtk_surface won't be NULL,
and Wayland API does not safeguard against NULL, so we have
to do that ourselves here.

We were also mistakenly cheking for the surface version off
by one, fix that too by checking if the surface version is
equal or greater.
2017-10-04 18:30:34 -03:00
Daniel Boles
f63519dc01 TreeMenu: Remove accidentally duplicated doc lines
Not that it actually matters, as this is not public anymore, but this
was done accidentally. Also, sync a property description to ComboBox.
2017-10-04 12:05:13 +01:00
Daniel Boles
06941c593d testcombo: Test grid :row- and :column-span-column
Ditch two items that were white and so weren’t visible on our standard
theme anyway, and use the new space to test extra grid-mode properties.

Note that if we do this then, as before, we set the ListStore on the
ComboBox before appending to it, that produced runtime warnings like:

Gtk-CRITICAL **: gtk_menu_attach: assertion 'left_attach < right_attach' failed

I didn’t look into that yet, but it may indicate that attaching items
vs. recognising their spans don’t occur in the correct order. For the
purposes of testing this, I just create the CB after filling its model.
2017-10-04 11:17:57 +01:00
Daniel Boles
9c3ea3f9a0 ComboBox|TreeMenu: Slightly clarify wrap-width doc 2017-10-04 10:22:21 +01:00
Daniel Boles
5849b98568 ComboBox|TreeMenu: Clarify :row|column-span-column
ComboBox and TreeMenu warned in the doc for :row-span-column that the
value must not exceed :wrap-width, but :wrap-width does not interact
with the number of rows; it’s the :column-span-column that’s relevant.

Also: Warn that spans must be > 0 for rows too, and that column spans <=
:wrap-width are also not useful for items at menu column positions > 0.

Finally, refer to items having spans, not values, as we were already
talking about values in the model (and rows in the menu).
2017-10-04 10:22:20 +01:00
Felipe Borges
5a32b78ba1 build: Bump minimum GLib version to 2.53.7
Otherwise it fails to build with:

GLib-Genmarshal-WARNING **: failed to open "--pragma-once":
No such file or directory

https://bugzilla.gnome.org/show_bug.cgi?id=788230
2017-10-03 21:29:57 -04:00
Matthias Clasen
ffaaba6676 inspector: Add gsk and vulkan information
Show the used gsk renderer, as well as some information
about Vulkan, in the General tab.
2017-10-03 21:06:50 -04:00
Daniel Boles
f4ffd261db widget-factory: Demo different Frame border-styles
This shows not all, but the interesting/less predictable styles, and
the ones that correspond to the :shadow-types that were here before.
2017-10-02 20:22:41 +01:00
Daniel Boles
06bf049b1a Revert "widget-factory: Usefully demo Frame shadow types"
This reverts commit 6ee2bf6286.

There is a way to get different kinds of borders: it's CSS. It's better
to keep the 4 Frames and demo the different styles we can do using CSS.
2017-10-02 19:50:02 +01:00
Daniel Boles
252b03c43e Frame: Enhance CSS docs
Indicate how the old shadow types are replaced by CSS border-style et
al., and quote the names of nodes and classes for easier readability.
2017-10-02 19:50:02 +01:00
Carlos Garnacho
3bdc9d7b3a imcontext: Fix typo on ctrl+shift+u hex sequences handling
This condition was meant to exit when the event has no keyval (eg. fed a
non-keyboard event somehow).
2017-10-02 18:13:57 +02:00
Timm Bäder
604da889ea snapshot: Fix mixup when creating crossfade nodes
We need to set the progress on the end node.
2017-10-02 15:25:44 +02:00
Timm Bäder
f5297e6f4b snapshot: Use one GPtrArray for all nodes
Instead of creating one GPtrArray per GtkSnapshotState and saving nodes
in there, create one GPtrArray per snapshot and assign a
start_node_index to every GtkSnapshotState as well as a n_nodes variable
so every state knows which nodes belong to it.
2017-10-02 14:34:47 +02:00