Matthias Clasen
93aac8a86c
notebook: Document the .dnd style class
...
We should aim to document all style classes that themes
can encounter during the normal operation of a widget.
2016-01-13 00:24:40 -05:00
Matthias Clasen
ea4cff1ea4
Use convenience API that was introduced recently
...
Use gtk_css_gadget_set_state in all the places where we previously
were getting a node from a gadget, just to call gtk_css_node_set_state.
2016-01-13 00:19:31 -05:00
Matthias Clasen
64b499be66
builtin icon: Don't save/restore cairo state
...
The reason why this was introduced is now handled in
gtk_css_stylke_render_icon since commit
0138af9f96
.
2016-01-13 00:01:14 -05:00
Matthias Clasen
c71089a038
box gadget: Add some documentation
2016-01-12 23:57:35 -05:00
Matthias Clasen
2677eee720
box: Document child node ordering
2016-01-12 23:40:28 -05:00
Timm Bäder
b8db48079f
switch: Fix text positioning
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:53 +01:00
Timm Bäder
a8ceeb1766
switch: Don't include margins in input window size
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:53 +01:00
Timm Bäder
ff7e2797f6
modelbutton: Don't include margins in input window size
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:49 +01:00
Timm Bäder
788ee466b8
button: Don't include margins in input window size
...
And do the same thing for GtkCheckButton
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:44 +01:00
Timm Bäder
19fa893067
entry: typo
2016-01-12 21:54:45 +01:00
Matthias Clasen
c5d3556f98
HighContrast: Fix selection in .views
...
Copy Adwaita fixes from 21a2fce8ba
.
2016-01-11 23:20:26 -05:00
Matthias Clasen
52a34d32bb
Fix corner manipulation when growing rounded rects
...
This addresses problems with uneven border radius',
pointed out by Lapo.
2016-01-11 22:49:40 -05:00
Ben Iofel
7e5952c4ea
GTK Notebook: use the right enum type
2016-01-11 19:16:36 -05:00
Lapo Calamandrei
1c3bad3d90
Adwaita: popover style fixes
2016-01-12 01:03:47 +01:00
Lapo Calamandrei
21a2fce8ba
Adwaita: make selection visible in treeview derived widgets
...
See https://bugzilla.gnome.org/show_bug.cgi?id=757503
2016-01-12 00:16:12 +01:00
Hashem Nasarat
473433c93d
Adwaita: fix separator margin in popovers
...
Commit 0b96b8a1
set margins via css, but accidentally changed the
semantics of margins for separators in popovers so that any separator
in a gtkpopover had a margin. This meant that the separators in
GtkListBoxes in popovers also had a margin around their separators, and
this is not what we want because it doesn't match separators in
listboxes not in popovers.
https://bugzilla.gnome.org/show_bug.cgi?id=760427
2016-01-11 23:40:25 +01:00
Carlos Garnacho
0167f7c65c
GtkWidget: Fix motion event consumption detection for touch-only gestures
...
If a GtkGestureSingle is set as touch-only, pointer events would be
discarded without giving an opportunity to the regular GtkGesture
handler to manage those.
Because the pointer events weren't actually managed by the gesture,
gtk_gesture_get_sequence_state() (rather unhelpfully here) will resort
to returning GTK_EVENT_SEQUENCE_NONE, which is in turn interpreted
by _gtk_widget_consumes_motion() as "may be handling the events for
this sequence", because gestures in this state presumably handle
the events, just that it's not "claimed" yet.
Instead, use gtk_gesture_handles_sequence(), which will perform the
expected check on the event sequence being managed, as we expect
here.
2016-01-11 20:16:06 +01:00
Matthias Clasen
32eda187ee
Actually deprecate GtkNotebook::has-tab-gap
2016-01-11 13:58:37 -05:00
Matthias Clasen
990be25d63
notebook: Update CSS node docs
...
The stack node is new.
2016-01-11 13:55:23 -05:00
Benjamin Otte
3a8dc01ed2
notebook: Don't reparent tab label when drag stops
...
Use the same unrealize + set_parent_window() trick that we used in
6d5edd18cf
when dragging starts.
2016-01-11 17:52:38 +01:00
Benjamin Otte
b917a0b155
notebook: Add .dnd style class to tabs during reorder
2016-01-11 17:46:15 +01:00
Benjamin Otte
6d5edd18cf
notebook: Don't unparent tab label for drag
...
When a tab drag starts, we need to move the tab label into the drag
window via gtk_widget_set_parent_window().
If we don't unparent, but just unrealize the widget, we don't lose the
cssnode position.
2016-01-11 17:06:46 +01:00
Benjamin Otte
fdc13f315b
notebook: Don't limit motion notify framerate
...
We have a frameclock for that these days.
In particular, this limiting worked at 45fps when monitors are all 60fps.
2016-01-11 17:06:46 +01:00
Benjamin Otte
d74c1bfd84
notebook: Remove outdated style properties from themes
...
No replacement provided, the notebook will have to be redone anyway.
2016-01-11 17:06:46 +01:00
Benjamin Otte
8020d5f93a
notebook: Don't store gadget allocation twice
...
If we care about a gadget's allocation, we can ask it. There's no need
to store it in GtkNotebookPage.allocation.
2016-01-11 17:05:24 +01:00
Benjamin Otte
2ef3b01442
notebook: No need to recompute remaining space
...
The value is correct.
In particular, subtracting width on notebooks with tabs on left/right is
a very bad idea.
2016-01-11 17:05:24 +01:00
Benjamin Otte
4c083f8182
notebook: Port arrows to be gadgets
...
Also deprecate the arrow-spacing style property.
2016-01-11 17:05:24 +01:00
Benjamin Otte
326fda1b0e
notebook: Pass full allocation instead of min and max value
2016-01-11 17:05:24 +01:00
Benjamin Otte
96f0cf7677
notebook: Pass allocation as argument
...
... instead of querying it later.
2016-01-11 17:05:23 +01:00
Benjamin Otte
6b8c191096
notebook: Simplify allocation code
2016-01-11 17:05:23 +01:00
Benjamin Otte
0e48216c48
notebook: Identify existence of arrows differently
...
Instead of having gbooleans in the priv struct, just look at the
existence of priv->arrow_node[i].
2016-01-11 17:05:23 +01:00
Benjamin Otte
a12e1328e9
notebook: Convert tab nodes to gadgets
...
The code does many bad things, so we get a lot of warning spew. Ignore
this for now, fixes will follow.
2016-01-11 17:05:23 +01:00
Benjamin Otte
d780ce3ff3
notebook: Assume tab allocations always change
...
This causes more redraws, but saves a bunch of code.
2016-01-11 17:05:23 +01:00
Benjamin Otte
7e0c7f7deb
notebook: Remove weird hack where the current page was special-cased
...
I don't even know what it does, but it assumed that the current page was
always as large or larger than any other page. And that isn't true.
2016-01-11 17:05:23 +01:00
Benjamin Otte
3cda7e9503
boxgadget: Handle css nodes
...
Automatically insert the cssnode into the box gadget's node's children at
the right place and remove it again when done.
2016-01-11 17:05:23 +01:00
Benjamin Otte
a9320d93f6
notebook: Replace redraw_tabs() with gadget_queue_draw(tabs_gadget)
2016-01-11 17:05:23 +01:00
Benjamin Otte
f83c1fedbc
notebook: Don't queue redraw of tabs junction
...
There is no junction anymore, so don't try to redraw it.
2016-01-11 17:05:23 +01:00
Benjamin Otte
f1e277969a
gadget: Add queue_resize/allocate/draw() functions
2016-01-11 17:05:23 +01:00
Benjamin Otte
e1722baf57
notebook: Convert tabs node to a gadget
...
And in turn, convert the header gadget to a box gadget.
2016-01-11 17:05:23 +01:00
Benjamin Otte
acc534ebfa
boxgadget: Add
...
Adds a GtkBoxGadget that is a Gadget that behaves like a GtkBox.
Use this gadget to implement the notebook base gadget.
2016-01-11 17:05:23 +01:00
Benjamin Otte
749855c1d1
notebook: Remove unused function call
2016-01-11 17:05:23 +01:00
Benjamin Otte
70b9aacfc2
notebook: Simplify event window position computation
...
The event window should overlay the header gadget, so just return its
position.
2016-01-11 17:05:23 +01:00
Benjamin Otte
ad245e0226
notebook: Introduce gtk_notebook_has_current_page()
...
GtkNotebook does not switch the current page if all pages are hidden. So
it may be that no visible page exsits, but there still is a current
page set.
We culd clear the current page, but I'm unsure about backwards
compatibility.
So instead, this new function handles that case.
2016-01-11 17:05:23 +01:00
Benjamin Otte
0d72055b89
notebook: Use gtk_container_class_handle_border_width()
2016-01-11 17:05:23 +01:00
Benjamin Otte
f34059c3b6
notebook: Convert header node to a gadget
...
This allows reworking the content node to do real height-for-width.
The content node also takes care of border width, but we might want to
have the toplevel do it or just get rid of it.
2016-01-11 17:05:22 +01:00
Benjamin Otte
8c1a73326c
gadget: Add helpers for modifying state
...
They will be used in future commits.
I also was too lazy to convert existing widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
e27551ddb2
notebook: Add a stack gadget
...
The stack gadget contains all the child widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
c03fed4840
notebook: Remove extra calls to gtk_notebook_pages_allocate()
...
The function is called during size_allocate() and doesn't need to be
called elsewhere, as all other callers call queue_resize() already.
2016-01-11 17:05:22 +01:00
Benjamin Otte
33b6e30f68
notebook: Remove unnessecary gtk_widget_set_mapped()
...
We chain up, and the chainedup function calls this for us.
2016-01-11 17:05:22 +01:00
Benjamin Otte
dc4148c4e2
notebook: Simplify gtk_notebook_map()
...
We set visibility on our children properly, so we can simply chain up
and let the GtkContainer implementation do the mapping of children.
2016-01-11 17:05:22 +01:00