Commit Graph

44606 Commits

Author SHA1 Message Date
Matthias Clasen
e7854aeb42 Adwaita: Update entry selection rendering
Adapt to the changes in the previous commit.
2015-11-10 13:37:15 -05:00
Matthias Clasen
2a03107677 entry: Use a CSS node for selection rendering
This adds new possibilities for themes to render the selection
in fancy ways.
2015-11-10 13:36:16 -05:00
Matthias Clasen
3552f524c3 Adwaita: Update tooltip styling more
Now that tooltips are csd again, the CSS wasn't quite working
anymore.
2015-11-10 12:48:40 -05:00
Olivier Fourdan
f2b373add8 gtkwindow: css offset for toplevel only
At the time gtk_window_move() or gtk_window_resize() get called, there
is no way to predict if a popup window will actually draw its shadow, so
applying an offset in this case may end up with a wrong size or
positioning for such windows.

Changing the logic in gtk_window_should_use_csd() as previously done to
address that issue will cause some other breakage as popup windows may
not draw a shadow but still need CSD.

So best is to actually apply client side decorations offset for regular,
top level windows only. This is actually a lot simpler and safer and
less likely to cause additional breakage.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-10 12:35:23 -05:00
Matthias Clasen
69cbf0a129 Adwaita: update tooltip styling
Adapt to the changes in the previous commit. Note that tooltip
appearance is currently affected by tooltips having lost their
csd nature, due to a regression.
2015-11-10 12:26:05 -05:00
Emmanuele Bassi
62d9abeebc Move GtkAccelMap autocleanup to the class header 2015-11-10 14:12:35 +00:00
Emmanuele Bassi
a395852233 Recursively move autocleanups to their header files
Start from GtkAccelLabel and walk the tree downwards.
2015-11-10 14:11:04 +00:00
Emmanuele Bassi
56ab3bdf3c Move GtkAboutDialog autocleanup to the class header 2015-11-10 14:08:07 +00:00
Emmanuele Bassi
90c15c294e Move GtkDialog autocleanup to the class header 2015-11-10 14:07:41 +00:00
Emmanuele Bassi
93369788c9 Start recursively moving autocleanups macros to their headers
* Cover letter

Having a single header file for all autocleanups definitions was a
reasonable stop-gap measure, but now GTK+ is starting to use G_DECLARE_*
macros. This means that every class using a G_DECLARE_* macro will need
to include "gtk.h" to avoid compiler warnings, which is not acceptable.

By moving the G_DEFINE_AUTO* use to the header that defines the type we
allow using the G_DECLARE_* macros without sacrificing the ability to
include only the needed files when deriving from a class.

* Commit

This commit changes all includes relative to GtkWindow to define their
own autocleanup macros.
2015-11-10 13:59:36 +00:00
Emmanuele Bassi
d589170754 Only include the necessary headers in GtkPlacesViewRow
When compiling inside GTK we also use the GTK_COMPILATION guard, as the
GtkPlacesView and GtkPlacesViewRow widgets are shared with Nautilus.
2015-11-10 13:49:11 +00:00
Emmanuele Bassi
862007fe1c Move GtkListBox g_autoptr macros to the class header
This allows GtkPlacesViewRow to use G_DECLARE_FINAL_TYPE without having
to include gtk.h.
2015-11-10 13:48:31 +00:00
Emmanuele Bassi
0d4a010cbb Remove an unused variable declaration
And the compiler warning that comes with it.
2015-11-10 13:42:02 +00:00
Emmanuele Bassi
40d6321b4c Move GtkWindow g_autoptr macros in the class header
Otherwise we won't be able to use G_DECLARE_* macros internally to GTK
without generating warnings, or without including gtk.h itself.
2015-11-10 13:42:02 +00:00
Emmanuele Bassi
d694a9a83b docs: Ignore GtkTooltipWindow's private header file 2015-11-10 13:24:05 +00:00
Matthias Clasen
534f537a3c Fix an oversight
We must set the construct-only "type" to GTK_WINDOW_POPUP, otherwise
this ends upo being a regular toplevel.
2015-11-10 13:23:18 +00:00
Emmanuele Bassi
6f6e536543 Use CSS node name for GtkTooltipWindow
Instead of a style class.
2015-11-10 13:23:18 +00:00
Emmanuele Bassi
a846fd586d Add GtkTooltipWindow private sub-class
GtkTooltip does a lot of set up on the GtkWindow it uses internally. We
should move that code to a separate class to keep it contained.
2015-11-10 13:23:18 +00:00
Matthias Clasen
c2d0aa7851 print dialog: Avoid gtk_style_context_save
There was one more call to gtk_style_context_save here that I
overlooked. We can get rid of it by just setting the element name
on the drawing area.
2015-11-10 07:54:59 -05:00
Matthias Clasen
afc09d924e flowbox: Add a diagram to CSS documentation 2015-11-10 07:39:40 -05:00
Matthias Clasen
740fa2cd70 iconview: Add a diagram to CSS documentation 2015-11-10 07:37:25 -05:00
Matthias Clasen
ff4b112265 treeview: Add a diagram to CSS documentation 2015-11-10 07:36:41 -05:00
Matthias Clasen
ec065d4cbf HighContrast: Update treeview rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 07:31:32 -05:00
Matthias Clasen
8efb1b1f92 Adwaita: Update treeview rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 07:30:29 -05:00
Matthias Clasen
4c56a1ea5d treeview: Use a CSS node for rubberband drawing
Use a CSS node with name rubberband to draw the rubberband
selection.
2015-11-10 07:29:54 -05:00
Alexander Larsson
0af457639d TextView: Use saner coordinate space in draw_layer.
When I added the draw_layer vfunc it accidentally got passed a cairo_t
that was configured with to draw in the viewport coordinate space (rather
than the buffer coordinate space). This makes things unnecessary complex,
because you have to convert between the two.

The pixel cache is shared between the text and the layers, so there is
no way to use draw_layer to get a stationary overlay effect. Thus it makes
much more sense for the draw_layer vfunc to draw in the buffer space.

Just changing this would break ABI for existing code, so this is fixed
by adding new layer types and deprecating the old ones.

Also, we use the new layer types to fix gtk3-widget-factory.

https://bugzilla.gnome.org/show_bug.cgi?id=757856
2015-11-10 08:39:47 +01:00
Matthias Clasen
b0a6af3783 Forgotten file
This change belongs to the iconview rubberband changes.
2015-11-10 00:55:57 -05:00
Matthias Clasen
921c2a1db4 HighContrast: Update flowbox rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 00:55:29 -05:00
Matthias Clasen
f6201e4ccd Adwaita: Update flowbox rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 00:52:09 -05:00
Matthias Clasen
6c7f4b78b5 flowbox: Use a CSS node for rubberband drawing
Use a CSS node with name rubberband to draw the rubberband
selection.
2015-11-10 00:51:48 -05:00
Matthias Clasen
75d465eee4 HighContrast: Update rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 00:30:39 -05:00
Matthias Clasen
f4076dff42 Adwaita: Update rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 00:28:46 -05:00
Matthias Clasen
318269550b iconview: Use a CSS node for rubberband drawing
Use a CSS node with name rubberband to draw the rubberband
selection.
2015-11-10 00:27:11 -05:00
Matthias Clasen
ee76f9bfed HighContrast: Update text handle styling
Adapt to the changes in the previous release.
2015-11-09 23:49:29 -05:00
Matthias Clasen
3daff48aca Adwaita: Update text handle styling
Adapt to the changes in the previous commit.
2015-11-09 23:47:08 -05:00
Matthias Clasen
0a136004c9 Document text handle styling
Since GtkTextHandle is private, document text handle style
classes in the GtkEntry and GtkTextView documentation.
2015-11-09 23:45:29 -05:00
Matthias Clasen
ea51db1feb text handle: Port to CSS nodes
Use cursor-handle as the element name for the CSS node that
is used to render text the selection handles.
2015-11-09 23:33:54 -05:00
Matthias Clasen
14f4b7ead2 Avoid excessive property notification for GtkStack::interpolate-size
make check checks this for writable properties, and fails now that
we've made this property writable.
2015-11-09 14:53:25 -05:00
Matthias Clasen
c283315466 notebook: Update CSS docs
The .header style class is no longer used.
2015-11-09 13:33:58 -05:00
Timm Bäder
c28be30ac1 colorswatch: Don't pass _GENERIC_FALLBACK to API that doesn't support it 2015-11-09 17:13:19 +01:00
Alexander Larsson
09a181d205 gdk: Fix invalidation w/ pixel cache when changing child window geometry.
When moving/scrolling a child window we can't use the current clip
region to limit what is invalidated, because there may be a pixel
cache that listens for changes outside the clip region. Instead
invalidate the entire area and rely on the invalidation code to limit
the repaint to the actually visible area.
2015-11-09 17:06:00 +01:00
Benjamin Otte
a0d9728e6c textdisplay: save/restore when using different state flags
Also, never use gtk_widget_get_state_flags() when we want
gtk_style_context_get_state()
2015-11-09 14:17:53 +01:00
Olivier Fourdan
9757ea2c49 gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
git commit a5b1cdd0 introduced a regression where CSD windows are not
resizable with metacity.

Reason being that metacity does not support "_GTK_FRAME_EXTENTS" and
therefore gtk_window_supports_client_shadow() would always return FALSE.

This explains why it works with window managers which support
"_GTK_FRAME_EXTENTS" such as mutter/gnome-shell or xfwm4.

Partially revert commit a5b1cdd0 to reinstate the logic in
get_shadow_width().

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=757805
2015-11-09 14:17:53 +01:00
Matthias Clasen
32f27a4cd0 container: Slightly reword some docs
Clarify gtk_container_remove documentation regarding reference
holding. Suggested in

https://bugzilla.gnome.org/show_bug.cgi?id=757607
2015-11-09 07:40:44 -05:00
Matthias Clasen
7314c8ca06 tool item group: Use a CSS node for the arrow
This completes the transition for GtkToolItemGroup.
2015-11-09 06:42:59 -05:00
Matthias Clasen
db70ec9666 HighContrast: Update notebook styling
Some fixes for arrows and for headers.
2015-11-08 21:08:38 -05:00
Matthias Clasen
f564f16b5c Adwaita: Update notebook styling
Adapt to the changes in the previous commit.
2015-11-08 21:08:38 -05:00
Matthias Clasen
4802b515e4 notebook: Use CSS nodes for arrows
This converts the drawing of scroll arrows to use separate CSS
nodes.
2015-11-08 21:08:38 -05:00
Matthias Clasen
78373eb9f7 Don't use a transient node in gtk_render_arrow()
It is not necessary for the users of this API, and causes things
to not work as intended. Without this transient node, styling
"notebook header tabs arrow" has the desired effect on notebook
arrows.
2015-11-08 21:08:38 -05:00
Matthias Clasen
306b6c6024 widget-factory: Add another notebook example
This example shows a scrollable notebook with action widgets.
2015-11-08 21:08:38 -05:00