Commit Graph

44629 Commits

Author SHA1 Message Date
51dc4873fd Add gtk_native_dialog_destroy()
Its very easy to get extra references to the NativeDialog so that
when you release your last reference any visible dialog is not
hidden. We handle this by adding a destroy method similar to how
you destroy regular toplevels.
2015-11-11 16:06:44 +01:00
402225a8e2 GtkNativeDialog: Fix modal handling in gtk_native_dialog_run() 2015-11-11 15:14:40 +01:00
0e0b45602a tooltipwindow: Use a builder UI file
It's not a hugely complicated file, but it's easier to deal with some of
the details of tooltip windows styling if we have a UI file to edit,
instead of source code.
2015-11-11 12:27:07 +00:00
73497c16ae Add autocleanups for GtkShortcutsWindow 2015-11-11 12:02:43 +00:00
9ebe95f4a9 Remove introspection scanner guards around autocleanups
They are not needed.
2015-11-11 12:02:43 +00:00
5912790f32 gtklevelbar: Fix typo 2015-11-11 09:35:31 +01:00
373a3517b3 HighContrast: Update levelbar styling
Adapt to the changes in the previous release.
2015-11-11 00:30:24 -05:00
2a0024ebe2 Adwaita: Update levelbar rendering
Adapt to the changes in the previous commit.
2015-11-11 00:26:32 -05:00
17f110433d levelbar: Port to use CSS nodes
Use element names levelbar, trough, block, and some style
classes on the block nodes: .discrete, .continuous, .empty,
.level-low, etc.
2015-11-11 00:25:24 -05:00
601cbbcc87 Improve testlevelbar
Add a switch to toggle between discrete and continuous modes.
2015-11-10 23:31:33 -05:00
02d08a1bd7 text util: Avoid creating transient nodes
We don't need to add .view - its already added, and shouldn't
really be needed in the first place.
2015-11-10 21:59:31 -05:00
f3c915f18c HighContrast: Update textview selection styling
Use the selection element name.
2015-11-10 21:52:45 -05:00
fbd6a814c6 Adwaita: Update textview selection styling
Use the selection name.
2015-11-10 21:51:36 -05:00
9d9088304c text view: Improve text rendering
Use the text CSS node for rendering text, and the selection node
for rendering selected text, avoid gtk_style_context_save, update
states of all CSS nodes, and use the proper states when querying
style properties.
2015-11-10 21:49:42 -05:00
bb786ac240 textview: Use a CSS node for selection rendering
Use a CSS node with name selection, like we do for entries
and labels. Unlike those widgets, we currently don't user
gtk_render_background, but just use the background color.
That will require more effort.
2015-11-10 21:18:10 -05:00
735a71da11 cell view: Add an element name
The element name is...cellview.
2015-11-10 20:45:42 -05:00
514c0f761f HighContrast: Update label selection styling
Adapt to changes in the previous commit.
2015-11-10 20:33:12 -05:00
218d584b54 Adwaita: Update label selection styling
Adapt to the changes in the previous commit.
2015-11-10 20:29:31 -05:00
fafa75ac19 label: Use a CSS node for selection rendering
This adds new possibilities for themes to render the selection
in fancy ways.
2015-11-10 20:28:10 -05:00
27d70cbb10 entry: Simplify selection rendering
Calling gtk_render_background for each rectangle in the region
leads to suboptimal and sometimes weird results. Getting this
right requires more work in Pango first. Go back to just rendering
a single background, and clip it to the selection region. This
matches what GtkLabel does.
2015-11-10 20:18:39 -05:00
e9449f6014 inspector: Don't grow horizontally
Labels in the object tree are application data. Ellipsize them
to avoid growing extremely wide if the data is bogus.
2015-11-10 17:36:33 -05:00
774b6f94d5 inspector: fix a typo 2015-11-10 17:36:23 -05:00
6cbfc780c5 HighContrast: Update entry selection styling
Adapt to changes in the previous commit.
2015-11-10 13:39:10 -05:00
e7854aeb42 Adwaita: Update entry selection rendering
Adapt to the changes in the previous commit.
2015-11-10 13:37:15 -05:00
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
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
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
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
62d9abeebc Move GtkAccelMap autocleanup to the class header 2015-11-10 14:12:35 +00:00
a395852233 Recursively move autocleanups to their header files
Start from GtkAccelLabel and walk the tree downwards.
2015-11-10 14:11:04 +00:00
56ab3bdf3c Move GtkAboutDialog autocleanup to the class header 2015-11-10 14:08:07 +00:00
90c15c294e Move GtkDialog autocleanup to the class header 2015-11-10 14:07:41 +00:00
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
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
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
0d4a010cbb Remove an unused variable declaration
And the compiler warning that comes with it.
2015-11-10 13:42:02 +00:00
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
d694a9a83b docs: Ignore GtkTooltipWindow's private header file 2015-11-10 13:24:05 +00:00
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
6f6e536543 Use CSS node name for GtkTooltipWindow
Instead of a style class.
2015-11-10 13:23:18 +00:00
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
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
afc09d924e flowbox: Add a diagram to CSS documentation 2015-11-10 07:39:40 -05:00
740fa2cd70 iconview: Add a diagram to CSS documentation 2015-11-10 07:37:25 -05:00
ff4b112265 treeview: Add a diagram to CSS documentation 2015-11-10 07:36:41 -05:00
ec065d4cbf HighContrast: Update treeview rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 07:31:32 -05:00
8efb1b1f92 Adwaita: Update treeview rubberband styling
Adapt to the changes in the previous commit.
2015-11-10 07:30:29 -05:00
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
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
b0a6af3783 Forgotten file
This change belongs to the iconview rubberband changes.
2015-11-10 00:55:57 -05:00