Commit Graph

51992 Commits

Author SHA1 Message Date
Matthias Clasen
f352a0ec2b gtk-demo: Fix the overlay demo
We must make the label and the entry separate overlays, or
the entry will also be clickthru.
2017-10-06 21:35:21 -04:00
Matthias Clasen
6d75d0966a gtk-demo: Fix up the drawingarea example
This was not working anymore.
2017-10-06 20:42:04 -04:00
Matthias Clasen
0caec25ee0 gtk-demo: Make the color chooser example non-resizable
No need for it.
2017-10-06 20:42:04 -04:00
Daniel Boles
4269ca0bfa HC: Avoid inflated titlebar separator in GEdit etc
It was selecting paned separator, which means any separator at any level
of descent within a paned, including the toplevel container in GEdit.

We need to be more specific and only select the relevant separator that
is the direct child of the paned. This is what Adwaita does.

https://bugzilla.gnome.org/show_bug.cgi?id=788573
2017-10-07 01:30:49 +01:00
Daniel Boles
497e877755 TreeViewCol: Fix SEGV on remove/add, + memory leak
Nulling priv->button in _unset_tree_view() is asymmetrical: we create
it via init(), not _set_tree_view(), so we shouldn’t null in the latter.

Worse, doing so manifests in criticals + a SEGV easily with basic use of
testtreecolumns, removing the TVC from a TV then trying to add it to one

Finally, the wrong null-out meant dispose() failed to unref the button,
so it leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=728452
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-07 00:46:37 +01:00
Daniel Boles
af28c031fc TreeViewCol: Don’t try to disconnect null treeview
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-07 00:46:37 +01:00
Daniel Boles
161b063909 Revert "treeviewcolumn: Don't leak button"
This reverts commit 2c28c627c1.

See following commits: the real problem is setting priv->button to NULL
soon after this, so this just makes that wrong decision look more right.

https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-07 00:45:40 +01:00
Daniel Boles
65b6e92c27 iconbrowser: Don’t repeat folder-download-symbolic
It was in both [general] with a description and [other] with none.
Leave it in [other] with the other folder- icons, + the description.

bonus: this makes all of [general] fit in our default window size!
2017-10-07 00:44:24 +01:00
Daniel Boles
c1a5afb3a8 FileChooserButton: Avoid unref()ing a null model 2017-10-07 00:44:24 +01:00
Matthias Clasen
ad9c70537d gtk-demo: Fix the assistant demo
The progress bar was no longer expanding as intended,
due to the demise of GtkBox::expand.
2017-10-06 19:38:16 -04:00
Matthias Clasen
b5fe4c0a1d settings: Don't assert in notify
We can legitimately hit the default case in this switch,
so don't assert that we don't.
2017-10-06 19:30:27 -04:00
Matthias Clasen
b9b03cf570 gskrenderer: Make the window property not construct
We never set this, since it is assigned as a side-effect
of realizing the renderer. Make this a plain readonly property.
2017-10-06 19:29:42 -04:00
Matthias Clasen
10ec3e91f5 vulkan: Add some missing cases to switch 2017-10-06 18:29:00 -04:00
Benjamin Otte
43c212ac28 build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options:

1. Add all missing enums to the switch statement
  or
2. Cast the switch argument to a uint to avoid having to do that (mostly
   for GdkEventType).

I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.

The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Benjamin Otte
2ac66328a3 build: Turn on more warning flags
-Wshadow these days does not overwarn anymore like it did in gcc 4.
There are no warnings inside gtk, so better enable it to keep it that
way.

-Wuninitialized also has no positives, so I'm gonna turn it on just
because.
2017-10-06 21:23:39 +02:00
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