Commit Graph

29668 Commits

Author SHA1 Message Date
Timm Bäder
392af59140 box: Remove return value from box_pack
Unused.
2017-09-29 10:50:33 +02:00
Timm Bäder
ad1f5fe61a box: Remove size_allocate_no_center
GtkBox never has a center widget these days.
2017-09-29 10:49:41 +02:00
Timm Bäder
f38555712b adwaita: Remove outlines from focused entries for now 2017-09-29 09:23:56 +02:00
Matthias Clasen
5d698c1452 Recorder: Add details for inset and outset shadow nodes 2017-09-28 21:41:24 -04:00
Matthias Clasen
352b566179 Recorder: Show details about linear gradient nodes 2017-09-28 21:06:35 -04:00
Matthias Clasen
89261d18c2 Recorder: Show details of blur nodes 2017-09-28 19:48:42 -04:00
Matthias Clasen
5e4f7301d6 recorder: Show details for blend nodes 2017-09-28 19:40:03 -04:00
Matthias Clasen
0d8b2535d8 Recorder: Show details of crossfade nodes 2017-09-28 19:20:25 -04:00
Matthias Clasen
2d5a121c3c recorder: Show details for opacity nodes 2017-09-28 19:14:32 -04:00
Matthias Clasen
9e9df66b81 Recorder: Show details of border nodes 2017-09-28 18:58:18 -04:00
Matthias Clasen
ae549c6ce4 recorder: Put text color in the right row
It ended up in the wrong place by accident.
2017-09-28 18:41:39 -04:00
Matthias Clasen
cddf415cbb Recorder: Show colors visually for text too
Just because we can do it.
2017-09-28 18:37:47 -04:00
Matthias Clasen
2da234d70d Reshuffle the recorder ui a bit
Make it possible to see the properties and the rendering at
the same time, it makes navigating easier.
2017-09-28 18:37:00 -04:00
Matthias Clasen
e58ee9ad52 recorder: Show surfaces and textures
This makes the properties list much more interesting.
2017-09-28 18:17:38 -04:00
Matthias Clasen
65bfdf4b15 recorder: Show text node properties 2017-09-28 17:16:41 -04:00
Matthias Clasen
149dd1f558 recorder: show color information for color nodes
A first step towards showing more information for render nodes.
2017-09-28 15:54:30 -04:00
Timm Bäder
29a4f0ce1f Plug some memory leaks
Make sure the scroll controllers in GtkComboBox and GtkScrolledWindow
get destroyed.
2017-09-28 20:01:01 +02:00
Piotr Drąg
91bb86ca20 inspector: Mark missing strings for translation 2017-09-28 14:01:57 +02:00
Sam Thursfield
c9df0c34bf flowbox: Fix annotation for GListModel binding callback
The GtkFlowBoxCreateWidgetFunc type lacked GObject Introspection
annotations for its arguments. This made gtk_flow_box_bind_model()
unusable from Python as the callback function would be passed useless
values.

The annotations that I've added match those of the similar callback
type GtkListBoxCreateWidgetFunc.

https://bugzilla.gnome.org/show_bug.cgi?id=780758
2017-09-27 13:33:20 +02:00
Debarshi Ray
60cee7339f GtkBuilder: Enforce "class" as a mandatory attribute for <object>
https://bugzilla.gnome.org/show_bug.cgi?id=786931
2017-09-25 15:26:34 +02:00
Daniel Boles
00f8a11aec Label: Replace allow-none with nullable/optional 2017-09-24 19:32:19 +01:00
Timm Bäder
da701ede91 emojichooser: Plug a memory leak 2017-09-24 18:15:41 +02:00
Matthias Clasen
88664f7ccb Fix a typo 2017-09-21 22:53:49 -04:00
Daniel Boles
c0fdf522dd ToolItem: Fix nullable annotation put on wrong arg
D’oh
2017-09-20 23:55:15 +01:00
Daniel Boles
761194dad7 Overlay: Document style classes added per position 2017-09-20 19:19:25 +01:00
Carlos Garnacho
e0a3c9d2de gtkmain: Ensure to emit real GDK_LEAVE_NOTIFY events.
If we got a GDK_LEAVE_NOTIFY event from GDK, we would reset the
GtkPointerFocus, but the event would be silently consumed.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
44cb3ccfa1 gdk: Remove motion hints
Motion hints are now literally a thing of the past. Everything should be
using the full motion event stream.
2017-09-19 18:40:51 +02:00
Carlos Garnacho
a9988e18b0 gtk: Remove 2BUTTON and 3BUTTON events and event types
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
1f91ca0cec gtklistbox: Remove enter/leave/motion event handlers
Those worked similarly to those in GtkFlowBox, but would additionally
handle "active" state for child rows. Simplify this to just enabling/
disabling active state on gesture press/release, we don't get the
nice state updates when hovering around with a mouse button pressed,
but the rationale from flowbox applies here, and makes a nice cleanup.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
7d196db4c0 gtkcolorswatch: Remove enter/leave event handlers
Those just maintained prelight state, which is already managed internally.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
9d5c04012e gtkbutton: Remove enter/leave event handlers
They just maintain priv->in_button and widget state up-to-date, this
basically matters during user interaction, and is already maintained
in the gesture ::update handler. This seems to be sufficient.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
c4d57f85f4 gtkflowbox: Drop crossing/motion event handlers
Those basically controlled priv->active_child_active, which would
1) trigger a redraw when the pointer enters/leaves it, and 2) ensure
that press/release happen on the same child for it to be activated.

The former is not necessary, and the latter can be simplified by
just checking again the child on the coordinates given by the
::release gesture handler. This makes all enter/leave/motion_notify
event handlers unneeded.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
27a391bad8 gtkspinbutton: Remove motion notify handler
It does nothing nowadays.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
b31029457b gtkcalendar: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
cf6ecc9095 gtkscrolledwindow: Use scroll event controller
All kinetic scrolling initial velocity calculations are now
taken from the scroll controller. The handling of timeouts
to snap back when overshooting has been also made to just
apply on devices that can't emit ::scroll-begin/end.
2017-09-19 18:40:50 +02:00
Carlos Garnacho
ad05caedd3 gtkspinbutton: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
9a204921ae gtkscalebutton: Use scroll event controller 2017-09-19 18:40:50 +02:00
Carlos Garnacho
861916fd0b gtkrange: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
f3474645c4 gtkpathbar: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
d0e27ba760 gtkmenu: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
215c4ed419 gtkcombobox: Use scroll event controller 2017-09-19 18:40:49 +02:00
Carlos Garnacho
c3fbd58916 gtk: Add GtkEventControllerScroll
This is a GtkEventController implementation to handle mouse
scrolling. It handles both smooth and discrete events and
offers a way for callers to tell their preference too, so
smooth events shall be accumulated and coalesced on request.

On capable devices, it can also emit ::scroll-begin and
::scroll-end enclosing all ::scroll events for a scroll
operation.

It also has builtin kinetic scrolling capabilities, reporting
the initial velocity for both axes after ::scroll-end if
requested.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
f2ded6a685 gtk: Change gtk_propagate_event() to propagate both ways.
This change is made for consistency, it doesn't make sense to expose
one-way propagation, as it can only break expectations from GTK+. This
function might be made entirely private in the future, but it still
makes sense to do this in one go for our internal usecases.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
c02d0f3c0a eventcontroller: Drop event_mask API
This is unchecked, we can remove it entirely as well.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
5b9287ed77 gtkwidget: Drop pointer emulation out of touch events
Users of touch events are required to either use a GtkGesture, or handle
touch events themselves.
2017-09-19 18:39:03 +02:00
Carlos Garnacho
8c350459ae gtk: Run GtkWidgetClass event signals inside a GtkEventController
This will allow further cleanups and optimizations in capture/target/bubble
event delivery. For simplicity, ATM every widget will receive its own
GtkEventControllerLegacy, it could be desirable to add finer control over
this in the future, so widgets that fully use event controllers for input
management can do away without this legacy piece.
2017-09-19 18:39:03 +02:00
Matthias Clasen
880d44aa48 widget: Give up on GdkEvent api for now 2017-09-19 18:39:03 +02:00
Matthias Clasen
0ab20b6253 treeview: Give up on GdkEvent api for now
There's multiple places where events are manually generated
here, this needs more thought.
2017-09-19 18:39:03 +02:00
Matthias Clasen
d0c92fba69 entry accessible: Give up on GdkEvent api for now
Just include gdkeventsprivate.h here for now. This may be
resolved by just dropping icon support from GtkEntry down
the road.
2017-09-19 18:39:03 +02:00
Matthias Clasen
0554f6372b a11y: Stop listening for configure events
This needs to be done differently.
2017-09-19 18:39:03 +02:00
Matthias Clasen
208a85c3fe treev view column: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
56189fdb74 clipboard: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
efd287feb3 a11y: Use GdkEvent API in some places
More work needed.
2017-09-19 18:39:03 +02:00
Matthias Clasen
853602bf63 tooltip: Use GdkEvent API
And at the same time, reshuffle things slightly to avoid
creating synthetic events.
2017-09-19 18:39:03 +02:00
Matthias Clasen
96daf93821 text view: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
9c477951cb text handle: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
aeaa42121f selection: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
f43849901d search bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
c7225bc8c1 scrolled window: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
7793e8f071 places view: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
5d5ae459c4 place sidebar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
3b266de66c path bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
75b16ac855 pad controller: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
ebc66eefa8 menu shell: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
d7ccf36d71 menu item: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
b99c3d33ec im context simple: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
67489349a5 header bar: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
50701abcc3 gesture zoom: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
5430751644 gesture swipe: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
1a8f0686ca gesture single: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
17832f9617 gesture rotate: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
b5b84e6abe gesture drag: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
7d6a2a832c gesture: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
9794dc5628 window accessible: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
16781c8598 widget accessible: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
c68c754f3e settings: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
7cbd35dd86 gesture rotate: Partially convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
d20efc15a9 gesture: Partially convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
6b4dfcadaf flowbox: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
c586a6486f file chooser widget: Covert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
2246387d21 expander: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
7ed6add550 entry: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
067e209582 dnd: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
c12a54a3ed cell renderer accel: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
01b993d1fb bindings: Convert to use GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
63eecd3dfa bindings: Partially update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e5a3e95b8c a11y: Partially update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
261fdad7ca inspector: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
177f3ef655 gtkwindow: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
14a28224e4 treeview: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
b4f88e1544 tooltip: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
9f32f5f994 textview: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
35301530bb texthandle: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e2eb20208b spinbutton: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
0a55573ca3 scrolledwindow: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
627a73cf57 scalebutton: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e41844f751 recentchoooser: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
c0b77a2941 range: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
5785db64ce popover: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
8803886319 placesview: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
2abfc602ca placessidebar: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e6349c940e paned: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
b9db1a5410 notebook: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
46336aaebe mountoperation: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e023367a8a menu: Update to using GdkEvent API
To some extent, plenty of root coordinate calculations left...
2017-09-19 18:39:02 +02:00
Carlos Garnacho
1b6ff9df76 listbox: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
dee14dda8d imcontext: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
3d7ad2af4f iconview: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
7545b908de gesture: Update to using GdkEvent API
To some extent, pad and touchpad gesture events need extra API.
2017-09-19 18:39:02 +02:00
Carlos Garnacho
67239f112e fontchooser: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e67090df91 flowbox: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
c48a196d77 filechooser: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
75d8175715 entrycompletion: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e46a1d32f0 entry: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
92be6488c4 combobox: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
df4b0340a6 colorswatch: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
510554f679 colorplane: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
a46173980e coloreditor: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
75492e3cef cellrendererspin: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
769ce02aef cellarea: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
ff187eeb17 calendar: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
fac9ba0fff button: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
96e7777198 appchooserwidget: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
9b7b1b65b6 aboutdialog: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
49aada63ee css: Drop the new indent api again
It is not used anymore, and it was not a good idea.
2017-09-18 23:22:38 -04:00
Matthias Clasen
6859f0a6d1 css: Use enums instead of idents for font-variant properties
As Benjamin says, ident should only be used if any value
is valid, which is not the case here. So use enums instead,
which should also be more efficient. To handle the more
complicated cases like font-variant-ligatures, we have to
introduce flags-like values.
2017-09-18 23:22:38 -04:00
Daniel Boles
50106521d6 Window: Clarify documentation of set_application()
Clarify that ::destroy, not ::hide*, removes a window from its app, by
replacing the mention of open windows with the blurb on destruction from
:application, completing commit 7db4bee4b6

Also link to the equivalent gtk_application_(add|remove)_window() calls,
since Application.add_window() already links back to Window:application.

* unless you use gtkmm…

https://bugzilla.gnome.org/show_bug.cgi?id=639931
2017-09-19 00:20:17 +01:00
Daniel Boles
7178ab8e41 PlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS
The member GList *cloud_rows is only ever used if HAVE_CLOUDPROVIDERS is
defined, so don’t declare it if not.
2017-09-19 00:20:17 +01:00
Daniel Boles
94eecf57dc PlacesSidebar: Unref cloud_manager in dispose()
We ref the CloudProviders singleton in init() but did not unref it in
dispose(). Do so, using g_clear_object().

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 23:30:57 +01:00
Daniel Boles
383fa87993 SidebarRow: Unref CloudProvider on change/finalize
It was never unref()d, either when replacing the existing GObject in
set_property(), cleaning up in finalize(), or becoming a placeholder.

Fix by using g_set_object() and g_clear_object() to unref as needed.

This also drops the check that the newly set object is a valid cloud
provider account, as we don’t do the equivalent for any of the other
object-typed properties, and Carlos didn’t think this was important.

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 23:30:57 +01:00
Matthias Clasen
f87dc24867 Fix a typo
The property is called font-variant-alternates, not -alternatives.
Correct this everywhere.
2017-09-18 18:10:08 -04:00
Matthias Clasen
92398bb1bb css: implement font-variant as a shorthand
Drop the current css2-style font-variant property and
replace it with a shorthand as specified in the css3 fonts
module. Currently, we fully support the font-variant-ligatures,
font-variant-position, font-variant-caps, font-variant-numeric
and font-variant-east-asian subproperties. font-variant-alternatives
is only partially supported.
2017-09-18 14:27:06 -04:00
Matthias Clasen
b91f3ce331 css: Implement font-variant-east-asian
This is translated to the corresponding OpenType features.
2017-09-18 14:26:57 -04:00
Matthias Clasen
8a7f2ca0be css: Implement font-variant-alternatives
This is only a partial implementation, since we don't support
@font-feature-values. The only supported value is historical-forms,
for now.
2017-09-18 14:26:57 -04:00
Matthias Clasen
b99cb70299 css: Implement font-variant-numeric
This gets translated to the corresponding OpenType features.
2017-09-18 14:26:57 -04:00
Matthias Clasen
8525afc408 css: Implement font-variant-caps
This gets translated to the corresponding OpenType features.
2017-09-18 14:26:57 -04:00
Matthias Clasen
01ed84fbef css: Implement font-variant-position
This gets translated to the corresponding OpenType features.
2017-09-18 14:26:57 -04:00
Matthias Clasen
c4cbe5feca css: Implement font-variant-ligatures
This gets translated into corresponding OpenType features.
2017-09-18 14:26:57 -04:00
Matthias Clasen
cee4622567 css: Implement font-kerning
This gets translated to the OpenType feature kern.
2017-09-18 14:26:57 -04:00
Matthias Clasen
6420dd934f Add an auxiliary ident parsing function
This lets us conveniently create ident values from
multiple candidates.
2017-09-18 14:26:57 -04:00
Georges Basile Stavracas Neto
0bdaebef1e window: Improve detection of edge constraint support
Instead of relying on special values of edge constraints, this
patch adds an internal-only gdk_window_supports_edge_constraints()
function that by default returns FALSE, and is implemented by
GdkWindowWayland and GdkWindowX11.

This way, we can properly detect server-side support for this
feature and adapt accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Georges Basile Stavracas Neto
b1c4e9afef window: Add individual CSS classes based on edge constraints
The last touch on this patch series is making GtkWindow able to
selectively adjust various UI details based on the different
tiled edges. The main driver here is that we don't want to show
shadows on edges that are constrained.

This patch adds the necessary code to do that, while still
maintaining compatibility with the old ways.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Georges Basile Stavracas Neto
45f4844880 window: handle tiled edges separately
GTK windows don't have their tiling states really
hooked into the client-side decoration code, and
the only effect it has is disabling the resizing
edges.

With the introduction of per-edge tiling information,
we are backed by much more precise data on how the
window manager wants the app to behave.

This patch, then, fixes GtkWindow to take into account
per-edge tiling information. For compatibility purposes,
the previous tiled field was kept, and thing will just
continue working if no edge information is supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Matthias Clasen
d0cae3ecba Fix the -gtk-outline-radius shorthand
It needs to refer to the -gtk-prefixed subproperties now.
2017-09-17 21:17:30 -04:00
Matthias Clasen
d3198536a4 Drop support for deprecated pseudo-classes
We no longer have any of those.
2017-09-17 17:04:16 -04:00
Matthias Clasen
a08e2b5692 Drop code parsing deprecated forms of url
We no longer allow whitespace between url and (.
2017-09-17 17:01:29 -04:00
Matthias Clasen
d1b77fd60f Drop code handling deprecated style properties
We no longer have any deprecated style properties.
2017-09-17 16:59:26 -04:00
Matthias Clasen
82b86c2c1c Drop the aliasing api for style properties
This was added to deprecate style properties. All deprecated
style properties are gone now, so this is no longer needed.
2017-09-17 16:57:53 -04:00
Matthias Clasen
793513993b Drop the gtk-key-bindings property
This has been deprecated for a while. Just use the -gtk-prefixed
name.
2017-09-17 16:57:53 -04:00
Matthias Clasen
226aee0828 Drop the icon-shadow property name
This has been deprecated for a while. Just use the -gtk-prefixed
name.
2017-09-17 16:57:53 -04:00
Matthias Clasen
de3179e7c0 Drop aliases for outline radius
The outline-{top,bottom}-{left,right}-radius names have been
deprecated for a while, so lets remove them. Everybody should
just use the -gtk-prefixed names for these properties.
2017-09-17 16:57:53 -04:00
Matthias Clasen
d3727817ff Drop support for one-stop gradients
These have been deprecated for a while. Time to make this an
error for GTK+ 4.
2017-09-17 16:53:02 -04:00
Matthias Clasen
737cae8e10 Drop support for pango syntax in css
This has been deprecated for a while, so it should go away
for GTK+ 4.
2017-09-17 16:52:55 -04:00
Daniel Boles
f714500b8d Adwaita: Fix color of focus outline on colorswatch
The focus outline disappeared as the colour of the swatch got close to
the normal focus outline colour, which is alpha(currentColor, 0.3).

Fix by making the outline an alpha’d version of the tick colour, but
more opaque than normal outlines. 0.6 seems good enough; feel free to
improve it, but at least this ensures the outline can’t vanish anymore.

HighContrast achieves this already because it applies the color property
to the main node, not the overlay. Doing that means the outline is fully
opaque, which is fine for HC obviously but was excessive for Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=787757
2017-09-16 17:02:48 +01:00
Daniel Boles
7c809cfb73 Adwaita: dark: Make colorswatch.light tick visible
It used $text_color unconditionally, but in :dark, text is white, so we
overlaid a white tick on any light colours, all the way to white itself.

Using these named colours doesn’t make practical or semantic sense.
Instead, use white/black over dark/light swatches, as in HC, so all
variant–swatch combos work. Light looks the same, & :dark works now.

For backdrop, use alpha 0.5, unlike 0.7 in HC, as that seemed excessive
& different from the current effect. 0.5 is almost identical to how
$backdrop_fg_colour is a 50% mix of $fg_color, & matches backdrop text.

https://bugzilla.gnome.org/show_bug.cgi?id=787531
2017-09-16 17:02:48 +01:00
Daniel Boles
7161b57063 Expander: get_label() return is nullable
Also, use gchar to match the header.
2017-09-15 18:25:47 +01:00
Chun-wei Fan
0332dbca94 gtk/gentypefuncs.py: Open files in utf-8 encoding
On Python-3.x, we need to set the encoding when opening files, when this
script is run, as it might contain items that are not supported by the
system's locale (for example, non-English Windows).  So, we use a
wrapper to set the encoding on Python 3.x, but open the file as we did
when using Python 2.x, since file encodings are not supported there.

https://bugzilla.gnome.org/show_bug.cgi?id=785210
2017-09-15 21:41:15 +08:00
Daniel Boles
89790bb412 Expander: Annotate new()’s label arg as nullable
to match new_with_mnemonic()
2017-09-14 21:21:09 +01:00
Daniel Boles
050531a9f2 Expander: Replace (allow-none) with (nullable)
The former is deprecated in favour of the latter.
2017-09-14 21:21:08 +01:00
Daniel Boles
3cd117e3a1 Expander: Explain how to conditionally style arrow 2017-09-14 21:21:08 +01:00
Daniel Boles
d48f904e3c Spinner: Document how to select on animated in CSS
This is not particularly obvious, so it seems worth including.
2017-09-14 19:25:50 +01:00
Daniel Boles
ac4faad8a2 Frame: Add missing fixed-width format to enums 2017-09-14 18:29:08 +01:00
Timm Bäder
c8efb575f8 iconview: Stop using ::button-{press,release}-event
Use a gesture instead.
2017-09-13 17:58:45 +02:00
Timm Bäder
054df8e6ec calendar: Stop using ::button-{press,release}-event 2017-09-13 17:37:25 +02:00
Daniel Boles
d207e03918 FlowBox: Explain how to avoid inflated min size
along the orthogonal orientation. It seems a FlowBox on its own can only
handle being shrunk along its main orientation. The orthogonal requests
a huge min size – reserving what it would need if the main orientation
got its min size, which would flow all children in 1 line orthogonally.

Adding it to a ScrolledWindow (any policy) enables free shrinking, so
size_allocate() can reflow how users in this situation probably expect.

https://bugzilla.gnome.org/show_bug.cgi?id=787021
2017-09-12 22:49:48 +01:00
Hiroyuki Ito
efaf99b039 ColorButton: Don’t destroy dialog @ ::delete-event
Without specifically connecting ::delete-event to something, the dialog
will be destroyed when it is closed, for example by pressing Esc. This
meant that when dismissing it this way, unlike by pressing Cancel, any
custom palette would be lost when the dialog was next opened, and so on.

Resolve this by making ::delete-event just do GTK_RESPONSE_CANCEL, so
closing the dialog has the same effect as clicking its Cancel button.

https://bugzilla.gnome.org/show_bug.cgi?id=787444
2017-09-12 20:52:43 +01:00
Philip Withnall
80b10aa1bd gtksettings: Add a debug message if there is no default GtkSettings
Make it slightly more obvious when things are about to slide sideways
because a NULL GtkSettings has been returned to a caller. This is a
valid return value, but is rarely handled correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=778382
2017-09-12 16:04:44 +01:00
Philip Withnall
69102ac8df gtknotebook: Simplify some if-conditions
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787303
2017-09-12 15:22:13 +01:00
Philip Withnall
7069dc0261 gtkmountoperation-x11: Do array length check before dereference
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787302
2017-09-12 15:21:59 +01:00
Nirbheek Chauhan
aa3e8ee097 build: Add dependency fallbacks for libs with meson ports
With these changes gtk+ builds for me using fallbacks for all libraries
with fallbacks available. Needs the following changes:

https://github.com/ebassi/graphene/pull/109 (graphene)
https://bugzilla.gnome.org/show_bug.cgi?id=787414 (pango)
https://github.com/mesonbuild/meson/pull/2291 (will be in meson 0.42.1)

https://bugzilla.gnome.org/show_bug.cgi?id=787416
2017-09-12 00:24:58 +05:30
Nirbheek Chauhan
1a11d0071b build: Add girs and typelibs as sources to libgtk_dep
This will be needed by any projects that want to use gtk+ as
a subproject.

https://bugzilla.gnome.org/show_bug.cgi?id=787416
2017-09-12 00:24:58 +05:30
Matthias Clasen
86f018c6a7 Fix a corner-case for emoji input
As reported in https://github.com/ibus/ibus/issues/1944,
typing u201e while holding Ctrl+Shift used to give a „
when letting go of Ctrl+Shift. This broke when we introduced
Ctrl+Shift+e to start Emoji sequences. Fix this by only
looking for Ctrl+Shift+e if we are not already in a hex
sequence.
2017-09-11 11:20:07 -04:00
Matthias Clasen
b0e8d8483d More work on text nodes
This commit takes several steps towards rendering text
like we want to.

The creation of the cairo surface and texture is moved
to the backend (in GskVulkanRenderer). We add a mask
shader that is used in the next text pipeline to use
the texture as a mask, like cairo_mask_surface does.
There is a separate color text pipeline that uses the
already existing blend shaders to use the texture as
a source, like cairo_paint does.

The text node api is simplified to have just a single
offset, which determines the left end of the text baseline,
like all our other text drawing APIs.
2017-09-10 14:36:26 -04:00
Daniel Boles
09d1d5a0d6 Entry: Fix leak of text in ensure_has_tooltip()
Thanks to Mohammed Sadiq for noticing this. I guess I got
Widget.get_tooltip_text() confused with Label.get_label().

https://bugzilla.gnome.org/show_bug.cgi?id=787410
2017-09-07 14:56:20 +01:00
Matthias Clasen
15edfbbc88 Rename and document the enable-gir option
You can disable introspection now with -Dintrospection=false.
2017-09-06 09:53:34 -04:00
Matthias Clasen
af5d3e3299 popover: Fix a warning
We were unintentionally disconnecting an already-disconnected
signal handler in some cases. Don't do that, it causes warnings.
2017-09-06 08:04:33 -04:00
Matthias Clasen
863a9cef98 entry: Set a clip
Now that GtkEntry is using a text node, we were spilling
the contents out to the side when the entry is scrolling.
Avoid that by setting a clip.
2017-09-05 23:29:59 -04:00
Chun-wei Fan
1b7f08171a gskpango.c: Include cairo.h consistently
The other source files use "#include <cairo.h>", so we should do
likewise.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-09-06 10:42:32 +08:00
Daniel Boles
d97db77ad4 ActionBar: Fix links in set_revealed() doc, etc.
mostly: syncing with previous commit, where InfoBar copied this all from

Also, remove my unhelpful “and vice-versa” from InfoBar.
2017-09-05 21:33:00 +01:00
Daniel Boles
14387ed2e7 InfoBar: Fix typos in set_revealed() documentation
Fix a parameter type and a link to the corresponding property.
Tweak the wording and whatnot a little while at it.
2017-09-05 20:20:46 +01:00
Jakub Steiner
90ba317d92 adwaita: use generic sidebar icon style
https://bugzilla.gnome.org/show_bug.cgi?id=786613
2017-09-05 13:53:46 +02:00
Daniel Boles
9699a954cd HighContrast: Stop hovered emoji from disappearing
Otherwise emoji are invisible in the normal variant & nearly in Inverse.

https://bugzilla.gnome.org/show_bug.cgi?id=787279
2017-09-05 01:42:56 +01:00
Daniel Boles
edad5e5c09 Adwaita: Fix a selector not regenerated in the CSS 2017-09-05 01:42:13 +01:00
Daniel Boles
23ea09aa48 HighContrast: Kill abominable headerbar vseparator
Commit 8cd37ff0df fixed a syntax error and
unwittingly released this bizarre mutant.
2017-09-05 01:00:53 +01:00
Daniel Boles
b97f1900b7 EmojiChooser: Ensure always have a selected button
We were only selecting a section’s button if the adjustment y coord was
within its heading, so scrolling slightly into it unchecked all buttons.
This also fixes how we could end up with the first 2 selected, somehow.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:58:24 +01:00
Daniel Boles
002a1d9c1c EmojiChooser: Check the 1st button before 1st show
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:58:24 +01:00
Matthias Clasen
86c60592fb css: Implement the blur filter
This implementation is somewhat incomplete, since
we don't allow combining blur with the other filters
yet.
2017-09-04 14:28:16 -04:00
Matthias Clasen
5f6fdc4dd8 Render the main overlay child only once
Use a separate snapshot to capture the main child render node
and reuse it multiple times, instead of generating multiple
nodes for the same content.
2017-09-04 14:28:16 -04:00
Matthias Clasen
31349e71d3 Add a blur child property to GtkOverlay
When set, it blurs the content behind the child.
2017-09-04 14:28:16 -04:00
Matthias Clasen
d6be42203b Add gtk_snapshot_push_blur()
This function is similar to the other push functions.
This one uses the newly created blur node.
2017-09-04 14:28:16 -04:00
Matthias Clasen
e2869853dc gsk: Add a blur node
For now, this has just a fallback implementation using
the typical box filter approximation.
2017-09-04 14:28:16 -04:00
Julius Härtl
a1635b6188 gtkplacessidebar: implement libcloudproviders support
Add integration of the libcloudproviders DBus API to the
GtkPlacesSidebar by showing name and sync status of the cloud providers.
The exported menu is rendered as a GtkPopover.

The sidebar will be updated if the list of cloudproviders changes e.g.
by adding or removing an account. If any cloud provider changes detailed
information like sync status only the individual sidebar row gets
updated.

Co-authored-by: Carlos Soriano <csoriano@gnome.org>
Co-authored-by: Daniel Boles <dboles@src.gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-09-04 11:32:03 -04:00
Daniel Boles
9514ef0d03 HighContrast: basic port of emoji CSS from Adwaita
This is better than nothing: without specific CSS, the Chooser was too
large, the emoji were too small, and the buttons were generally ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 11:03:35 -04:00
Daniel Boles
99b314084b Adwaita: proper colours for inactive emoji buttons
Use opacity to differentiate unselected/hovered/selected buttons. It had
assumed bg < border < fg colours, which may be false, as in Adwaita:dark

This also means we do not need to special-case for the backdrop state.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 11:03:16 -04:00
Daniel Boles
8a8a643b03 Adwaita: Make use of SASS syntax for emoji stuff
This makes the theme easier to maintain.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 11:03:02 -04:00
Matthias Clasen
d281cd7498 Fix a compiler warning 2017-09-03 19:53:29 -04:00
Matthias Clasen
59b1206468 Avoid empty nodes another way
Make gsk_text_node_new return NULL if the extents are empty.
2017-09-03 19:35:02 -04:00
Matthias Clasen
7bb202e4a2 Add a workaround for vulkan crashes
I see 'out of memory' errors and crashes inside libvulkan when
creating nodes that have empty bounds and end up in the fallback
paths, like a shadow around an empty text node. Prevent this
by not creating text nodes in that case.
2017-09-03 11:57:21 -04:00
Matthias Clasen
a05895e029 Record node names for debug output
This is useful for GSK_NOTE output as well.
2017-09-03 11:32:09 -04:00
Matthias Clasen
eab50246e1 Only record node names when we should
This is the same thing we do for render nodes elsewhere.
2017-09-03 10:30:32 -04:00
Daniel Boles
68631d6dbd Adwaita: Fix ineffective theming of switch slider
in a specific case, which was applying .slider as a class on the parent
switch, instead of correctly selecting on its child node named slider.

This makes the border on the outside of a switch in a selected listbox
row look better in the light variant. Since the code was never removed,
it was clearly meant to work, and making it work is a clear improvement.
2017-09-03 14:02:23 +01:00
Daniel Boles
8cd37ff0df HighContrast: Fix outdated name for headerbar box 2017-09-03 13:36:43 +01:00
Daniel Boles
48055f99e7 Toolbar: Clarify set_show_arrow() a bit more 2017-09-03 11:04:59 +01:00
Daniel Boles
1b38944203 Toolbar: Clarify how the arrow overflow menu works
The fact it affects the preferred size, and only works with ToolItems
that return a menu proxy item, was unclear unless deduced from other
sources, and this led to users thinking it was broken, for example:

https://stackoverflow.com/q/44644642/2757035

https://bugzilla.gnome.org/show_bug.cgi?id=787158
https://bugzilla.gnome.org/show_bug.cgi?id=787195
2017-09-03 10:59:34 +01:00
Daniel Boles
5095ca6ed7 ToolItem: Add see-also from proxy setter to signal 2017-09-03 10:59:34 +01:00
Daniel Boles
7ed0d9344e ToolItem: Annotate menu proxy item as nullable
It can be NULL. ::create-menu-proxy gave an example of when a NULL proxy
menu item could be useful, but the accessors did not annotate it as such.
2017-09-03 10:59:33 +01:00
Timm Bäder
7481affb82 container: Drop priv pointer 2017-09-03 09:17:35 +02:00
Daniel Boles
18adda6eb0 Adwaita: Fix colour mixing of emoji section button
when hovered, by using %, since SASS does not handle decimal mixes.
2017-09-02 16:02:59 +01:00
Matthias Clasen
d27c552630 emoji chooser: No emoji in the search entry
Recursion is fun, but better avoided in the ui.

https://bugzilla.gnome.org/show_bug.cgi?id=786960
2017-09-02 08:47:17 -04:00
Matthias Clasen
3694104f67 entry: Consider input hints for Emoji support
Don't show "insert emoji" in the context menu if input
hints indicate that Emoji input is not useful.
2017-09-02 08:47:17 -04:00
Matthias Clasen
774499e10e Add input hints for Emoji input
Allow hinting input methods about whether Emoji support is
useful or not.
2017-09-02 08:47:17 -04:00
Emmanuele Bassi
3a0eab776e build: Add option to enable/disable GIR generation
And drop the unnecessary is_cross_build() check: it's entirely possible
to generate introspection data when cross-compiling.
2017-09-02 12:00:57 +01:00
Matthias Clasen
f414e1b15f emoji chooser: Avoid a crash
The emoji chooser gets disposed already, because it is attached
to the toplevel as a popover. Doing it again when the object data
is cleared is leading to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=787103
2017-09-01 19:55:21 -04:00
Mohammed Sadiq
18adee6e1b emoji-chooser: fix subsequent scroll
Event handlers on scroll window should only be run once the widget
is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=786964
2017-09-01 19:36:59 -04:00
Daniel Boles
7a3548e10c Entry: Set tooltip text on icon for emoji chooser
https://bugzilla.gnome.org/show_bug.cgi?id=786885
2017-09-01 17:28:31 -04:00
Matthias Clasen
7da4d8af2f Use gsk for text shadows
We don't need to render these manually using cairo anymore.
2017-09-01 15:34:13 -04:00
Matthias Clasen
6bdebd1570 label: Don't leak clip regions
This was introduced in the conversion to gsk.
2017-09-01 15:34:13 -04:00
Daniel Boles
e6bbc10bd5 ComboBox: Dodge possible surplus disconnects
in case anyone connected any other signal on the model to this ComboBox.
2017-09-01 20:20:17 +01:00
Matthias Clasen
8de8525b44 entry: Convert to gsk
This introduces a new css node for block cursor styling.
2017-09-01 14:42:29 -04:00
Matthias Clasen
1440bb25de Fix text colors
This was lost in some reshuffling of the gskpango branch.
2017-09-01 14:12:20 -04:00
Matthias Clasen
f199f7b87b Fix the build 2017-09-01 13:42:43 -04:00
Matthias Clasen
a367d34949 Use a text render node in GskPangoRenderer
This pushes the rendering closer to the place where we can
insert a texture atlas for glyph caching.
2017-09-01 13:30:03 -04:00
Matthias Clasen
4975aa7920 Add a render node for text
This is just a wrapper around a PangoGlyphString + PangoFont.
Basically, the arguments that are passed to pango_renderer_draw_glyphs.
2017-09-01 13:30:03 -04:00
Matthias Clasen
82538f935b Use GskPangoRenderer to render text
This just replaces the wrapper call.
2017-09-01 13:30:03 -04:00
Matthias Clasen
82e8f3a542 Add a Pango renderer
Copy the PangoCairoRenderer into GTK+, rename it to GskPangoRenderer,
and strip it down far enough to build without private pango apis.
This means we currently don't support hexboxes or shapes.

Currently, this lives in gtk, but it might be nicer to put it
in gsk eventually.
2017-09-01 13:30:03 -04:00
Timm Bäder
3fc1cafec0 centerbox: Unparent widgets in dispose 2017-09-01 19:05:30 +02:00
Timm Bäder
2cd9f43d2f menuitem: Fix small memory leak in get_label
g_object_get returs a newly allocated string so we can't use it here.
2017-09-01 19:05:30 +02:00
Matthias Clasen
745a9426b0 Remove an unused variable 2017-09-01 12:56:22 -04:00
Matthias Clasen
10ddd3112a label: Port active link drawing to gsk
We don't need to fall back to cairo fro this anymore.
2017-09-01 12:29:11 -04:00
Matthias Clasen
75115b122b inspector: Add some tooltips
These buttons are not 100% obvious.
2017-09-01 12:04:40 -04:00
Matthias Clasen
c17f76cd54 inspector: Remove debug nodes setting from visual tab
No need to have the same setting in two places.
2017-09-01 12:04:33 -04:00
Matthias Clasen
04f1e19e00 inspector: Move debug nodes option
Put this option on the recorder page where it makes more sense.
2017-09-01 12:04:27 -04:00
Matthias Clasen
47f717d4ae label: Port selection drawing to gsk
We don't need to fall back to cairo for this anymore.
2017-09-01 12:04:20 -04:00
Daniel Boles
021e0d5e3d ScrolledWindow: Dodge possible surplus disconnects
In case the outgoing Adjustment for whatever reason has other handlers
referring to this SW, be sure to avoid disconnecting any but our own.
2017-09-01 16:28:57 +01:00
Daniel Boles
9a6adcbce4 ComboBox: Remove pointless signal ID member fields
We don’t need to store these for disconnection, as we can just use
g_signal_handlers_disconnect_by_data().
2017-09-01 16:28:56 +01:00
Daniel Boles
ceb09e4c8d ScrolledWindow: Fix non-disconnection of handlers
• Use disconnect_by_data() to catch both _adjustment_changed() and now
  _adjustment_value_changed(), as the latter had been missed until now.

• Also disconnect from indicator_value_changed(), which was not done in
  destroy() due to indicator_reset() and remove_indicator() disagreeing.

https://bugzilla.gnome.org/show_bug.cgi?id=775074
2017-08-31 23:18:46 +01:00
Daniel Boles
6984d0847b Window: Do not connect to NULL screen in init()
Do not connect to get_settings_for_screen() if we have no screen…

Use g_signal_connect(), not connect_object(), to match how set_screen()
makes this same connection, and how finalize() already disconnects it.

https://bugzilla.gnome.org/show_bug.cgi?id=705640
2017-08-31 20:26:44 +01:00
Daniel Boles
6609173779 FileChooserWidget: Remove an unused #include 2017-08-31 19:59:25 +01:00
Matthias Clasen
767bf1b3fd Avoid computing the same thing twice
Trivial cleanup.
2017-08-30 23:30:10 -04:00
Daniel Boles
552998868d Entry: Rename int helper to gtk_entry_clear_icon()
It was called gtk_entry_clear(), which was unnecessarily vague.
2017-08-30 21:16:00 +01:00
Daniel Boles
6e414d42d7 Entry: Fix Shift-click → extend/truncate selection
Since the move from button-press to gesture events, Shift-clicking did
not work to start a selection (from none) or truncate an existing one.

This was due to the code being copy-pasted around and some logic being
broken in the process. This makes both of those work as they should, by
shuffling it again so the end result is the same as before. Highlights:

(1) ::button-press if extending due to a single press would call
set_positions(tmp_pos, tmp_pos), which is what made the Shift+click to
create a selection work. That was lost. Add it back to make that work.

(2) ::button-press in the “Truncate current selection” branch would not
execute all the stuff around “extend_to_left”, as that was the else
case. So, set extend_selection = FALSE so we skip over that later on.

(3) BUT! This Truncate case never fired because it was in the else
branch of if (in_selection())! Of course, it must be in the true branch.

(4) The IM context was not reset if the Shift-click occurred within an
existing selection, only if it did not. In ::button-press this was the
first thing done if extending a selection, regardless. Make it so again.

https://bugzilla.gnome.org/show_bug.cgi?id=780750
2017-08-30 18:26:04 +01:00
Matthias Clasen
d2087f1943 Avoid empty space in the emoji chooser
We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 08:36:56 -04:00
Nelson Benítez León
c3c10edd09 textview: fix bug on DnD displaced limits of selection
The fix of commit f2fd655754
should be confined to DnD coords only, because otherwise
it causes the start and end of the selection to be displaced.

https://bugzilla.gnome.org/show_bug.cgi?id=785736
2017-08-29 19:26:07 +01:00
Debarshi Ray
fd9aec27fc GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:41:01 +02:00
Daniel Boles
87c67e6ed3 LevelBar: Really fix underallocation of blocks
Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

This partially reverts commit 96062ffeae,
as it makes sense to set min sizes for discrete blocks, so keep that in.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-29 00:34:02 +01:00
Javier Jardón
bc3968d2ff gtk/gtkshow: Remove deprected gtk_show_uri() 2017-08-28 23:47:36 +01:00
Javier Jardón
d3954f614c Use gtk_show_uri_on_window() instead gtk_show_uri() 2017-08-28 23:47:36 +01:00
Daniel Boles
896f7c8ac0 Entry: Handle :show-emoji-icon becoming false
Disconnect the now-unwanted signal handler, and hide the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:06 +01:00
Daniel Boles
cb219473ee Entry: Drop redundant typecasts
https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:06 +01:00
Daniel Boles
477fc95655 Entry: Only open emoji picker on 2ndary icon click
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938
2017-08-28 20:52:01 +01:00
Timm Bäder
a08f8937c6 Revert "headerbar: Avoid allocating 0 visible children"
This reverts commit 8c0e5adaab.

This is actually needed since GtkHeaderBar will allocate and snapshot
widget that coun_visible_children does not consider.
2017-08-28 17:50:34 +02:00
Timm Bäder
ccfc568a03 range: Fix trough state update 2017-08-28 11:17:47 +02:00
Timm Bäder
619ee3797d popover: Initialize some locals
gtk_popover_get_pointing_to does not fill the given rect in every case.
2017-08-28 11:17:47 +02:00
Timm Bäder
8c0e5adaab headerbar: Avoid allocating 0 visible children
Ths avoids doing a bunch of work as well as passing 0 to g_alloca which
is undefined.
2017-08-28 11:17:47 +02:00
Matthias Clasen
41f26ea7a6 wayland: Stop using subsurfaces for popovers
Subsurfaces don't currently work with our new rendering,
and this makes popovers unusable. We can go back to using
subsurfaces for popovers when this is fixed.
2017-08-26 15:34:46 -04:00
Timm Bäder
e26b60d48c container: Remove leftover prototype
Thanks to Murray Cumming.
2017-08-25 14:53:09 +02:00
Daniel Boles
73c689eb5a ComboBox: Clarify documentation of get_active_iter
https://bugzilla.gnome.org/show_bug.cgi?id=618160
2017-08-24 21:32:05 +01:00
Daniel Boles
12693c6fe3 Popover: Include window shadows in overshoot calcs
.update_position() enforces that non-Wayland platforms must position a
Popover within its parent Window. We use the allocation of the Window
to translate the position and check for overshoot on each of its sides.
Calling Widget.get_allocation() of a CSD Window includes its shadows.

But shadows were not excluded from the area in which we can position.
Thus, Popovers could get positioned in the shadow of CSD windows, where,
at least on X11, no input is received. Therefore, positioning a Popover
over a shadow meant its child widgets within that area became unusable.

Fix by calling Window.get_shadow() and including it in the overshoot on
each side. This adjusts for how the allocation includes shadows, making
overshoots with and without shadows the same. Thus, we avoid considering
shadows as viable for positioning, favouring a side where input works.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-24 21:32:05 +01:00
Matthias Clasen
17b75f2252 Remove motif dnd leftovers
We don't support Motif DND anymore, so no need to look for
Motif-specific messages.
2017-08-23 19:42:53 -04:00
Daniel Boles
da76699757 SidebarRow: Add Unmount tooltip to eject_button
It was reported that the lack of a tooltip made its purpose unclear.
This can be solved by just copying PlacesViewRow’s eject_button tooltip.

https://bugzilla.gnome.org/show_bug.cgi?id=766909
2017-08-23 21:41:50 +01:00
Carlos Garnacho
5fdcfa4739 fontchooser: Block row deleted signal handler when reloading model
This prevents the load_fonts() function from switching to the "no fonts"
page and back when the model is reloaded. Given
GtkSettings::gtk-fontconfig-timestamp is 0 on Wayland and style changes
happen often, the stack change messes up popovers and pointer focus
on the fonts treeview and test entry.
2017-08-23 20:41:18 +02:00
Tom Schoonjans
84bcf7d4d3 GtkFileChooserNativeQuartz: restore parent focus after closing dialog
Tested for both modal and non-modal dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:50 -04:00
Tom Schoonjans
bc2f125f1c GtkFileChooserNativeQuartz: improve support for file filters
Instead of using conditional compilation, use respondsToSelector to
check at runtime for setAccessoryViewDisclosed.

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:49 -04:00
Tom Schoonjans
798ea02440 GtkFileChooserNativeQuartz: add support for Mountain Lion and Mavericks
https://bugzilla.gnome.org/show_bug.cgi?id=784723 introduced support for
native file chooser dialogs on macOS, but due to the use of generics in
the patch, there will be compilation errors on pre-Xcode 7 platforms,
such as Mountain Lion and Mavericks.

I strongly recommend to revert this patch when the oldest supported
macOS release is bumped to Yosemite (10.10).

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:49 -04:00
Timm Bäder
53ad763042 magnifier: Port to snapshot
Instead of gtk_widget_draw'in the inspected widget inside the
magnifier's ::draw handler, just create a new GtkSnapshot and snapshot
in its snapshot handler, similar to what GtkStack is doing.
2017-08-23 16:33:49 +02:00
Timm Bäder
a23ea01c8f widget: Fix UPDATES debug rendering
Choose the right widget to add the debug updates to (the one with the
window) and the correct region (the one in that window's coordinates).
2017-08-23 13:58:21 +02:00
Timm Bäder
8e0ed691e3 widget: Remove unused draw_internal prototype
gtk_widget_draw_internal is now only used inside gtkwidget.c, so remove
the prototype from gtkwidgetprivate.h. And since all incovacations call
it with clip_to_size=TRUE, remove that parameter.
2017-08-23 11:05:36 +02:00
Matthias Clasen
7937da632a Handle emoji data change in emoji chooser
Update the settings schema to follow the change in Emoji data,
and make the emoji chooser code handle the new format.
2017-08-22 08:13:52 -04:00
Matthias Clasen
ac1b8f66b1 Add shortnames to emoji data
The json file is from

https://github.com/emojione/emojione/tree/master/extras/alpha-codes

It is under the MIT license.
2017-08-22 08:13:45 -04:00
Matthias Clasen
2f909cc474 Don't consume too many key releases
The Emoji input support in GtkIMContextSimple was
unintentionally consuming too many key release
events. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=786594
2017-08-22 06:49:35 -04:00
Timm Bäder
f879750759 container: Fix scrolling adjustment coordinates 2017-08-21 12:30:47 +02:00
Timm Bäder
b24535ea75 container: Remove gtk_container_propagate_draw
It's superseded by gtk_widget_snapshot_child now.
2017-08-21 12:30:42 +02:00
Timm Bäder
afa9b5032c textview: Draw children using gtk_widget_snapshot_child 2017-08-21 12:27:10 +02:00
Timm Bäder
3613f96f59 widget: Remove outdated comment about widget coordinates
Not so odd anymore.
2017-08-19 11:43:29 +02:00
Timm Bäder
5204802f61 widget: Remove some always-true precondition checks 2017-08-15 21:45:03 +02:00
Daniel Boles
ad5c4d09b3 ScrolledWindow: Bin unreachable ternary branches
We already checked that the child is not NULL above.

Coverity CID 1454191
2017-08-15 20:33:49 +01:00
Timm Bäder
d81fc8edce gtkpango: Remove unused functions
Remove _gtk_pango_move_lines and a few function declarations in the
private header file since they are only used inside gtkpango.c
2017-08-15 21:27:52 +02:00
Timm Bäder
c1082ca93e build: Install gtkcenterbox.h 2017-08-15 21:27:52 +02:00
Daniel Boles
915d8197a0 Widget: Fix outdated comments about tooltips
They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.

https://bugzilla.gnome.org/show_bug.cgi?id=784421
2017-08-15 19:17:57 +01:00
Emmanuele Bassi
3cb8a976a6 build: Ensure introspection data points to the right header
We have different header files for different sections of our API,
including introspection.
2017-08-15 17:13:30 +01:00
Chun-wei Fan
0a85a76419 build: Partially revert "Drop old MSC makefiles"
gtk/libgtk4.manifest.in is used to give the themed print dialog on
Windows, which should not be removed, so we ought to get it back.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:37:24 +08:00
Chun-wei Fan
f7409773b3 gtk/gtkemojichooser.c: Don't use g_autoptr()
We can't use g_autoptr() on non-GCC-style compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:36:53 +08:00
Matthias Clasen
8c3fc06baf Remove an erroneous unref
This was leftover by accident.
2017-08-15 06:40:05 -04:00
Emmanuele Bassi
6240082e12 Drop old MSC makefiles 2017-08-14 22:23:09 +01:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Matthias Clasen
fdd5e9f61e Redo emoji data slightly
No longer store variation sequences explicitly. Instead, put a 0
in the sequence where the modifiers will be inserted. This is more
compact, and it allows us to put variations directly into the
recent section.

Update the type of the recent-emoji setting to match these changes.
2017-08-14 15:46:02 -04:00
Timm Bäder
0fe396e516 popover: Remove double assignment 2017-08-14 21:29:18 +02:00
Timm Bäder
54c362bf48 gtkwindowprivate: Remove _gtk_window_keys_foreach
Unused outside of gtkwindow.c
2017-08-14 14:24:29 +02:00
Timm Bäder
c309def4f0 winodw: Remove _gtk_window_reposition prototype
It's never implemented.
2017-08-14 14:24:10 +02:00
Timm Bäder
9f3f640c0d widget: Remove gtk_widget_get_border_allocation 2017-08-14 12:22:39 +02:00
Timm Bäder
5f859a1f24 widget: Remove gtk_widget_get_content_allocation
Replace it where we still need something similar, e.g. in
gtk_widget_translate_coordinates
2017-08-14 12:22:39 +02:00
Timm Bäder
9c7e089fc2 widget: Remove gtk_widget_get_margin_allocation
It's not needed anymore with get_outer_allocation (which will be
replaced by something more appropriately named).
2017-08-14 12:22:39 +02:00
Daniel Boles
4a6f5136ba convert-emoji: Don’t pointlessly do rest of loop
skip can never become FALSE again, so break as soon as it becomes TRUE.
2017-08-13 17:39:13 +01:00
Timm Bäder
1ee32d10ce meson: Add emoji data
Otherwise we crash at runtime.
2017-08-13 18:08:41 +02:00
Matthias Clasen
82a24e7cf6 Don't update headings in an idle
It is not necessary since flow box invalidation is
all synchronous currently. If that ever changes,
this code will need adjustment.
2017-08-13 09:27:37 -04:00
Matthias Clasen
b52c1cb8dc scrolled window: Don't leak timeout sources
We must only create a new source if there isn't one already,
otherwise we override the ID and leak the previous one.
2017-08-13 09:24:50 -04:00
Matthias Clasen
98089778df Add names to more sources
This makes debugging mainloop-related issues more pleasant.
2017-08-13 09:03:40 -04:00
Matthias Clasen
5b23fd32f1 emoji: Fix a leak
We were leaking the list of recently used Emoji here.
Pointed out by Timm Bädert.
2017-08-13 07:51:33 -04:00
Matthias Clasen
fd4fa7be29 emoji: Start search on the first character
There is no need to wait for a longer prefix here.
We already display all the content anyway, it will
only get less.
2017-08-13 07:51:33 -04:00
Matthias Clasen
aa1fb13451 Fix the meson build 2017-08-12 19:06:00 -04:00
Matthias Clasen
558aebfbc4 entry: Add support for an Emoji chooser
Add an "Insert Emoji" item to the context menu in entries.
We also add a show-emoji-icon property, which when set to
TRUE, will add an icon that can be clicked to bring up
the Emoji chooser.
2017-08-12 18:48:14 -04:00
Matthias Clasen
46f7804f3a Fix a problem with focus handling in modal popovers
When the popover is dismissed, we return the focus to
where it came from. However, by using gtk_widget_grab_focus,
we were messing up the selection if that widget happens to
be an entry. Special-case GtkEntry and use
gtk_entry_grab_focus_without_selecting to avoid this issue.
2017-08-12 18:48:14 -04:00
Matthias Clasen
c6c1619646 Add an Emoji chooser widget
Add a popover that shows color Emoji, with a search entry.
The recently-used Emoji are stored in a GSetting.
2017-08-12 18:48:14 -04:00
Matthias Clasen
44999fa239 Add Emoji data
The json file is imported from the (MIT-licensed) emoji.json[0] node
module, which generates it from the emoji list published by the
Unicode Consortium.

This commit also adds a little tool to convert the data into
a compact GVariant, and the result of that conversion, which is
added to libgtk as a resource. The following commits will make use
of it.

[0] https://github.com/amio/emoji.json
2017-08-12 18:48:14 -04:00
Daniel Boles
a2768144f1 InfoBar: Fix wrong/uninit var use in code example
https://bugzilla.gnome.org/show_bug.cgi?id=786144
2017-08-12 21:08:24 +01:00
Daniel Boles
854bfb916c Adwaita: Sync CSS files with current SASS 2017-08-12 16:02:18 +01:00
Daniel Boles
c8e2ccd7a1 LevelBar: Don’t pointlessly copy an allocation
now featuring the required comma :/
2017-08-12 15:13:36 +01:00
Timm Bäder
07d6c7817d widget: Remove private _gtk_widget_set_has_focus
The css state here is now handled in gtk_widget_set_focus_child
2017-08-12 15:56:53 +02:00
Matthias Clasen
a5ba6dfe97 Revert "LevelBar: Avoid unnecessarily copying allocation"
This reverts commit d5e25be9bc.

It doesn't build.
2017-08-12 09:46:06 -04:00
Daniel Boles
d5e25be9bc LevelBar: Avoid unnecessarily copying allocation
Just use the original allocation, instead of copying it and passing that
2017-08-12 14:23:55 +01:00
Matthias Clasen
342fdee0a1 Remove an unused field
Nothing uses bubble_window, so it can go.
2017-08-11 19:53:06 -04:00
Matthias Clasen
8d3dd50948 Drop keynav for dnd
This is very much an easter egg, and it is the last place where
we use the root window in libgtk.
2017-08-11 15:45:23 -04:00
Lapo Calamandrei
96062ffeae adwaita: remove min-<lenght> from levelbar blocks
It's not needed and causes issues, see for details:
https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-11 16:25:40 +02:00
Lapo Calamandrei
30a7264865 adwaita: Remove menu margins
menu margins have been added has a hack to mitigate bug:
https://bugzilla.gnome.org/show_bug.cgi?id=591258 with gtk+4 this
doesn't work anymore on gtk+4, the margin should probably be moved
to the parent window node, but it's not selectable, commenting out
for now.
2017-08-11 15:07:13 +02:00
Timm Bäder
a8a755e5cd widget: Remove gtk_widget_set_redraw_on_alloc
Since gtk+ draws more than the widget and allocates more size to it than
it knows about, this flag doesn't work anymore. Removing it (or setting
it to TRUE for widgets that used to set it to FALSE) fixes drawing
invalidation when these widgets get allocated a new size.
2017-08-09 16:26:26 +02:00
Daniel Boles
c25f619033 Revert "levelbar: Don't underallocate block widgets"
This reverts commit e25e1c54a4.

That commit causes a block always to be shown at the min side, even when
the value is 0, in which case, no fill should be shown.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-08 18:58:13 +01:00
Daniel Boles
23b6699ec3 Container: Don’t scroll to unset focus child coord
In gtk_container_real_set_focus_child(), we try to scroll to the
position of the new :focus-child if we have h or v adjustments.

gtk_widget_translate_coordinates() returns FALSE if neither widget is
realized or in other situations that cause output parameters x and y not
to be set. Thus, if the caller did not initialise x/y and uses them even
if the function returned FALSE, they are using uninitialised variables.

In gtk_container_real_set_focus_child(), we did not check the return
value but merrily went ahead and used x and y regardless. This is UB, as
revealed by Valgrind, as well as being pointless.

The trivial fix is to exit early if (!gtk_widget_translate_coordinates).

https://bugzilla.gnome.org/show_bug.cgi?id=776909
2017-08-07 19:21:09 +01:00
Daniel Boles
c4865bed43 Container: Fix scrolled coord in set_focus_child()
Commit 885bcd9fe4 trampled the bit here
that is meant to translate between the nominated focus child and the
actual innermost one that is used for updating the h/v adjustments.

So, we need to save the passed focus child before diving into its
children, then translate and get allocations between them both. This
makes GTK+ 4 behave like GTK+ 3 again: instead of priv->focus_child and
focus_child, we now have focus_child and child, serving the roles of the
nominated focus child and its innermost focus child respectively.

This also ditches the unnecessary call to Widget:get_focus_child(), as
Container::set_focus_child() gets that same new child as an argument.
2017-08-07 18:42:15 +01:00
Daniel Boles
e29f39b66c AccelLabel: set_accel_closure() arg is nullable 2017-08-07 10:32:13 +01:00
Daniel Boles
a42634c3e5 AccelLabel: set_accel_widget() arg is nullable 2017-08-07 10:29:53 +01:00
Carlos Garnacho
4f31afcd9c window: Fix traversal of popovers during picking
These need to be traversed in the opposite direction. Given the order is
opposite to rendering, use a GQueue so it's cheap to traverse/add either
way.
2017-08-06 22:44:40 +02:00
Daniel Boles
be85c8b1fd HeaderBar: Use less clashing appmenu fallback icon
process-stop-symbolic is unintuitive if represented as a stop sign as in
Adwaita, and completely ambiguous if represented as a cross like the
window close button in other icon themes.

Instead, use application-x-executable, which is already used elsewhere
as a fallback if no specific icon can be found for the application.

https://bugzilla.gnome.org/show_bug.cgi?id=784624
2017-08-06 18:03:27 +01:00
Daniel Boles
fec4a9f16a AccelLabel: Fix typos of Ctl to Ctrl 2017-08-06 17:35:07 +01:00
Matthias Clasen
642aee75d5 Enough with the beeping!
Don't beep when modifiers are released in entries.
This was an inadvertent change that snuck in with
the emoji support.

Also, don't beep while entering an emoji name.
There is entirely too much beeping here.
2017-08-05 19:31:52 -04:00
Matthias Clasen
c250dddb00 Use the right gettext domain
Most of our .ui files were still using the gtk30 domain,
despite the library having switched to gtk40. Fix this.
2017-08-05 18:17:29 -04:00
Daniel Boles
e9af8a2a67 AccelLabel: Fix displaying accel unichars >= 0x80
In GTK+ 2, the ch < 0x80 was ORd with klass->latin1_to_char, and that
was unconditionally set to TRUE in the class init function, so
effectively the ch < 0x80 never mattered before or served any purpose.

When klass->latin1_to_char was deleted from the class in commit
f760538f17, this check’s sense changed.

The resuls was that accel keyvals with gunichar value >= 0x80 stopped
being rendered as symbols, instead falling back to their keysym name.
Instead of recognisable symbols for these, we get raw, often obscure,
and untranslatable keysym names. This breaks accessibility as well as
client users who may be parsing such accels and migrating from GTK+ 2.

So, remove the < 0x80 to restore the behaviour from before said commit.

https://bugzilla.gnome.org/show_bug.cgi?id=783906
2017-08-05 20:27:43 +01:00
Daniel Boles
7dd9f212ad CenterBox: minor tweaks to doc blurb 2017-08-05 18:57:08 +01:00
Daniel Boles
cbe53fec07 CenterBox: Add missing nullable annotations
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:56:01 +01:00
Daniel Boles
4accb9f167 CenterBox: Guard against directly including header
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:44:02 +01:00
Kjell Ahlstedt
8f22078787 centerbox: Add G_BEGIN_DECLS and G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 11:26:42 +02:00
Matthias Clasen
72695773c2 Add support for entering emoji by name
This commit adds some basic support for entering emoji by name
to GtkIMContextSimple. To begin an emoji sequence, use Ctrl-Shift-e
instead of Ctrl-Shift-u that is used for hex input. Otherwise, the
behavior is the same: you can can let go of the modifier keys and
end the sequence with space or enter, or hold on to the modifier
keys and end the sequence by releasing them.

Only a limited, fixed set of names is supported at this time, see
the GtkIMContextSimple docs for a full list.
2017-08-04 14:54:26 -04:00
Daniel Boles
01e587da22 Window: Also quote Window address in Popover error
This is symmetrical with how we already do that for the Popover, and it
could be useful for debugging.
2017-08-03 21:10:22 +01:00
Daniel Boles
bae6d3d45c Fix some nullable Returns annotations
based on reports and patches by Iñaki García Etxebarria:

https://bugzilla.gnome.org/show_bug.cgi?id=781246
https://bugzilla.gnome.org/show_bug.cgi?id=785423
2017-08-03 20:27:29 +01:00
Timm Bäder
edbe6b3360 inspector: Fix object title label alignment
Re-center it after the center-child removal in GtkBox and the addition
of GtkCenterBox.
2017-08-03 18:25:51 +02:00
Daniel Boles
01fe6b4a83 GtkFixed: Update documentation intro
• Add GtkLayout as a @See_also since it includes fixed-pos functionality
• Drop mention of the long-gone Linux framebuffer port
• Explain how to work around the problems with RTL text
2017-08-03 13:03:05 +01:00
Daniel Boles
06da814863 Layout: Tweak documentation blurb
Being addable to a ScrolledWindow is not interesting; now that SW
auto-adds a Viewport if needed, so can DrawingArea and any other widget.

Mention GtkFixed in case the reader just wants that bit of functionality
2017-08-03 10:19:13 +01:00
Timm Bäder
5cafa2b1ce entry: get_icon_area returns in entry coordinates
This fixes the popover positions in the gtk4-demo/popovers, and it also
just makes sense. Also document what the returned coordinates are
relatiev to.
2017-08-03 11:14:53 +02:00
Timm Bäder
765aff3f0e popover: Fix arrow position
Remove all the manual css margin handling since that's being done for us
automatically now.
2017-08-03 11:07:59 +02:00
Benjamin Otte
47fe08528d eventbox: Remove 2017-08-02 16:59:09 +01:00
Benjamin Otte
18c086a46c texthandle: Don't use GtkEventBox 2017-08-02 16:58:47 +01:00
Benjamin Otte
212c46e20a a11y: Remove check for GtkEventBox 2017-08-02 16:58:05 +01:00
Benjamin Otte
711bf38d90 cellaccel: Get rid of GtkEventBox
Can't test the code atm because treeview editing is broken, let's hope
it works once that's fixed.
2017-08-02 14:05:02 +01:00
Benjamin Otte
6b7503b83e placessidebar: Remove EventBox usage 2017-08-02 14:05:02 +01:00
Benjamin Otte
464ffad23e placesview: Remove event box usage 2017-08-02 14:05:02 +01:00
Timm Bäder
e70a3fab0d widget: Constify state parameter of propagate_state
Makes sense.
2017-08-02 08:58:30 +02:00
Timm Bäder
8c08a33220 widget: Don't try to propagate 0 state flags
This happens quite often and has no effect anyway.
2017-08-02 08:58:30 +02:00
Timm Bäder
9a3049009e widget: Fix size_allocate's out_clip annotation 2017-08-02 08:58:30 +02:00
Daniel Boles
2b7db2376c bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.

CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
2017-08-01 20:45:07 +01:00
Daniel Boles
79bbd4aca5 cssselector: Ensure we do not index out of bounds
This would only happen if the last element was deprecated, but it should
be avoided anyway.

CID 1388852 (#1 of 1): Out-of-bounds read (OVERRUN)
12. overrun-local: Overrunning array pseudo_classes of 16 32-byte
elements at element index 16 (byte offset 512) using index i + 1U (which
evaluates to 16).
2017-08-01 20:17:02 +01:00
Daniel Boles
fc619706b7 Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.

CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
2017-08-01 20:15:14 +01:00
Daniel Boles
881d7c6442 Calendar: Add default case to appease Coverity
CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value rect.x when calling
calendar_arrow_rectangle.

Add a default case to the switch which will bail out with
g_assert_not_reached(), which should reassure Coverity that the method
is always called with a valid value that is handled in the switch.
2017-08-01 20:15:14 +01:00
Daniel Boles
eddbfc65a9 cssbordervalue: Fix possible use of uninitialised
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].

CID 1432029 (#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
2017-08-01 20:14:50 +01:00
Daniel Boles
37b23927c4 Stack: Fix copy-paste error
This fixes Coverity CID 1452217.
2017-08-01 19:18:39 +01:00
Daniel Boles
44c4faeed0 Entry: Fix unset icon tooltip hiding Entry tooltip
Our ::query-tooltip handler first checks whether the pointer is over any
of the icons, returning their tooltip if so, and if not chains up to
Widget::query-tooltip in order to show the text for the widget overall.

But ensure_has_tooltip(), which exists to update :has-tooltip based on
whether ::query-tooltip is needed, only set :has-tooltip to TRUE if any
icon had a tooltip, without caring whether the widget as a whole does.

That is asymmetrical and meant that if the Entry had a tooltip, but
subsequently all icons had their tooltips unset, :has-tooltip would be
set to FALSE, and hence the tooltip for the widget would become lost.

The fix is to set :has-tooltip to TRUE if the widget has a tooltip of
its own, and we only need to check the icons if that is not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=785672
2017-08-01 18:13:11 +01:00
Daniel Boles
b3a6067541 Entry: Warn about corner case hiding icon tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=785672#c4
2017-08-01 18:13:11 +01:00
Timm Bäder
f7bb6a7aa8 widget: Unset PRELIGHT and ACTIVE state in _set_sensitive
They both depend on input, which an insensitive widget does not receive.
2017-08-01 18:43:42 +02:00
Timm Bäder
36c4582086 button: Stop fiddling with PRELIGHT state
This is done automatically now and it's wrong here since it gets
executed after gesture release.
2017-08-01 18:16:40 +02:00
Timm Bäder
30d6b08271 scale: Allocate the value next to the slider
... when vertical. Also fixes usage of the uninitialized value_alloc.y.
2017-08-01 11:36:03 +02:00
Daniel Boles
0eb7e71a89 entry: Remove unused/duplicate widget in IconInfo 2017-07-30 14:20:59 +01:00
Timm Bäder
2cbcee8549 widget: Don't access highlight_resize in non-debug builds
The GtkWidgetPrivate struct only contains that member if G_ENABLE_DEBUG
is defined.
2017-07-28 21:28:32 +02:00
Timm Bäder
b71f644cf5 eventbox: Remove visible-window property
The GdkWindow that was supposed to back it is gone.
2017-07-27 21:53:42 +02:00
Carlos Garnacho
2d3882c7eb gtklabel: Fix touch link handling under wayland
Refactor the code updating the active link under the current coordinates
into a separate function, and call it on GtkGestureMultiPress::pressed
so the link is updated on GDK_TOUCH_BEGIN. Based on a patch by
Jan-Michael Brummer <jan.brummer@tabos.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=776903
2017-07-26 13:20:56 +02:00
Carlos Garnacho
21062fab02 gtklinkbutton: Set cursor on button's event window
It is not necessary to (re)set the cursor on every crossing
event, and can probably yield the wrong results if there are
multiple master devices involved. Just set it on init(), and
let the inner machinery update the cursor whenever necessary.

This patch is an adaption of commit 0daf79676 in gtk-3-22, the
side effects are not as bad here because the cursor was already
being set on the widget specifically instead of the parent
widget's, but there's still some nonetheless (plus, it's simpler)

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-26 13:11:43 +02:00
Kjell Ahlstedt
e2744aa74f actionbar: Call g_object_class_install_properties()
https://bugzilla.gnome.org/show_bug.cgi?id=785318
2017-07-25 10:35:29 +02:00
Matthias Clasen
ce801641a7 Avoid the use of g_autofree
We can't use this in code that may be built on win32,
so lets just not use it at all.
2017-07-24 13:27:29 -04:00
Timm Bäder
3f9bcf3b31 widget: Stop invalidating recursively 2017-07-24 14:32:06 +02:00
Timm Bäder
343f2d8c08 notebook: Set tabs child visible before allocating a size
Otherwise we might skip them here, then set child-visible to TRUE and
then later snapshot them even though they have no valid size.
2017-07-22 19:36:05 +02:00
Timm Bäder
3b44a88ddb cssstylechange: Fix change printing
Only print the old value once, above the new one.
2017-07-22 19:36:05 +02:00
Timm Bäder
5afbde2632 flowbox: Fix get_child_at_pos 2017-07-22 06:52:46 +02:00
Chun-wei Fan
73e81b64b6 gtk/gtkprintoperation-win32.c: Don't call gtk_widget_set_allocation()
This function was removed recently.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:35:38 +08:00
Timm Bäder
e92eebb434 overlay: Fix child widget allocation
Just adding the overlay's own position is wrong now.
2017-07-20 12:40:46 +02:00
Timm Bäder
c3176ed302 overlay: Keep the main child at the bottom
Since gtk_bin_add does a gtk_widget_set_parent call, we cannot use it in
a GtkBin implementation that has multiple child widgets and cares about
their order.
2017-07-20 12:33:57 +02:00
Timm Bäder
f537d36d0a GtkStyleContext: Create path node in _new
So we can avoid creating a GtkCssPathNode in _init and then throwing it
away right after when using the _new_with_node constructor, which is the
one we use for all widgets.
2017-07-19 21:27:16 -04:00
Timm Bäder
fc47be9339 GtkStyleContext: Remove property cache
It was only used for widget style properties which don't exist anymore.
2017-07-19 21:27:16 -04:00
Timm Bäder
9bf5def6b7 statusbar: Inherit from GtkWidget 2017-07-19 21:27:16 -04:00
Timm Bäder
4a4c7131fd modelmenuitem: Care about GtkAccelLabel in get_text 2017-07-19 21:27:16 -04:00
Timm Bäder
8a26e8a6ba modelmenuitem: Update indicator visibility when has_indicator changes 2017-07-19 21:27:16 -04:00
Timm Bäder
2f1d962e56 menushell: Hide model submenus by default 2017-07-19 21:27:16 -04:00
Timm Bäder
b1354a184b GtkCheckMenuItem: Remove snapshot-indicator vfunc
Let the widget snapshot all child widgets and control the visibility of
those child widgets instead.
2017-07-19 21:27:16 -04:00
Timm Bäder
ed5192497f label: Remove GtkEventBox mention from docs
Packing the label inside a GtkEventBox is not necessary anymore for it
to receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
584d613bfd image: Remove irrelevant code sample
Both the description and the sample itself are obsolete or uninteresting
now that all widgets can receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
d31621256d spinbutton: Fix css node docs 2017-07-19 21:27:16 -04:00
Timm Bäder
2c3ec49535 treeview: Fix row drag icon offsets 2017-07-19 21:27:16 -04:00
Timm Bäder
d836fa5134 treeviewcolumn: Remove input window 2017-07-19 21:27:16 -04:00
Timm Bäder
bd446c48e9 spinbutton: expand the entry
It's supposed to fill the entire spinbutton allocation apart from the
buttons
2017-07-19 21:27:16 -04:00
Timm Bäder
efccff70b7 Adwaita: Set minimum size for modelbutton arrows
Otherwise the minimum size is 1×1.
2017-07-19 21:27:16 -04:00
Timm Bäder
348871d9fc Fix a few testsuite failures
Adjust default property values, skip GtkRange:adjustment.
2017-07-19 21:27:16 -04:00
Timm Bäder
5720f2a845 widget: Make _set_clip private
We don't need this anymore since clips are now reported in
size-allocate.
2017-07-19 21:27:16 -04:00
Timm Bäder
28dae5f1c2 checkmenuitem: Don't always snapshot the indicator
Chaining up will snapshot all child widgets, which doesn't work with
GtkModelMenuItem.
2017-07-19 21:27:16 -04:00
Timm Bäder
8358817ad1 applicationwindow: Remove some useless queue_resize calls
The gtk_widget_{set_parent,unparent} calls before will already cause a
resize when necessary.
2017-07-19 21:27:16 -04:00
Timm Bäder
308f41487d modelmenuitem: Set label on menu items
We have to add a check for GTK_IS_ACCEL_LABEL too now...
2017-07-19 21:27:16 -04:00
Timm Bäder
5116ce19b7 widget: Remove queue_draw_region vfunc
Unused
2017-07-19 21:27:16 -04:00
Timm Bäder
65209da486 widget: Set :focus on focus children 2017-07-19 21:27:16 -04:00
Timm Bäder
d7056f5d22 revealer: Explain CSS oddities 2017-07-19 21:27:16 -04:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
95bd58ac00 widget: Don't propagate size-allocate if only the position changed
We can do this now so we should
2017-07-19 21:27:15 -04:00
Timm Bäder
2e6b1158ee widget: Fix priv dereference in size_allocate_with_baseline
Accessing ->priv is only safe *after* the GTK_IS_WIDGET precondition, so
use the get_instance_private function instead.
2017-07-19 21:27:15 -04:00
Timm Bäder
6d9a0d432a widget: Fix a widget/container mixup 2017-07-19 21:27:15 -04:00
Timm Bäder
3aeaeef070 window: Fix resizing with solid-csd
We can't use a 20px resize handle in that case so fall back to the
padding area of the window. Still ugly but it works.
2017-07-19 21:27:15 -04:00
Timm Bäder
edf0aeb92e gtkapplication: g_dbus_proxy_new_sync can return NULL
Specifically, in the case where @error is set.
2017-07-19 21:27:15 -04:00
Timm Bäder
5fb27e2bd7 window: Fix annotations in get_size and get_position 2017-07-19 21:27:15 -04:00
Timm Bäder
0ebd8840a8 widget: Remove gtk_cairo_transform_to_window
Useless in a world without windows and cairo.
2017-07-19 21:27:15 -04:00
Timm Bäder
f637006b3e popover: Add a contents node
Remove the special case in gtkwidget.c where we didn't draw any css
background/border for popovers. Instead, rely on themes to not style the
popover node and add a contents gizmo that gets the actual css styling.
We then requeste enough space for the popover to draw both the contents
and the arrow on the side.
2017-07-19 21:27:15 -04:00
Timm Bäder
097ab2baed widget: Draw css box after pushing a opacity node 2017-07-19 21:27:15 -04:00
Timm Bäder
e2e91bf9bc Fix a few documentation issues 2017-07-19 21:27:15 -04:00
Timm Bäder
eb34c68ff4 widget: Move get_resize_needed to gtkwidget.c
It's only used in there so we don't need it in the private header.
2017-07-19 21:27:15 -04:00
Timm Bäder
831bcc5e0d notebook: Allocate unmapped tabs 2017-07-19 21:27:15 -04:00
Timm Bäder
c4f6cea111 fix a few documentation problems 2017-07-19 21:27:15 -04:00
Timm Bäder
23f90e3d67 centerbox: Add some missing return value annotations 2017-07-19 21:27:15 -04:00
Timm Bäder
1e4d11b995 box: Ignore baselines when vertical
For now.
2017-07-19 21:27:15 -04:00
Timm Bäder
68c35bbe15 bbox: Don't report a horizontal baseline 2017-07-19 21:27:15 -04:00
Timm Bäder
f0d6cb5f40 widget: Propagate correct baseline 2017-07-19 21:27:15 -04:00
Timm Bäder
e19e3b72a3 widget: Always pass on baselines 2017-07-19 21:27:15 -04:00
Timm Bäder
fb2bb87bb1 widget: Simplify snapshot_child 2017-07-19 21:27:15 -04:00
Timm Bäder
55389cd97c entry: Fix baseline alignment
Since we only look at priv->text_baseline later on, it would be useful
to actually set it to a useful value.
2017-07-19 21:27:15 -04:00
Timm Bäder
0726148ca5 widget: Draw debug nodes for widget margins too 2017-07-19 21:27:15 -04:00
Timm Bäder
fa5203e700 widget: Fix copy&paste error when creating debug nodes 2017-07-19 21:27:15 -04:00
Timm Bäder
6a7d903612 sizerequest: Add more assertions for baselines
min baselines must be <= natural baselines and both must lie inside the
content size of the widget.
2017-07-19 21:27:15 -04:00
Timm Bäder
cef4df1e7e widget: Unset PRELIGHT and ACTIVE state flags in unmap 2017-07-19 21:27:15 -04:00
Timm Bäder
1dd716e66f button: Reset in_button state in unmap
Since at that point the point is clearly not in the button anymore.
2017-07-19 21:27:15 -04:00
Timm Bäder
e276f1e844 label: Fix get_layout_index
Properly translate the given coordinates to layout coordinates. Fixes
clicking links and selecting text.
2017-07-19 21:27:15 -04:00
Timm Bäder
dd9c3fc8ab textview: Invalidate entire widget 2017-07-19 21:27:15 -04:00
Timm Bäder
dc473b4180 textview: Remove size_changed check in size-allocate
It's broken and we only hit size-allocate when the size changes anyway.
2017-07-19 21:27:15 -04:00
Timm Bäder
f7bc5fcae3 linkbutton: Remove useless unrealize implementation 2017-07-19 21:27:15 -04:00
Timm Bäder
c8ca43ad51 stack: Fix under transitions
make sure we initialize both width and height with proper values.
2017-07-19 21:27:15 -04:00
Timm Bäder
2c958df789 eventbox: Remove window 2017-07-19 21:27:15 -04:00
Timm Bäder
82eafb8a2c centerbox: Avoid accessing unset widgets 2017-07-19 21:27:15 -04:00
Timm Bäder
d832001baa textview: Use correct size for cairo node bounds 2017-07-19 21:27:15 -04:00
Timm Bäder
451a991488 window: Move updates debugging to GtkWidget
Which has the necessary information.
2017-07-19 21:27:15 -04:00
Timm Bäder
995903e971 scale: Fix mark positions
Someone else will have to fix the css.
2017-07-19 21:27:15 -04:00
Timm Bäder
4eba9442df range: Fix get_range_rect
get_own_allocation's position is relative to the given widget's origin,
not the parent.
2017-07-19 21:27:15 -04:00
Timm Bäder
468e75e43d range: Fix mark positions
The values returned by gtk_range_compute_slider_position are relative
to the trough_widget (the slider's parent), not the slider widget
itself.
2017-07-19 21:27:15 -04:00
Timm Bäder
ed5b7fedb8 scale: Remove custom indicator drawing
it's a css node so we can simply use the background instead of the
foreground color in the theme.
2017-07-19 21:27:15 -04:00
Timm Bäder
5bb355f06f scale: Fix mark indicator allocations 2017-07-19 21:27:15 -04:00
Timm Bäder
a8561bcc99 headerbar: don't measure own size
This is fallout from an earlier commit, we should be checking the
child's size of course, not repeatedly the headerbar's.
2017-07-19 21:27:15 -04:00
Timm Bäder
e25e1c54a4 levelbar: Don't underallocate block widgets 2017-07-19 21:27:15 -04:00
Timm Bäder
993998085f range: Avoid division by zero 2017-07-19 21:27:15 -04:00
Timm Bäder
4b0da8682d popover: set the shape on the correct window
the parent window is now the toplevel's window.
2017-07-19 21:27:15 -04:00
Timm Bäder
d25af7ce10 switch: Put the slider node last
Makes sense since we draw it over both labels. Also make this obvious by
using the default snapshot implementation.
2017-07-19 21:27:15 -04:00
Timm Bäder
4fb2fc7d89 drawingarea: Remove useless line from code example
backgrounds are drawn automatically now.
2017-07-19 21:27:15 -04:00
Timm Bäder
3dc6d240b3 Fix a few allocation coordinates & sizes 2017-07-19 21:27:15 -04:00
Timm Bäder
2c2867d45d entry: Fix undershoot position 2017-07-19 21:27:15 -04:00
Timm Bäder
6f7387cd25 paned: Fix clip node coordinates 2017-07-19 21:27:15 -04:00
Timm Bäder
aa5cb1648c adwaita: Adjust entry progress styling
Now that the entry>progress node is a full GtkProgressBar, we need to
apply the style to its trough>progress node.
2017-07-19 21:27:15 -04:00
Timm Bäder
84c00d18bb entry: Simplify progress size allocation 2017-07-19 21:27:15 -04:00
Timm Bäder
f520700b13 calendar: Remove all input windows
and simultaneously fix input! \o/
2017-07-19 21:27:15 -04:00
Timm Bäder
3fc49ce8a1 entry: Fix text position
We need to adjust the layout coordinates depending on priv->text_x,
sinec that one accounts for the width of the left icon.
2017-07-19 21:27:15 -04:00
Timm Bäder
a0f3497939 treeview: Remove bin_window 2017-07-19 21:27:15 -04:00
Timm Bäder
26e1491c70 label: Use the correct size in snapshot() 2017-07-19 21:27:15 -04:00
Timm Bäder
3252630a4b aboutdialog: Remove unused image 2017-07-19 21:27:15 -04:00
Timm Bäder
42aa7453ab Fix baselines wrt css values
The reported minimum baseline is for the reported min height, but if the
css min-height is greater than that, we need to account for that fact
when saving the baseline.

Since the reported baseline is relative to the widget's origin, we also
need to add the top values for margin, border and padding to the
reported baseline.
2017-07-19 21:27:14 -04:00
Timm Bäder
ea3876d26a widget: black is the new red 2017-07-19 21:27:14 -04:00
Timm Bäder
45c0439dd4 notebook: Fix css node ordering
Aaand all the unit tests pass again.
2017-07-19 21:27:14 -04:00
Timm Bäder
8dc5e13e8c iconview: Remove bin_window 2017-07-19 21:27:14 -04:00
Timm Bäder
fb1d2719d9 entry: Fix node ordering
Fix the icon order
2017-07-19 21:27:14 -04:00
Timm Bäder
a9f10a2d56 paned: Remove assertion in get_child_property
Passing the third child (the pane separator) is possible and shouldn't
cause the process to abort.
2017-07-19 21:27:14 -04:00
Timm Bäder
51e25aaff4 main: Protect against non-GtkWindow toplevels 2017-07-19 21:27:14 -04:00
Timm Bäder
5fbe26f396 inspector: Use GtkWidget::pick when picking widgets 2017-07-19 21:27:14 -04:00
Timm Bäder
f9f6f3027d container: Remove get_children_clip
Unused.
2017-07-19 21:27:14 -04:00
Timm Bäder
27202ff6cb stack: Compute clip directly 2017-07-19 21:27:14 -04:00
Timm Bäder
c0f6a97eed buttonbox: Compute clip directly 2017-07-19 21:27:14 -04:00
Timm Bäder
7012950f9f modelbutton: Compute clip directly 2017-07-19 21:27:14 -04:00
Timm Bäder
8645dd1030 flowbox: Compute clip directly 2017-07-19 21:27:14 -04:00
Timm Bäder
f1813e8f88 spinbutton: Fix gesture state
We claimed the gesture previously to keep it from propagating to the
underlying entry, but now that the entry is in a box with the two
buttons, we can do this properly and restore the previous long-press
behavior.
2017-07-19 21:27:14 -04:00
Timm Bäder
333b52bc14 checkmenuitem: Fix indicator state
We need to remove the inconsistent and checked state first so we
actually remove it.
2017-07-19 21:27:14 -04:00
Timm Bäder
bc4c32505a menu: Popup at window coordinates if widget is given
Since widget allocations are now relative to the parent's origin, we
need to pass the window allocation here.
2017-07-19 21:27:14 -04:00
Timm Bäder
8dd29d755c window: Don't use allocated size in snapshot
Those are the wrong values.
2017-07-19 21:27:14 -04:00
Timm Bäder
bda2f4f582 popover: Create subsurface on wayland 2017-07-19 21:27:14 -04:00
Timm Bäder
2cbaa998db widget: Fix drawing invalidation with windowed widgets
E.g. popovers. Find the parent of the given widget with the window and
invalidate the given region in that window.
2017-07-19 21:27:14 -04:00
Timm Bäder
bc807789ba popover: "Fix" child allocation
This is still wrong but will be fixed in the future.
2017-07-19 21:27:14 -04:00
Timm Bäder
79797cd162 window: Stop wrapping popovers in another window
GtkPopover is already a windowed widget.
2017-07-19 21:27:14 -04:00
Timm Bäder
c2abb698be Replace a few get_content_allocation calls with get_content_size
The position of the content allocation is almost never relevant since
it's 0/0 for measure, size_allocate and snapshot.
2017-07-19 21:27:14 -04:00
Timm Bäder
e36ddfec17 Remove all widget style property code 2017-07-19 21:27:14 -04:00
Timm Bäder
cc60046ae9 treeviewaccessible: Don't rely on nonexistent style properties
The expander-size style property has been gone for a long time.
2017-07-19 21:27:14 -04:00
Timm Bäder
7b9b116ad6 adwaita: Remove style properties
They don't exist anymore.
2017-07-19 21:27:14 -04:00
Timm Bäder
07063d82aa notebook: Remove style properties
Hardcode the default values until someone comes up with a proposal for a
better way.
2017-07-19 21:27:14 -04:00
Timm Bäder
61dd8f92b8 calendar: Remove style properties
Hardcode the default values until someone comes and fixes the actual
widget.
2017-07-19 21:27:14 -04:00
Timm Bäder
a826ee37ca widget: Remove _set_simple_clip
Unused.
2017-07-19 21:27:14 -04:00
Timm Bäder
1535cab936 spinner: Use get_content_size 2017-07-19 21:27:14 -04:00
Timm Bäder
6b9d10039d pathbar: Compute widget clip directly
Instead of relying on gtk_widge_set_simple_clip
2017-07-19 21:27:14 -04:00
Timm Bäder
f40c61fb40 toolitem: Remove size_allocate implementation
A GtkToolItem is a GtkBin and that already does exactly what this
implementation did.
2017-07-19 21:27:14 -04:00
Timm Bäder
1bad3e1f28 widget: Transform clips into right coordinate space
The values passed to gtk_widget_set_clip are relative to the widget's
origin, but we need the values to be relative to priv->allocation.
2017-07-19 21:27:14 -04:00
Timm Bäder
e501bc6028 paned: Draw handle separator at the right location 2017-07-19 21:27:14 -04:00
Timm Bäder
5228e018b6 paned: Make sure we set the correct clips
They are still too big, i.e. clipped-off children enlarge the paned's
clip but at least redrawing works and smaller clips are just an
optimization.
2017-07-19 21:27:14 -04:00
Timm Bäder
24abbac114 switch: Remove in_switch flag
It's pretty simple and less code to just check whether the gesture
coords are inside the widget at the one place where we actually used the
flag.
2017-07-19 21:27:14 -04:00
Timm Bäder
63ba8fa355 widget: Consider opacity when drawing toplevels
This used to work in gtk3 and is used e.g. in the inspector when using
wayland.
2017-07-19 21:27:14 -04:00
Timm Bäder
63158fd3ff switch: Fix handle dragging with padding applied
We only move the handle inside the content allocation, so we need to use
the content width when calculating the new handle_pos.
2017-07-19 21:27:14 -04:00
Timm Bäder
a73d3418bc layout: Remove bin_window 2017-07-19 21:27:14 -04:00
Timm Bäder
8123ea8f3f fixed: Remove window 2017-07-19 21:27:14 -04:00
Timm Bäder
a4d2da76b3 button: Fix in_button checks
The gesture coords are relative to the button's origin, so use
gtk_widget_get_own_allocation to check if the coords are inside the
button.
2017-07-19 21:27:14 -04:00
Timm Bäder
12fdb19d63 expander: Fix pressed_in_title check
gesture coords are relative to the expander widget, the title allocation
is relative to the box child.
2017-07-19 21:27:14 -04:00
Timm Bäder
b5aa1982c9 Remove GtkCssGadget 2017-07-19 21:27:14 -04:00
Timm Bäder
7b5c12c7dc iconhelper: Inherit from GObject
Nothing is using any gadget API on iconhelpers anymore.
2017-07-19 21:27:14 -04:00
Timm Bäder
70d90a9923 spinbutton: Remove unused import 2017-07-19 21:27:14 -04:00
Timm Bäder
3077198de0 scrolledwindow: Fix indicator hiding
Only hiding the indicator if the widget is not mapped won't work.
2017-07-19 21:27:14 -04:00
Timm Bäder
ac4660b4c4 checkmenuitem: Fix indicator allocation
base point is the menu item's content allocation now.
2017-07-19 21:27:14 -04:00
Timm Bäder
1c5eec92fe range: Fix slider allocation 2017-07-19 21:27:14 -04:00
Timm Bäder
b17d998eb5 widget: Add new allocation accessors 2017-07-19 21:27:14 -04:00
Timm Bäder
15cacf485a Remove GtkCssCustomGadget
Unused.
2017-07-19 21:27:14 -04:00
Timm Bäder
078e599ac5 entry: Replace progress gadget with a progressbar 2017-07-19 21:27:14 -04:00
Timm Bäder
c56bad4be5 scrollbar: notify when setting the orientation 2017-07-19 21:27:14 -04:00
Timm Bäder
58ed506c59 GtkAccelLabel: Add use-underline property 2017-07-19 21:27:14 -04:00
Timm Bäder
a0ebad70cd spinbutton: Fix property notification 2017-07-19 21:27:14 -04:00
Timm Bäder
4d74129c61 entry: Use images for icons 2017-07-19 21:27:14 -04:00
Timm Bäder
00d720d8a4 image: Add private _get_definition 2017-07-19 21:27:14 -04:00
Timm Bäder
25034b6f87 label: Fix layout snapshot coordinates
No need to convert anything to "window coordinates" anymore.
2017-07-19 21:27:14 -04:00
Timm Bäder
9e43d267bd scrolledwindow: Fix scrollbar allocations
Use the content size everywhere. Fixes scrollbar positions with padding
and/or css borders applied to the scrolledwindow.
2017-07-19 21:27:14 -04:00
Timm Bäder
3a20bc5e9a scrolledwindow: Fix on_scrollbar check
The event widget is always the toplevel window, so use the event target
and check the GtkScrollbar ancestor.
2017-07-19 21:27:14 -04:00
Timm Bäder
30f516ff1f range: Use a gizmo as slider
No need for this to be a GtkIcon.
2017-07-19 21:27:14 -04:00
Timm Bäder
3f429eb197 entry: get_layout_location coords are already content relative 2017-07-19 21:27:14 -04:00
Timm Bäder
225306a21e image: Fold gtk_image_reset into only caller 2017-07-19 21:27:14 -04:00
Timm Bäder
360b075164 widget: Avoid some type checks in snapshot_child 2017-07-19 21:27:13 -04:00
Timm Bäder
f50bbb10df menu: Remove bin_window and view_window 2017-07-19 21:27:13 -04:00
Timm Bäder
e2ce407f2c modelmenuitem: Fix type checking assertions
GtkAccelLabel is not a GtkLabel anymore
2017-07-19 21:27:13 -04:00
Timm Bäder
34f6f9bfe6 iconview: Stop drawing a background
GtkWidget is doing that automatically now.
2017-07-19 21:27:13 -04:00
Timm Bäder
99b00b4d9c sizerequest: Assert that min_size >= 0
This should generally be true, so remove the checks from gtkbox.c and
move it into gtksizerequest.c
2017-07-19 21:27:13 -04:00
Timm Bäder
ab1e8502e7 revealer: Fix DOWN and RIGHT transition types
Since we lost the bin_window, we now have to allocate the child widget
at a negative position when using these transition types.
2017-07-19 21:27:13 -04:00
Timm Bäder
ec1984bd93 revealer: Request child size for NONE transition type
Previously, we would request a size of 0×0 when the transition type was
NONE and the child un-revealed, making the revealer in this case a
gtk_widget_set_visible replacement. Instead, to the exact same thing we
do in the CROSSFADE case and request the child size instead. This also
keeps the revealer from under allocating the child when the transition
type is set to NONE.
2017-07-19 21:27:13 -04:00
Timm Bäder
9e50447253 stack: Remove bin_window 2017-07-19 21:27:13 -04:00
Timm Bäder
12d2679aac revealer: Remove bin_window 2017-07-19 21:27:13 -04:00
Timm Bäder
5688b8a663 toolitemgroup: Remove child window 2017-07-19 21:27:13 -04:00
Timm Bäder
9350a0f85b popover: Remove useless if case
rect is not nullable, so stop checking if it is NULL and instead add a
g_return_val_if_fail guard.
2017-07-19 21:27:13 -04:00
Timm Bäder
2b06986c38 widget: "fix" event and invalidation coordinates 2017-07-19 21:27:13 -04:00
Timm Bäder
b8cc22a552 window: Remove dead code
This case can never happen since GtkWindow instances never have a
parent.
2017-07-19 21:27:13 -04:00
Timm Bäder
dc93903cd3 image: Fix snapshot position 2017-07-19 21:27:13 -04:00
Timm Bäder
2687a9d132 entry: Fix text position 2017-07-19 21:27:13 -04:00
Timm Bäder
241a009938 widget: Adapt translate_coordinates to coordinate changes 2017-07-19 21:27:13 -04:00
Timm Bäder
e3bd1e10e8 scrolledwindow: fix scrollbar allocation 2017-07-19 21:27:13 -04:00
Timm Bäder
fa97b270f1 paned: Remove useless queue_resize calls
This is done by gtk_widget_unparent nowadays
2017-07-19 21:27:13 -04:00
Timm Bäder
4a4897a9b6 paned: Reimplement handle dragging 2017-07-19 21:27:13 -04:00
Timm Bäder
d3e88ed5a6 icon: Stop offset'ing in snapshot
The snapshot is not offset to the content allocation when ->snapshot is
called.
2017-07-19 21:27:13 -04:00
Timm Bäder
d3beea2c3d frame: Fix child allocation
Don't add the parent's allocation from gtk_widget_get_allocation
2017-07-19 21:27:13 -04:00
Timm Bäder
bccaeb0e2d widget: Make allocations parent-content-allocation relative 2017-07-19 21:27:13 -04:00
Timm Bäder
ec6184c2af widget: Remove queue_draw_child vfunc 2017-07-19 21:27:13 -04:00
Timm Bäder
c462105d78 viewport: Remove bin_window 2017-07-19 21:27:13 -04:00
Timm Bäder
58320c02ea scrolledwindow: Properly remove scrollbars
Instead of keeping an extra ref, then unparent+destroy+unref, don't keep
an extra ref and just unparent the scrollbar when appropriate.
2017-07-19 21:27:13 -04:00
Timm Bäder
357e0db4c9 listbox: Remove manual prelight row management
This works automatically now.
2017-07-19 21:27:13 -04:00
Timm Bäder
5aeb25f460 switch: Remove manual PRELIGHT code
This works automatically now
2017-07-19 21:27:13 -04:00
Timm Bäder
c2717a887d listbox: Remove view_window 2017-07-19 21:27:13 -04:00
Timm Bäder
b9f70b473c scrollbar: Add new API to gtk4-sections.txt
and update the css node docs
2017-07-19 21:27:13 -04:00
Timm Bäder
0a70ec2d36 bin: Drop priv pointer 2017-07-19 21:27:13 -04:00
Timm Bäder
cc7038b740 filechooserwidget: Fix save widgets
Now that GtkFileChooserWidget is not a GtkBox anymore, we can't just
gtk_box_pack_start child widgets to it.
2017-07-19 21:27:13 -04:00
Timm Bäder
24f79bbae4 Remove some unneeded includes 2017-07-19 21:27:13 -04:00
Timm Bäder
cb8031fde3 inspector: Allow picking children of GtkWidget classes 2017-07-19 21:27:13 -04:00
Timm Bäder
34af3d3940 accellabel: Inherit from GtkWidget
Use a box and 2 labels.
2017-07-19 21:27:13 -04:00
Timm Bäder
01cdcec3ea textview: Use ::snapshot 2017-07-19 21:27:13 -04:00
Timm Bäder
ae5d3a20a8 tooltipwindow: Remove unused define 2017-07-19 21:27:13 -04:00
Timm Bäder
665c9aba31 listbox: Remove rows directly when binding model
Instead of hopping through 7 different functions to do that, just
remove all rows directly. This also mean we'll only remove rows and not
other children that've been added like placeholders.
2017-07-19 21:27:13 -04:00
Timm Bäder
a9f9ef3f53 box: Use widget children list in count_expand_children
It's still less dereferencing than the previous code.
2017-07-19 21:27:13 -04:00
Timm Bäder
3babd184c0 scale: Fix css node ordering and expected results
Add :dir(ltr) where expected, i.e. everywhere we now have a widget but
had a gadget before.
Also, fix the expected output to expect mark subnodes in the order
specified in the GtkScale does, i.e.

├── mark
    ├── [label]
    ╰── indicator

for marks at the top of the scale and

├── mark
    ├── indicator
    ╰── [label]

For marks at the bottom of the scale.
2017-07-19 21:27:13 -04:00
Timm Bäder
121cf9c78c spinbutton: Add docs for new public API 2017-07-19 21:27:13 -04:00
Timm Bäder
73f5f45456 widget: Draw widget clips with GEOMETRY debugging 2017-07-19 21:27:13 -04:00
Timm Bäder
3e555e1646 image: Offset rendering to the content allocation 2017-07-19 21:27:13 -04:00
Timm Bäder
90c8a3f920 widget: Bring back layout debugging 2017-07-19 21:27:13 -04:00
Timm Bäder
ac1d3cb396 paned: Replace handle gadget with widget 2017-07-19 21:27:13 -04:00
Timm Bäder
ec51c63313 widget: Bring resize and baseline debug rendering back 2017-07-19 21:27:13 -04:00
Timm Bäder
790c153b2c range: Fix click detection in slider trace
The x/y/ coordinates are relative to the range allocation, so take that
into account.
2017-07-19 21:27:13 -04:00
Timm Bäder
2ac8ebe9f7 treeview: default to width_changed = TRUE
Checking the given GtkAllocation against the current allocation insize
::size-allocate doesn't really work anymore. They are only different if
the content allocation (the one passed) and the widget allocation (the
current one) are different, so e.g. when the widget has padding >0
applied.
2017-07-19 21:27:13 -04:00
Timm Bäder
70a58fd83a icon: Render at content position
Since we get offset automatically to the widget allocation before
->snapshot is called, we still have to offset the difference to the
position of the content allocation.
2017-07-19 21:27:13 -04:00
Timm Bäder
071c205c92 switch: Use a gizmo as slider
The button was jut a stop-gap solution before GtkGizmo existed.
2017-07-19 21:27:13 -04:00
Timm Bäder
b344267e6c button: Don't care about sizing if no child is set
We don't need to care in this case since the default values should
always be assumed to be 0, and setting a baseline of 0 is just wrong
when orientation == HORIZONTAL, it should be -1 (or unset).
2017-07-19 21:27:13 -04:00
Timm Bäder
0bab8b8e0e Remove GtkBoxGadget
Now unused
2017-07-19 21:27:13 -04:00
Timm Bäder
4f0140fa6c Remove GtkBuiltinIcon
Now unused.
2017-07-19 21:27:13 -04:00
Timm Bäder
efd7b38abc checkbutton: stop using gadgets 2017-07-19 21:27:13 -04:00
Timm Bäder
495fba41db modelbutton: Use GtkIcon as indicator 2017-07-19 21:27:13 -04:00
Timm Bäder
ed38b1c365 icon: Add _set_css_name back 2017-07-19 21:27:13 -04:00
Timm Bäder
d5167eb61c colorswatch: Replace IconHelper with GtkImage 2017-07-19 21:27:13 -04:00
Timm Bäder
dd713e0ae2 widget: Consider css margins when setting clip
This is optional for positive margins as they just increase the widget
allocation. However, with negative css margins, the allocation is
smaller than the clip.

This fixes scale sliders leaving a small trail behind.
2017-07-19 21:27:13 -04:00
Timm Bäder
a3b9adaa68 adwaita: Fix typo
marks_lenght -> marks_length
2017-07-19 21:27:13 -04:00
Timm Bäder
f1c1e52eea container: GtkActionBar is not a special container anymore 2017-07-19 21:27:13 -04:00
Timm Bäder
2d29183aa8 progressbar: Apply style classes when setting direction
We might have to change .top to .left etc. when changing the direction
of the progressbar.
2017-07-19 21:27:13 -04:00
Timm Bäder
218e0b9929 spinbutton: Use 0 as default for (max-)width-chars
This mimics the old spinbutton size request better.
2017-07-19 21:27:13 -04:00
Timm Bäder
b3f45cf1fe range: Emit value-changed when setting the adjustment
After all, the value kind of just changed.
2017-07-19 21:27:13 -04:00
Timm Bäder
5204fd5ea1 scale: Replace all gadgets with widgets 2017-07-19 21:27:13 -04:00
Timm Bäder
7448d137f3 scale: Remove draw_value vfunc
Unused.
2017-07-19 21:27:13 -04:00
Timm Bäder
af9d0cdffb range: Return trough allocation from _get_range_rect 2017-07-19 21:27:13 -04:00
Timm Bäder
6f2145be00 notebook: Replace all gadgets with widgets 2017-07-19 21:27:13 -04:00
Timm Bäder
07cbbc6fa9 container: Propagate child properties if parent != container
This can happen when e.g. GtkNotebook adds the child page widgets not
directly inside the notebook, but inside the inner GtkStack.
2017-07-19 21:27:12 -04:00
Timm Bäder
2bf1c09f65 adwaita: Fix notebook theming
the header and the stack nodes are now inside a box node.
2017-07-19 21:27:12 -04:00
Timm Bäder
11207505e3 gizmo: Unparent all child widgets in finalize 2017-07-19 21:27:12 -04:00
Timm Bäder
017dfc132d gizmo: Chain up in snapshot if no snapshot func given
I.e. when gizmo users just want to draw child widgets anyway and don't
do any custom drawing, they can simply pass NULL.
2017-07-19 21:27:12 -04:00
Timm Bäder
0c0a402433 notebook: Replace tab gadget with GtkGizmo 2017-07-19 21:27:12 -04:00
Timm Bäder
8edf10103e notebook: Replace tabs gadget with GtkGizmo 2017-07-19 21:27:12 -04:00
Timm Bäder
195ca06c2c notebook: Replace arrow gadgets with GtkIcons 2017-07-19 21:27:12 -04:00
Timm Bäder
8b1b0f4efd icon: Add _set_image 2017-07-19 21:27:12 -04:00
Timm Bäder
7c77fd9e62 menu: Replace arrow gadgets with GtkIcons 2017-07-19 21:27:12 -04:00
Timm Bäder
fb78c3b7e8 checkmenuitem: Replace indicator gadget with GtkIcon 2017-07-19 21:27:12 -04:00
Timm Bäder
2876790cc3 icon: Only draw in content allocation 2017-07-19 21:27:12 -04:00
Timm Bäder
273aa2be61 menuitem: Replace arrow gadget with GtkIcon 2017-07-19 21:27:12 -04:00
Timm Bäder
753e915f87 scrollbar: Add accessor for wheel delta
Make the one in gtkrange.c static since it was only ever used from
GtkScrolledWindow.
2017-07-19 21:27:12 -04:00
Timm Bäder
706bc08b68 range: Draw the colorscale trough at 0,0 2017-07-19 21:27:12 -04:00
Timm Bäder
2e62072cbc range: Allocate the trough when the adjustment value changes
So it repositions the slider.
2017-07-19 21:27:12 -04:00
Timm Bäder
38ff761313 range: Fix mouse location tracking 2017-07-19 21:27:12 -04:00
Timm Bäder
afddfc2397 range: Snapshot slider in trough's snapshot impl 2017-07-19 21:27:12 -04:00
Timm Bäder
d1be5f2941 spinner: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
6e74975e41 range: make the slider a gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
c7c08cf9a1 icon: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
ba6ba94184 range: Use gizmos for highlight and fill gadgets 2017-07-19 21:27:12 -04:00
Timm Bäder
395185896f range: Use a gizmo as trough 2017-07-19 21:27:12 -04:00
Timm Bäder
90cc401f1a range: Remove contents gadget
It's not needed anymore since the range only has one child gadget: the
trough.
2017-07-19 21:27:12 -04:00
Timm Bäder
7e525ca63b range: Remove steppers
Add them back into the new scrollbars later
2017-07-19 21:27:12 -04:00
Timm Bäder
86a2156d17 scrolledwindow: Use scrollbar API on scrollbars 2017-07-19 21:27:12 -04:00
Timm Bäder
5049b35fc6 range: Make GtkRange a regular class 2017-07-19 21:27:12 -04:00
Timm Bäder
4dc5790058 scrollbar: Inherit from GtkWidget 2017-07-19 21:27:12 -04:00
Timm Bäder
55fc120134 calendar: Remove custom css background and border drawing 2017-07-19 21:27:12 -04:00
Timm Bäder
4d4b224a61 eventbox: Remove snapshot implementation 2017-07-19 21:27:12 -04:00
Timm Bäder
70613c9128 toolpalette: Port to snapshot() 2017-07-19 21:27:12 -04:00
Timm Bäder
7ddd497f69 toolitemgroup: Remove custom draw code
GtkWidget does it automatically now
2017-07-19 21:27:12 -04:00
Timm Bäder
a735dd44cb searchbar: Fix property documentation comments
They are properties of GtkSearchBar, not GtkEntry.
2017-07-19 21:27:12 -04:00
Timm Bäder
4823b9f2d7 searchbar: Remove manual snapshot code 2017-07-19 21:27:12 -04:00
Timm Bäder
2e4df25a1d menu: Stop drawing css background and border
GtkWidget does it now
2017-07-19 21:27:12 -04:00
Timm Bäder
1a1f9fd03c menu: Remove unnecessary queue_draw 2017-07-19 21:27:12 -04:00
Timm Bäder
c35a78110c menu: Stop looking at padding and margin manually 2017-07-19 21:27:12 -04:00
Timm Bäder
8d2d2ae07f button: Remove unused flag 2017-07-19 21:27:12 -04:00
Timm Bäder
720bb9eede checkbutton: Don't draw a focus ring
GtkWidget does it for us now.
2017-07-19 21:27:12 -04:00
Timm Bäder
df28f3d771 meson: Remove double gtkcssnode.c entry in source files 2017-07-19 21:27:12 -04:00
Timm Bäder
9ab43dfe9e spinbutton: Add accessors for (max-)width-chars 2017-07-19 21:27:12 -04:00
Timm Bäder
6aa9ca7b55 spinbutton: Fix activation 2017-07-19 21:27:12 -04:00
Timm Bäder
88550b5d55 inspector: Show the GdkWindow before grabbing
Gets rid of a critical when trying to inspect widgets.
2017-07-19 21:27:12 -04:00
Timm Bäder
2651fcbef9 widget: Special-case popover in snapshot
Just like we do it for GtkWindow.
2017-07-19 21:27:12 -04:00
Timm Bäder
1d4d5b2eb9 popover: Stop looking at padidng and border in measure
GtkWidget does it for us now
2017-07-19 21:27:12 -04:00
Timm Bäder
a5b25d452a boxgadget: Remove unused ComputeExpandFunc 2017-07-19 21:27:12 -04:00
Timm Bäder
0845246fb8 menuitem: Remove gadget
Now that GtkCheckMenuItem isn't using it anymore, we also don't need it.
2017-07-19 21:27:12 -04:00
Timm Bäder
022a3d76d9 checkmenuitem: Stop using the parent's gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
2234d100ad expander: Inherit from GtkContainer
This fixes the expansion not working. As a GtkBin, GtkExpander can only
have one child and if that's a GtkBox (and not the one added through
gtk_expander_add), things go wrong.
2017-07-19 21:27:12 -04:00
Timm Bäder
a2f7a076ac inspector: Fix list row alignment in general tab 2017-07-19 21:27:12 -04:00
Timm Bäder
8bf3b2d5e4 scrolledwindow: Remove useless function call
We never use the result.
2017-07-19 21:27:12 -04:00
Timm Bäder
5b51936676 scrolledwindow: Fix child widget positioning
Instead of relying on get_relative_allocation, just use the
scrolledwindow's content allocation we get passed to size-allocate.
2017-07-19 21:27:12 -04:00
Timm Bäder
cfd67eb4ec scrolledwindow: Remove last argument from allocate_child
We never use that when calling gtk_scrolled_window_allocate_child.
2017-07-19 21:27:12 -04:00
Timm Bäder
9e79684762 range: Remove gadget completely 2017-07-19 21:27:12 -04:00
Timm Bäder
2cedf1be9c widget: Remove gtk_widget_set_allocation 2017-07-19 21:27:12 -04:00
Timm Bäder
60e053f52a Remove calls to gtk_widget_set_allocation
gtk_widget_size_allocate_with_baselines does it automatically now.
2017-07-19 21:27:12 -04:00
Timm Bäder
cd6a8bff8f revealer: Stop calculating paddings ourselves
GtkWidget does it not for all widgets.
2017-07-19 21:27:12 -04:00
Timm Bäder
04fcb1f17f revealer: Don't add a clip node for CROSSFADE transitions
We don't need them there as we just change the opacity of the revealer.
2017-07-19 21:27:12 -04:00
Timm Bäder
c76804b1f2 cellview: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
1d782b8930 scale: Fix value position
by not using the range's gadget which is not allocated to any position
anymore.
2017-07-19 21:27:12 -04:00
Timm Bäder
a71edd2925 widget: Add private get_margin_allocation 2017-07-19 21:27:12 -04:00
Timm Bäder
2ba07901db buttonbox: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
dc4bdc2021 stack: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
ede6f2ab59 Slightly rework clip handling
always initialize clips to the (content) allocation, don't walk up the
widget hierarchy in gtk_widget_set_clip, implement
gtk_widget_size_allocate in GtkSeparator. This way we don't end up using
uninitialized clip values.

The entire clip handling is up for major rework since we can't and don't
want to force every single widget to call _set_clip in size-allocate
implementations.
2017-07-19 21:27:12 -04:00
Timm Bäder
28b18129b5 button: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
c3ffad1fb3 gtkscale: Properly initialize the clip 2017-07-19 21:27:12 -04:00
Timm Bäder
c87be0a27a widget: Don't set the allocation in size-allocate
If widgets chain up in their size-allocate implementation, they pass the
content allocation and not the widget allocation which will cause the
wrong allocation to be set.
2017-07-19 21:27:12 -04:00
Timm Bäder
bf118eca80 label: Don't chain up in size_allocate
It's unnecessary now.
2017-07-19 21:27:12 -04:00
Timm Bäder
671c5ac434 frame: Fix copy&paste bug in shadow-type handling
If the given shadow_type is none NONE, we have to remove the .flat style
class of course, not add it.
2017-07-19 21:27:12 -04:00
Timm Bäder
49476053e3 paned: Remove gadget 2017-07-19 21:27:12 -04:00
Timm Bäder
83b590cd78 combobox: Remove gadget 2017-07-19 21:27:11 -04:00
Timm Bäder
ff6db012d9 widget: Add private get_border_allocation 2017-07-19 21:27:11 -04:00
Timm Bäder
5e3b866370 flowbox: Remove gadgets 2017-07-19 21:27:11 -04:00
Timm Bäder
3f5626a3f7 viewport: Remove gadget 2017-07-19 21:27:11 -04:00