Commit Graph

23618 Commits

Author SHA1 Message Date
d6b8261622 widget: don't call gtk_style_context_set_background()
We don't need to do this here anymore, since widgets typically render
their backgrounds now.
2015-07-01 16:09:23 -07:00
a9b45e7c3c layout: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, refactor some common code in a single function.
2015-07-01 16:09:23 -07:00
380ebbf76d fixed: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, gtk_style_context_set_background() should really be called every
time the style is updated. Fix that.
2015-07-01 16:09:23 -07:00
74f2d9448f window: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
8832648846 socket: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
06b943fec9 toolitemgroup: don't use gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
e6f97f10dd textview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
f89c86df52 revealer: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
6b0f202bf3 toolpalette: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
d4ecdbd300 viewport: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
15908cfdf9 treeview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
18be2d697c plug: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
b4ee73a291 paned: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
9230143bbf overlay: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
aab3d4679f offscreenwindow: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
b7be29390f menushell: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
828db3eca9 menu: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
db76eae41a listbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
ba2f479aa0 iconview: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
9696d1b4bb flowbox: don't set gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
1c9468c81b eventbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
6786c9d724 drawingarea: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
8c9e426dc5 placessidebar: Do not set as a "track motion" DnD site
It has the unintended effect of picking the suggested action from the
context, which conflicts with the (possibly 0) status we set on our
::drag-motion handler.

Given this widget is not interested in listening to DnD from every
possible target, it is safe to just disable it.
2015-07-01 19:37:42 +02:00
5d17b0af54 GtkWindow: don't increase the preferred size for empty windows if there is a size request set.
This fixes a reftest broken by commit 84e99b20ac

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-07-01 09:32:19 -07:00
15c73a2b1a Add gtk_widget_set_font_options and gtk_widget_get_font_options
This allows a widget to override global font_options, such as hinting and
subpixel order. The widget's PangoContext is updated when this is set.

Some update code from gtk_widget_update_pango_context was moved to
update_pango_context so that gtk_widget_update_pango_context runs it.

http://bugzilla.gnome.org/show_bug.cgi?id=751677
2015-07-01 07:34:32 -07:00
9913b02e3b switch: add a style property for the switch height
Instead of hardcoding an aspect ratio.
This will be replaced by min-height/max-height when we have them.

https://bugzilla.gnome.org/show_bug.cgi?id=751689
2015-06-30 13:28:26 -07:00
04e727709d window: Don't send startup notifications for offscreen / popup windows
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.
2015-06-29 14:26:45 -07:00
802b006b37 settings: Include pangofc-fontmap.h header on Wayland
In case the X11 backend is not enabled, we still need to include the
pangofc-fontmap.h header file, as we use the Pango/FontConfig API in
both the X11 and Wayland case.

https://bugzilla.gnome.org/show_bug.cgi?id=751625
2015-06-29 20:41:04 +01:00
cd3f24d579 cssvalue: Change color transitions to run premultiplied
Previously, the unpremultiplied values from the GdkRGBA were taken. Now
we premultiply the color values as specified by the CSS specs.
This is only relevant when transitioning with translucent colors.

An example is the halfway transition between transparent (0, 0, 0, 0)
and white (1, 1, 1, 1). Previously, all 4 values where transitioned
separately and the result was semi-transparent gray (0.5, 0.5, 0.5,
0.5).
By depending on the alpha value, the result is now semi-transparent
white (1, 1, 1, 0.5) which is what one would naively expect.

New reftest: color-transition
2015-06-26 21:12:50 +02:00
142abce46a cssvalue: Special case resulting color for transparency
Again, preparation for using premultiplied color transitions.
2015-06-26 20:54:57 +02:00
e3d8f03b3a cssvalue: Restructure RGBA transitions
Split out a function to make the code clearer for the changes ahead.
2015-06-26 19:06:02 +02:00
029800c426 Adwaita: entry linking fixes
Set the right border color on the linked entry after the focused
one.
2015-06-25 20:04:32 +02:00
56a3fd888a Adwaita: rubberbands!
Darken the rubberband a bit to make it visible on the selected
color background, fix treeview rubberband border issue.
2015-06-25 19:57:07 +02:00
0606b525b4 gtkdnd: Plug a leak
We create a cairo_t in order to find out the surface extents, but it
was being leaked, dragging the whole drag surface with it through
extra refs.
2015-06-25 15:09:56 +02:00
33f9cbafcd gtkmodelbutton: Plug a leak
The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.
2015-06-25 15:09:56 +02:00
6de82c9be3 gtkmenusectionbox: plug a leak
The list returned by gtk_container_get_children() wasn't being freed.
2015-06-25 15:09:56 +02:00
f8b7623b3c builder-tool: Don't strip h/vexpand
Setting these properties has the side-effect of setting the
corresponding -set properties, which makes GTK+ behave subtly
different. So don't mess with these.
2015-06-25 07:01:26 -04:00
e9e9dfade6 GtkSearchBar: Don't vexpand
It turns out that setting vexpand to its default value has
side-effects that we need.

https://bugzilla.gnome.org/show_bug.cgi?id=751447
2015-06-25 07:00:13 -04:00
d31e1fbef0 GtkImage: Make resource property work properly
gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

https://bugzilla.gnome.org/show_bug.cgi?id=751443
2015-06-25 06:50:44 -04:00
48ea0cbe4b GtkWindow: some min/nat size corrections.
Don't add the container border to the title request size; it
is only used for the child widget.

Don't call gtk_widget_get_preferred_width_for_height() for
the title bar with an unrelated height and subtract the title
bar height before querying the child widget width.

Guard against negative size requests after substracting the
borders/shadows and the title bar.

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-24 10:58:30 +02:00
3b97a0b940 Fix an oversight 2015-06-23 16:46:26 -04:00
7f0606509d GtkPlacesSidebar: Simplify sidebar code
Make this code follow GTK+ styles and conventions better.
2015-06-23 16:35:17 -04:00
ae8c07c67c GktPlacesSidebar: Plug a ton of leaks
If you don't keep in mind that g_object_get() returns references to
objects and copies fo strings, things leak all over the place.
2015-06-23 16:35:17 -04:00
f2a8ddfecf sidebarrow: Avoid object-valued properties
They tend to leak...as these do.
2015-06-23 16:35:17 -04:00
9f27ee7f5a render: Fix ridge/groove border rendering
The typo strikes again!
2015-06-23 22:33:40 +02:00
335c070f9b GtkHeaderBar: reduce minimum title width
The minimum title width affects the minimum window width
for CSD windows. To allow smaller windows like without
CSD reduce it a bit (276px vs 156px min width)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:37 +02:00
84e99b20ac GtkWindow: fix default empty window size with CSD
In the non-CSD case we checked for 0x0 window size requisition
and replaced it with 200x200 so the window was still visible.
This no longer works in case of CSD as the shadow and title bar
are always added to the requisition resulting in a titlebar/shadow
only window in case there is no child widget (this is currently
visible under wayland or when setting GTK_CSD=1).

Instead of special casing the final window size, special case
the child requisition paths instead. This gives us the same
requisition in both, CSD and non-CSD cases (the header bar
has a too large minimum width atm so the resulting window is
still not the same)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:14 +02:00
ec9a39977a Adwaita: scale marks visible on the dark variant 2015-06-23 19:11:15 +02:00
1ed21ad3d4 GtkScale: More work on mark spacing
Try harder not to push the scale out of balance by marks. With
this change, the remaining difference in the drawing is down
to asymmetric assets and margins coming out of the theme.
To fully support such asymmetric rendering, we need implement
baseline alignment for scales.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-23 09:36:14 -04:00
7ce96cb6ac GtkStack: Avoid some unnecessary complication
We already have an in-destruction flag, so use it.
2015-06-23 06:45:07 -04:00