Commit Graph

41465 Commits

Author SHA1 Message Date
Iain Lane
8c5094c22c gtkfilechooserwidget: When using an extra widget, show or hide the filter combo as appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=742653
2015-01-10 20:37:39 -05:00
Matthias Clasen
0b50e1fff6 HighContrast: draw combo box separators
Same fix as the previous commit.
2015-01-10 20:28:45 -05:00
Matthias Clasen
9c4d478dc7 Adwaita: draw combo box separators
Killing the separator in the button had the unintended side effect
of also killing separators in the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=742704
2015-01-10 20:25:56 -05:00
Matthias Clasen
35a8d3d770 widget-factory: Add a combo box separator example
This shows that combo box separators are currently broken
in Adwaita.
2015-01-10 20:14:24 -05:00
Nelson Benitez Leon
885b36a6d5 GtkTextView: allow to extend text selection with mouse scrollwheel
Fixes bug 710612
2015-01-10 14:36:17 -05:00
Matthias Clasen
5d9710cc7f file chooser: Add some padidng
https://bugzilla.gnome.org/show_bug.cgi?id=742631
2015-01-10 14:35:56 -05:00
Matthias Clasen
b0e4273325 Forgotten files 2015-01-10 14:35:56 -05:00
Matthias Clasen
366527c2d0 Adwaita: Fix treeview separators in backdrop
https://bugzilla.gnome.org/show_bug.cgi?id=742702
2015-01-10 13:07:55 -05:00
Benjamin Otte
cec5815a0d stylecontext: Stop animations on manual invalidation
If a gtk_style_context_invalidate() is called on a widget's style
context (which nobody should ever do, sheesh!) and we're animating, stop
the animations.

Fixes crashers in Nautilus.
2015-01-10 14:25:40 +01:00
Matthias Clasen
9fcbae2d85 GtkScrolledWindow: Don't start fading right away
When we get a leave event, we need to remove the over bit,
since we may not get motion events that tell us when we lose
proximity, but we don't have to fade out right away - that
will happen on its on due to inactivity a bit later. Having
the indicator stay visible for a bit feels more relaxed.
2015-01-09 21:15:07 -05:00
Matthias Clasen
206f0bbf7f GtkScrolledWindow: Factor out a constant
Define INDICATOR_CLOSE_DISTANCE instead of hardcoding the same
number of pixels in 4 different places.
2015-01-09 21:15:06 -05:00
Matthias Clasen
11eb64a2b6 GtkScrolledWindow: Don't require proximity for track points
These are hard to navigate precisely, so show wide scrollbars
right away.
2015-01-09 21:15:06 -05:00
Matthias Clasen
2a3a7306ef GtkScrolledWindow: Drop device manager complications
We no longer use the presence or absence of particular device
types to determine which scrolling to use.
2015-01-09 21:15:06 -05:00
Matthias Clasen
96fcdebefb GtkScrolledWindow: Drop a redundant field
The Indicator.enabled field was not carrying any extra information,
so just use priv->use_indicators instead.
2015-01-09 21:15:06 -05:00
Matthias Clasen
1c6eca04db GtkScrolledWindow: Rename a private field
touch_mode -> use_indicators, more to the point.
2015-01-09 21:15:06 -05:00
Emmanuele Bassi
a834078804 x11/gl: Do not specify the GLX context version
If we use GDK_GL_PROFILE_3_2_CORE we are asking for a core profile
according to the GLX_ARB_create_context_profile extension. For that,
we pass the GLX_CONTEXT_CORE_PROFILE_BIT_ARB value for the
GLX_CONTEXT_PROFILE_MASK_ARB attribute.

The specification for the extension says that:

  If the requested OpenGL version is less than 3.2,
  GLX_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality
  of the context is determined solely by the requested version.

Since we're asking for a core profile, we assume a GL version greater
than or equal to 3.2; thus, we don't need to specify the
GLX_CONTEXT_MAJOR_VERSION_ARB or the GLX_CONTEXT_MINOR_VERSION_ARB
attributes, and instead just rely on whatever version GLX gives us.

This seems to work around a strange issue in Mesa; if we ask for a core
profile and any version > 3.0, we get broken rendering on any shared
context we create.
2015-01-10 00:07:51 +00:00
Matthias Clasen
6384167054 inspector: Don't use GSettings directly
It is not necessary here, and using GtkSettings gives us
a greater chance to not fail e.g. on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-09 15:29:34 -05:00
Matthias Clasen
c2ff89bbe3 inspector: be careful about gsize vs guint64
Since gsize doesn't work as a typename in a ui file,
we have to be careful not to pass pointers to wrongly
sized variables when getting the guint64 values out
of the model.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-09 14:44:26 -05:00
Emmanuele Bassi
9a38fb79e5 docs: Add missing quote
The missing " breaks the syntax highlighting of the GtkImageMenuItem
example.
2015-01-09 16:42:55 +00:00
David King
a7638d5ecb docs: Add Since for GtkCellRendererPixbuf:surface 2015-01-09 14:51:21 +00:00
David King
9a50203408 docs: Fix some old live.gnome.org URLs 2015-01-09 14:08:20 +00:00
Piotr Drąg
4adb3f4033 Updated POTFILES.skip 2015-01-09 14:16:03 +01:00
Matthias Clasen
885b3c704f Fix GTK_OVERLAY_SCROLLING=0
This was broken by the recent more dynamic approach.
2015-01-09 06:45:51 -05:00
Matthias Clasen
d5afaa07d3 Fix comment typo 2015-01-09 06:21:37 -05:00
Matthias Clasen
80969e34bc inspector: Show object address
This is useful information when running the application
in a debugger.
https://bugzilla.gnome.org/show_bug.cgi?id=742518
2015-01-09 00:07:01 -05:00
Emmanuele Bassi
79f806fdab Point to copy/cut/delete named icons in the stock item deprecations
We still use symbolic icons for Copy, Cut, and Delete operations inside
toolbars and some menus, so it's worth pointing to the symbolic icon
names in the deprecation notices.

https://bugzilla.gnome.org/show_bug.cgi?id=741969
2015-01-08 23:50:22 -05:00
Matthias Clasen
08f69c53a5 file chooser: Don't force a scrollbar
No point in showing the scrollbar when it is not needed.
https://bugzilla.gnome.org/show_bug.cgi?id=742343
2015-01-08 22:27:47 -05:00
Timm Bäder
57714b9774 gtklabel: Don't accept unhandled mouse buttons
If the pressed mouse button neither triggers a context menu nor
activates a link, set the sequence's state to DENIED.

https://bugzilla.gnome.org/show_bug.cgi?id=742010
2015-01-08 21:52:26 -05:00
Benjamin Otte
9474215a43 cssimage: Fix angle computation for gradients to corners 2015-01-08 19:30:59 +01:00
Inaki Larranaga Murgoitio
0d5acf2a05 Updated Basque language 2015-01-08 18:32:00 +01:00
Inaki Larranaga Murgoitio
b0d0a2b5e5 Updated Basque language 2015-01-08 15:41:15 +01:00
Benjamin Otte
29984c5282 stylecontext: Handle theme changes for cached styles
We need to clear the cache manually on full revalidates because
_gtk_css_change_for_child() will clear the full revalidation flags.
And then gtk_style_context_update_cache() will not do the right thing
(which is to clear itself).
2015-01-07 18:06:59 +01:00
Benjamin Otte
bc07a540c7 stylecontext: Rename GtkStyleInfo to GtkCssNode 2015-01-07 15:44:53 +01:00
Benjamin Otte
2664082549 stylecontext: update_animating() properly
Because we can switch from animating to non-animating pretty much
anywhere, do the check for animations unconditionally instead of trying
to cram it into the correct if path (and failing).
2015-01-07 14:26:48 +01:00
Benjamin Otte
059cd3e51f stack: Remove commented out line
It always shows up in my greps and confuses me.
2015-01-07 14:26:48 +01:00
Benjamin Otte
fe33ee426a stylecontext: Add a parent style cache
We now cache the results of lookups on the parent GtkCssStyle. This
allows sharing styles between widgets (recursively). However, this
only works if the styles can't potentially depend on siblings -
neither directly via sibling selectors or via position pseudo-classes
like :first-child.
Unfortunately, Adwaita currently uses first-child a lot, and in
particular for labels, which are the most common widgets.

The big benefits of this change are both less CPU - due to not needing
to compute styles again - and less memory usage - due to sharing of
the styles between widgets. Here's some nonscientific numbers I
collected while pondering the usefulness of this patch:

                    glade   glade   widget
                    demo    demo    factory
                    runtime styles  styles
Adwaita before      19.1s   5800    1150
Adwaita now         18.9s   3800     970
Adwaita hacked now  14.5s   3100     910
simple before       11.3s   5800    1150
simple now          10.8s   1300     590

Adwaita: Adwaita as provided by GTK
Adwaita hacked: Adwaita with the first/last-child for GtkLabel removed
simple: A 250 lines simple GTK theme I use for testing
before: This patch not applied
now: this patch applied

glade demo runtime: Starting glade opening a large file and closing it
glade demo styles: GtkCssStaticStyle objects after opening glade with
                   the large file as per inspector
widget factory styles: GtkCssStaticStyle objects after startup as per
                       inspector
2015-01-07 14:26:48 +01:00
Benjamin Otte
27285f1f0f cssstyle: Have a default style
This way we can initialize the default style info with a style and
ddon't need to special case NULL everywhere.
2015-01-07 14:26:48 +01:00
Benjamin Otte
ef9aa8b0ae stylecontext: Use correct parent on updates
Previously we looked at the save/restore state when determining the
parent. This is wrong in the case where we're updating the cache though.

So we now save the parent in the style info.
2015-01-07 14:26:48 +01:00
Benjamin Otte
89b5d15415 stylecontext: Fix cache updating
After the parent changes in commit
3a337156d1 we need to refresh the cached
styles after the current style. After all, they now depend on the base
style.
2015-01-07 14:26:48 +01:00
Benjamin Otte
730f429168 cssstaticstyle: Handle relevant change
Relevant change is returned from style lookups, so keep is with the
object that holds those values.
2015-01-07 14:26:48 +01:00
Benjamin Otte
ad199e4cf9 stylecontext: Use correct parent style for lookups
After 3a337156d1 style lookups still used
the parent context's style as the parent style, even though after a
gtk_style_context_save() the root style of the style context is the
proper parent.

Testcase attached.
2015-01-07 14:26:48 +01:00
Benjamin Otte
26f36ef8ae cssnodedeclaration: Store the GType of the node 2015-01-07 14:26:48 +01:00
Benjamin Otte
9645daf48f cssstyle: Move function from vfunc to static func
compute_dependencies() is only used internally by GtkCssStaticStyle,
so there's no need to have it elsewhere.
2015-01-07 14:26:47 +01:00
Benjamin Otte
cd056adb2f cssstaticstyle: Move function
And with that move, GtkCssStaticStyle is immutable.
2015-01-07 14:26:47 +01:00
Benjamin Otte
8b823d7e13 cssstaticstyle: Move function
We want the new() return values to be immutable, so we have to move the
code that modifes them.
2015-01-07 14:26:47 +01:00
Benjamin Otte
b7be202089 stylecontext: Refactor update_properties()
It now always returns a new instance.
2015-01-07 14:26:47 +01:00
Benjamin Otte
7406ec84bc stylecontext: Simplify function
Instead of computing the changes manually everywhere from the parent
changes, just pass in the parent changes.
2015-01-07 14:26:47 +01:00
Benjamin Otte
c0af2d6fa6 stylecontext: Simplify code
Compute the differences only once and not in both if branches.
2015-01-07 14:26:47 +01:00
Benjamin Otte
7493e814a9 cssanimatedstyle: Apply animation values after creation
This makes GtkCssAnimatedStyle immutable.
2015-01-07 14:26:47 +01:00
Benjamin Otte
a3bf910585 cssanimatedstyle: Make advancing the style return a new style
This is another step towards making CssStyles immutable.
2015-01-07 14:26:47 +01:00