Commit Graph

47656 Commits

Author SHA1 Message Date
Matthias Clasen
c9ec72be7a Theme updates
Cut down on padding, and make close buttons square.
2016-05-31 01:06:12 -04:00
Matthias Clasen
4d880268fc tab strip: Drop scroll buttons
Without scroll buttons, all the autoscroll machinery is no longer
needed.
2016-05-31 00:51:44 -04:00
Matthias Clasen
df07faa81b drop todo list 2016-05-31 00:45:38 -04:00
Matthias Clasen
ce2c6eff1e closable tab: Only show the button when active 2016-05-31 00:43:09 -04:00
Matthias Clasen
f86f439ed5 test: remove scrollable 2016-05-31 00:43:09 -04:00
Matthias Clasen
7dd60e3986 tab strip: Always scroll
No need to complicate things with options. For now, lets focus
on getting the scrolling right.
2016-05-31 00:43:09 -04:00
Matthias Clasen
98a80b0c8f Keep GtkTab private
Without custom tab creation in GtkTabStrip, this no longer needs
to be public.
2016-05-31 00:36:57 -04:00
Matthias Clasen
3afd1b14f0 test: remove custom tabs 2016-05-31 00:36:57 -04:00
Matthias Clasen
397332702e Remove custom tab support for now
Allowing custom tab implementations ties our hands for what we can
do with the tabs, so lets figure out the desired user experience first.
2016-05-31 00:24:28 -04:00
Matthias Clasen
c05ce8cf9f Drop edge support for now
This is distracting from getting the desired user experience.
It can be added later.
2016-05-31 00:10:38 -04:00
Matthias Clasen
2c944b7928 Improve scrolling
Arrange for autoscroll and keyboard scrolling to end on a
tab boundary.
2016-05-26 00:18:06 -04:00
Matthias Clasen
9f1fc47175 Remove an unused field 2016-05-25 22:20:15 -04:00
Matthias Clasen
4e0c88a3d8 Handle direction changes 2016-05-25 22:17:48 -04:00
Matthias Clasen
0a06bb66db Add some hover style
Just so we can see it is there.
2016-05-25 21:32:26 -04:00
Matthias Clasen
b875aaba99 Don't derive from GtkBox
Instead, derive from GtkContainer and use a box gadget to
manage our internal children.
2016-05-25 21:27:17 -04:00
Matthias Clasen
39d863caae Add some todo items 2016-05-24 23:29:19 -04:00
Jakub Steiner
3927f44a0d fix tab jumping on :checked for tabstrip 2016-05-25 00:36:57 +02:00
Matthias Clasen
68b1814e83 Fix scroll button styling
The selector was not specific enough, and the hover styling
was missing.
2016-05-24 18:13:15 -04:00
Matthias Clasen
d6f5af4df9 Fix state updates for tabs
This broke when I introduced the scrolling. We need to
iterate over the children of the tabs box to update their
state.
2016-05-24 17:58:41 -04:00
Jakub Steiner
bf97ddeaaa initial styling for tabstrip (stub) 2016-05-24 20:42:21 +02:00
Matthias Clasen
1525f4b2e7 tab strip: Support different edges
Add edge properties on both GtkTabStrip and GtkTab, and make
GtkTabStrip update its orientation and scrolling direction when
the edge changes.
2016-05-21 16:16:31 -04:00
Matthias Clasen
e13f564fc2 Demonstrate custom tabs
This makes testtabstrip use its own tab class, which puts
a close command in a popover, just to show that this is
possible.
2016-05-21 16:16:31 -04:00
Matthias Clasen
6558ab4bb3 tab strip: Allow custom tabs
Add a ::create-tab signal that can be used to override the default
choice of simple or closable tabs with a custom tab implementation.
2016-05-21 16:16:31 -04:00
Matthias Clasen
76da4b4860 tab strip: Add scrolling
Implement scrolling arrows. This is currently using a scrolled window.
2016-05-21 16:16:31 -04:00
Matthias Clasen
cb65a174a5 Add a quick test for tab strips 2016-05-21 16:16:30 -04:00
Matthias Clasen
f01d8b105a tab strip: Support closable tabs
Add a boolean property to instruct GtkTabStrip to use closable
tabs instead of simple tabs.
2016-05-21 16:16:15 -04:00
Matthias Clasen
2b0c34cbf8 Add a closable tab class
This adds a close button to the tab in addition to the label.
2016-05-21 16:14:25 -04:00
Matthias Clasen
941f1ad1a6 Add a simple tab class
This is a very barebones subclass of GtkTab, which shows the page
title in a label.
2016-05-21 16:14:25 -04:00
Matthias Clasen
e6e418f6e4 Add a tab strip widget
This adds GtkTabStrip and GtkTab, which will eventually allow
creating typical notebook scenarios with GtkStack.

Inspired by the PnlTabStrip prototype that Christian Hergert
wrote for gnome-builder.
2016-05-21 16:14:25 -04:00
Matthias Clasen
21804b09b4 Move gtk_object_handled_accumulator
This used to live in gtknotebook.c. Since we may use it in
other places in the future, move it to gtkprivate.c where we
already have other shared accumulators.
2016-05-21 12:48:19 -04:00
Matthias Clasen
d3adf47d9f treeview: Fix a rubberbanding-related crash
When starting a rubberband selection from an empty area, we could run
into crashes if the selection moves over the rows and then back out
to unpopulated area. Handle this case without crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=766336
2016-05-19 16:59:10 -04:00
Matthias Clasen
eace965a19 scale css node test: Adapt to changes
The style classes are reflected in the output here.
2016-05-19 12:26:47 -04:00
Matthias Clasen
6293a50501 color scale: Sync style classes with GtkScale
We should use the same style classes here, to avoid theme
confusion.
2016-05-19 18:09:24 +02:00
Lapo Calamandrei
cca2a22b63 color scale: Really sync style classes with GtkScale
sync the alpha scale styleclass too.
2016-05-19 17:32:09 +02:00
Lapo Calamandrei
5ae7f62f25 Adwaita: fix scale theming
rely on toplevel styleclass for scale with marks.

See https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 17:31:05 +02:00
Ignacio Casal Quinteiro
fab70d34d4 gtkselectionprivate: minor style fix
This seems to make some issue with the gtk# scanner.
2016-05-19 16:56:57 +02:00
Matthias Clasen
4151cb1202 scale: Use more succinct names for style classes
Use .marks-before/after to indicate the presence of marks.
As Lapo points out, compatibility with the previous names
is not really that important, since everything else changed
around it.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 09:44:48 -04:00
Matthias Clasen
de7c15636d icon theme: Add a warning
Warn about the situation when we've found a resource or file path,
but gdk-pixbuf fails to give us a pixbuf. This generally means that
either pixbuf loaders are not found or the shared-mime database
is missing.
2016-05-19 09:03:20 -04:00
Matthias Clasen
d14305f380 wayland: Survive lack of settings
This can be made to happen eg by setting XDG_DATA_DIRS and
XDG_DATA_HOME to /. Not a useful value, but not a good reason
to crash either.
2016-05-19 07:38:33 -04:00
Olivier Fourdan
0b58c96f06 wayland: Make gdk_wayland_window_get_wl_output() private
There is no need to make it a public API, move it to the private header
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=766566
2016-05-19 09:48:46 +02:00
Dušan Kazik
6c939c0e72 Updated Slovak translation 2016-05-18 18:48:18 +00:00
Olivier Fourdan
b03784eb97 wayland: Add get_monitor_at_window to Wayland backend
Given that Wayland has no global coordinate, the only way for gdk to
retrieve the monitor a window last entered is to retrieve it from the
GdkWaylandWindow itself.

Implement the backend specific get_monitor_at_window() to return the
monitor that was last entered by the window.

https://bugzilla.gnome.org/show_bug.cgi?id=766566
2016-05-18 19:07:27 +02:00
Olivier Fourdan
ca77de055b wayland: Add API to retrieve the Wayland output
In Wayland, surfaces get an enter/leave notification each time they
enter or leave an output.

Add an API to GdkWaylandWindow to retrieve the output the window has
last entered.

https://bugzilla.gnome.org/show_bug.cgi?id=766566
2016-05-18 19:07:27 +02:00
Olivier Fourdan
d288a134a4 display: Add vfunc for get_monitor_at_window
Some backends (namely Wayland) do not support global coordinates so
using the window position to determine the monitor will always fail on
such backends.

In such cases, the backend itself might be better suited to identify
the monitor a given window resides on.

Add a vfunc get_monitor_at_window() to the display class so that we can
use the backend to retrieve the monitor, if the backend implements it.

https://bugzilla.gnome.org/show_bug.cgi?id=766566
2016-05-18 19:07:27 +02:00
Matthias Clasen
fa9f22eec4 scale: Bring back marks-related style classes
It turns out that it is too hard (and in some cases, impossible)
to get this information from node positioning, so bring back the
.scale-has-marks-above/below style classes on the main node.

This should allow us to fix the 'pointy sliders'.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-18 12:59:39 -04:00
Matthias Clasen
f516faaef8 Revert "scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children"
This reverts commit 096bea3f0e.

This was accidentally pushed.
2016-05-18 07:52:18 -04:00
Carlos Garnacho
1d04bdf845 x11/dnd: Ignore grab broken events from other devices than our DnD device.
The GdkDragContext should only listen to GDK_GRAB_BROKEN events sent to
its own pointer device. It turns out that the passive key grabs mistake
GDK into sending a GdkEventGrabBroken on the master keyboard, which the
DnD machinery mistakes as a signal to cancel the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=766442
2016-05-18 12:54:40 +02:00
Carlos Garnacho
783c302198 wayland: Avoid spurious crossing events from master touch device
Only generate crossing events on wl_touch.down for the virtual master
device used for touch events, and only whenever this virtual device
actually moves across surfaces. This behavior resembles better what is
expected in X11, where the pointer is warped to the touch position
on XITouchBegin.

This avoids the double emission of leave events when the pointer
emulating touch is lifted, that crossing event will be instead
generated when/if the focus surface changes.

https://bugzilla.gnome.org/show_bug.cgi?id=766314
2016-05-18 12:50:08 +02:00
Matthew Waters
2893526a48 gdk/wayland: use the multi-thread safe wayland API
This is required for proper integration with any other library/application that
may perform wayland API calls and poll() the wayland fd from multiple threads.
Using wl_display_dispatch{_queue}() is thread-safe if not mixed with custom
poll() usage, which GSource/GMainContext does.

Essentially, the problem is that multiple threads polling and reading
the same fd is extremely racy.  Use the wayland provided API for allowing
concurrent access to the wayland display fd.

See the wayland man pages for wl_display_prepare_read(),
wl_display_cancel_read() and wl_display_read_events() for more details.

https://bugzilla.gnome.org/show_bug.cgi?id=763852
2016-05-17 22:58:03 -04:00
Debarshi Ray
096bea3f0e scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children
GtkScrolledWindow leans towards using the minimum size of its child
widget, unless the scrollbar policy is GTK_POLICY_NEVER. This is
probably fine for most GtkScrollable implementations out there.
Especially when using GTK_SCROLL_MINIMUM, which is the default for all
implementations inside gtk+.

However, this is not good for GTK_SCROLL_NATURAL children. eg.,
VteTerminal's minimum size is 1x1 and natural size is the number of
visible rows and columns requested by the user. We really want to use
the natural size unless the user has resized the window to change that.

https://bugzilla.gnome.org/show_bug.cgi?id=766569
2016-05-17 15:03:51 -04:00