Commit Graph

19010 Commits

Author SHA1 Message Date
Benjamin Otte
67260eec22 container: Deprecate resize mode
Resize modes don't work anymore, both because nobody ever uses them and
because the frame clock changed the way things work quite a bit. So we
don't want to advertise them as a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=708787
2013-10-05 15:09:53 +02:00
Benjamin Otte
303cf53f3f icontheme: Use rgba() when loading symbolic icons
This way, we correctly pass on translucency information. Note: This
currently requires librsvg master.
2013-10-05 13:57:51 +02:00
Benjamin Otte
0e6a9858e1 stylecontext: Deprecate gtk_style_context_invalidate()
Everything is invalidated automatically these days.
2013-10-05 13:57:51 +02:00
Benjamin Otte
7f0c29bcd7 texthandle: Use the parent widget's style context
... instead of creating our own.
2013-10-05 13:57:51 +02:00
Sébastien Wilmet
ab112a2096 Improve doc of gtk_style_context_invalidate()
https://bugzilla.gnome.org/show_bug.cgi?id=708583
2013-10-05 13:57:51 +02:00
William Jon McCann
6f17c408e6 notebook: inform the theme to draw borders when requested
When the show-border property is TRUE ask the theme to draw
borders on the notebook header.
2013-10-04 18:14:25 -04:00
William Jon McCann
053433010b notebook: add style classes for orientation to the header 2013-10-04 18:14:25 -04:00
William Jon McCann
db60046af4 notebook: correctly define the header region
Correctly define the header region to only be the area under the
tabs.
2013-10-04 18:14:25 -04:00
Debarshi Ray
35be1c8b56 places sidebar: Small cleanup 2013-10-03 18:30:39 +02:00
Timm Bäder
01d278a74f gtk_list_box_set_focus: Handle ist_box == NULL
Rows without a parent GtkListBox can happen in Glade and its previewer.
2013-10-03 14:05:12 +02:00
Bastien Nocera
744b790fdb iconhelper: Fix leak when rendering to cairo surface
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
e53bb1bf1b iconhelper: Use g_clear_* helpers
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
8938f3c47d icon-theme: Fix 2 memory leaks in GtkIconInfo
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
7c595bcc53 icon-theme: Use g_clear_* helpers in finalize
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
William Jon McCann
e9b9fd20b9 notebook: Add a style property for whether to draw a tab gap
Add a has-tab-gap style property to GtkNotebook so that we can
disable drawing the gap between tabs and the page in the Adwaita
theme without breaking existing themes.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
b609377e3e notebook: Fix rounding error in vertical alignment of arrow
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
e07fec3e83 notebook: Make notebook scroll arrows honor initial gap setting
So that they can be styled so they are not right on the edge.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
8dd100d9b0 notebook: Improve the style of the default arrows
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
William Jon McCann
81b0808849 notebook: Use initial-gap on both edges of the tab header
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
Alexander Larsson
79e5069dff GtkTextView: Fix horizontal scrolling
We didn't properly invalidate when scrolling horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=708019
2013-10-02 16:23:41 +02:00
Alexander Larsson
1ac13435b7 GtkTextView: Fix regression in GtkSourceView drawing
GtkSourceView draws before chaining upo to GtkTextView and assumes
that this will be visible, but the pixelcache will just overdraw
that with background.

So, we stop drawing the background to the pixel cache and instead
make it an CAIRO_CONTENT_COLOR_ALPHA surface to make the previously
drawn content see through.

This is slower, but more backwards compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=708423
2013-10-02 16:23:41 +02:00
Matthias Clasen
5abff7bd4c Improve gtk_container_add docs
Mention that some containers add intermediate children automatically.
2013-09-30 20:53:19 -04:00
Matthias Clasen
c02a12a746 Make it possible to hide custom titlebars
Previously, we were showing and hiding the custom titlebar
widget in response to state changes such as maximization.
Instead, use gtk_widget_set_child_visible() and leave
show/hide to applications. This makes it possible to set
a custom titlebar and hide it, for a titlebar-less appearance.

https://bugzilla.gnome.org/show_bug.cgi?id=707132
2013-09-30 20:19:08 -04:00
William Jon McCann
41b9a17dfc Fix typo in gtk-win32-base.css 2013-09-30 18:27:13 -04:00
Cosimo Cecchi
3d602f5b0a icontheme: use g_file_load_contents() for symbolic icons
When loading a symbolic icon, g_file_get_contents() is currently used
with the icon pathname, to load its SVG data. This won't work when the
icon is not a local file, for instance when a symbolic icon is loaded
from a GFileIcon with a GResource path.
Fortunately GtkIconInfo already holds a GFile, so we can just use
g_file_load_contents() to load the data instead.

https://bugzilla.gnome.org/show_bug.cgi?id=709056
2013-09-30 09:45:22 -07:00
Tristan Van Berkom
28a3638448 gtk-doc fixup for gtk_widget_class_bind_template_child_full()
Updated documentation to specify that '0' should be specified if
one does not need to automatically assign a bound child to a public
or private instance member (now that negative values are private
structure offsets).
2013-09-30 17:29:22 +02:00
Ryan Lortie
e3b9ea5ab6 GtkTreeViewColumn: start padding at 0
If we start with a padding of -1 then it can leak out of the size
allocation request for the column when the treeview is empty.  The
GtkTreeView will then collect these -1 values and add them together,
returning -n where 'n' is the number of columns.

This is usually not a problem because treeviews tend to be used with a
scrollbar and the width of the scrollbar will be added to this number
bringing it into positive territory again.  On Ubuntu, with overlay
scrollbars, this is not the case, however.

https://bugzilla.gnome.org/show_bug.cgi?id=703062
2013-09-30 09:23:00 -04:00
Behdad Esfahbod
b0e168d58f Bug 467720 - Useless use of const qualifier 2013-09-28 14:14:31 -04:00
John Ralls
124e814f47 Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents 2013-09-28 10:55:22 -07:00
John Ralls
133a0c7426 Clarify Cursor Theme GDK Warning 2013-09-28 10:05:29 -07:00
Matthias Clasen
3f6a1dc9a9 More formatting style adjustments
Lose a whole bunch of unnecessary 'real', shortening
excessively long function names.
2013-09-27 22:00:38 -04:00
Matthias Clasen
c31a34d5ee Some coding style improvements
Use g_return_if_fail in GTK+ style in all public APIs,
avoid dereferencing variables early, shorten some
function names.
2013-09-27 21:39:10 -04:00
Matthias Clasen
58621b00de Trivial: remove an unused declaration
_gtk_list_box_accessible_update_selected is not used and
does not exist.
2013-09-27 20:32:39 -04:00
Bastien Nocera
f5291660e0 Fix possible crash in header bar
When the header bar's top-level widget is not a GtkWindow,
don't try to get the inexistant "decoration-button-layout"
property.
2013-09-27 17:27:31 +02:00
Matthias Clasen
377c124446 csd: Avoid jumping windows
The size of the shadow and invisible borders can (and usually
will) change between backdrop and focused windows, while the
overall window size remains unchanged. This causes the visible
window to visually 'jump'. We can avoid this by always reserving
the maximum of the focused and unfocused border sizes. The code
for positioning the input-only windows making up the invisible
border is adjusted to deal with this. We now always place the
invisible border right outside the visible content, even if the
shadow extends out much farther.

https://bugzilla.gnome.org/show_bug.cgi?id=707524
2013-09-26 23:19:29 -04:00
Cosimo Cecchi
71ad9a8fdd notebook: render a frame and background in the header
And use the "header" style class to do that.
This allows themes to set e.g. the background of the tab header
differently.

Themes will need slight adjustment to make things appear
as before.

https://bugzilla.gnome.org/show_bug.cgi?id=643914
2013-09-26 19:27:54 -04:00
Cosimo Cecchi
a2ed88b3ee Allow active tab children to be styled
This allows one to style the children of an active
tab label from CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=691163
2013-09-26 19:19:53 -04:00
Matthias Clasen
bd1df33798 Trivial: correct vfunc signatures
Harmless confusion between gint and gboolean
https://bugzilla.gnome.org/show_bug.cgi?id=697031
2013-09-26 19:16:14 -04:00
Sébastien Wilmet
f75aa5fdb4 GtkTextView: add create_buffer virtual method pointer
This allows subclasses of GtkTextView that require a corresponding
subclass of GtkTextBuffer to automatically do the right thing when
constructed with a NULL buffer. An example of this is GtkSourceView
which requires a GtkSourceBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=708584
2013-09-26 18:36:20 +02:00
Matthias Clasen
7439e03f3d Fixups to GtkStack
The GtkStack and GtkStackSwitcher code did not really
follow GTK+ conventions for includes. Fix that, and also
fix up a case of gpointer vs gpointer* confusion
in gtkstack.c.
2013-09-25 23:54:31 -04:00
Matthias Clasen
5315661721 Use a stack in GtkAboutDialog
This lets us slide the credits and license sections up and down,
instead of just popping them into existence abruptly.
2013-09-25 23:54:31 -04:00
Matthias Clasen
98b78ed5da GtkStack: Add more transition types
This adds new 'over' and 'under' transitions which work by moving
the new page over the previous one, or moving the previous page off
to reveal the new one. We also add an over/under combination that
is going to be used in GtkAboutDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=707187
2013-09-25 23:54:12 -04:00
Matthias Clasen
17aae0477f GtkAboutDialog: prevent unintended visibility
Some of the labels were not marked as no-show-all. But the
code clearly tries to manage their visibility, so gtk_widget_show_all()
should not affect them.

https://bugzilla.gnome.org/show_bug.cgi?id=681484
2013-09-25 22:51:33 -04:00
Paolo Borelli
e59c28743a Add a needs-attention child property to GtkStack
The child property is watched by the StackSwicther which in turns sets a
needs-attention css class on the corresponding button, so that the theme
can for instance show a throbbing animation if one of the hidden pages
needs the user attention.

https://bugzilla.gnome.org/show_bug.cgi?id=707153
2013-09-25 22:34:22 -04:00
Mario Sanchez Prada
8d83d989bb a11y: don't shutdown accessibility, so the atk bridge is always valid
This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

https://bugzilla.gnome.org/show_bug.cgi?id=708024

https://bugzilla.gnome.org/show_bug.cgi?id=684076
2013-09-25 20:14:04 -04:00
Cosimo Cecchi
6f9fed45ef entrycompletion: set the GtkWindow as attached to the GtkEntry
This way themes can easily select that window to apply custom styles.

https://bugzilla.gnome.org/show_bug.cgi?id=708414
2013-09-25 20:06:43 -04:00
Alexander Larsson
68c450468e icon-theme: Better handling of unscaled icon directories
If an icon is in a Fixed or Threshold directory we normally don't
scale it. However, in the case of HiDPI scaling we *do* want to
scale it, to avoid different layouts in Lo/HiDPI. We look up whatever
the size of the icon would have been in LoDPI and scale to that
in the no-scaling case, thus getting the same layout as the
unscaled case.

https://bugzilla.gnome.org/show_bug.cgi?id=708384
2013-09-23 12:45:34 +02:00
Alexander Larsson
a001dc0ec7 icon-theme: Make icon_info_new() have some args
This gets rid of a bunch of duplicated code.
2013-09-23 12:45:34 +02:00
Matthias Clasen
e5317f0f9a Improve struct packing in various places 2013-09-21 23:50:55 -04:00
Matthias Clasen
d137f74fe9 Remove priv pointer from GtkStackSwitcher
This is a new widget, so lets avoid the unnecessary
priv pointer while we still can.
2013-09-21 23:50:55 -04:00