These properties use GdkRGBA to render the cell renderer's content.
Note that Pango attributes are used to render the foreground color,
so the alpha value is currently ignored.
Carlos Garnacho [Thu, 21 Oct 2010 13:26:40 +0000 (15:26 +0200)]
GdkWindow: Add gdk_window_set_background_rgba()
This new function takes a GdkRGBA in order to set the background to
an alpha color. Keep in mind that RGBA visuals and a composited environment
are still necessary to have an alpha background displayed.
Carlos Garnacho [Thu, 21 Oct 2010 13:23:48 +0000 (15:23 +0200)]
Add GdkRGBA struct to supersede GdkColor
GdkRGBA is a boxed struct similar to GdkColor, with the difference
that it stores alpha information as well, and colors are stored in
[0..1] doubles, in the cairo spirit.
gdk_cairo_set_source_rgba() has been also added to allow easier handling
of this new type.
Matthias Clasen [Fri, 22 Oct 2010 16:46:33 +0000 (18:46 +0200)]
Move min-display-width/height to GtkScrolledWindow
It is just too annoying to have to implement these properties in
every scrollable. Instead, we now have ::min-content-height/width
in GtkScrolledWindow.
We also add GtkScrollablePolicy to determine how to size the
scrollable content.
Emmanuele Bassi [Fri, 22 Oct 2010 15:12:16 +0000 (16:12 +0100)]
recent-manager: Coalesce multiple changes
Since the ::changed implementation of GtkRecentManager implies a
synchronous write operation, when we receive multiple requests to emit a
::changed signal we might end up blocking.
This change coalesces multiple ::changed emission requests using the
following sequence:
• the first request will install a timeout in 250 ms, which will
emit the ::changed signal
• each further request while the timeout has not been emitted
will increase a counter
‣ if the counter reaches 250 before the timeout has been
emitted, then the RecentManager will remove the timeout
source and force a signal emission and reset the counter
This sequence should guarantee that frequent ::changed emission requests
are coalesced, and also guarantee that we don't let them dangle for too
long.
Fixed problems with combination of height-for-width apis and
alignment/margin vfuncs adjust_size_request/allocation
Now get_height_for_width() will internally update the for_width
before passing it to the real height_for_width() vfunc, allowing
margins and extra space for alignments to be stripped, thus requesting
sufficient height for greater than natural widths (and also accounting
for margins properly). Test case adjusted in testadjustsize to ensure
proper behavior.
Michael Natterer [Fri, 22 Oct 2010 15:01:58 +0000 (17:01 +0200)]
gtk: fix tool palette scroll adjustment setting
Create a new adjustment if there was *no* adjustment passed in, not
the other way around. Also remove unused function
gtk_tool_palette_set_adjustment().
Tadej Borovšak [Mon, 18 Oct 2010 04:21:39 +0000 (00:21 -0400)]
Add GtkScrollable interface
The GtkScrollable interface provides "hadjustment" and "vadjustment"
properties that are used by GtkScrolledWindow. It replaces
the ::set_scroll_adjustment signal. The scrollable interface
also has ::min-display-width/height properties that can be
used to control the minimally visible part inside a scrolled window.
Matthias Clasen [Thu, 21 Oct 2010 11:09:25 +0000 (13:09 +0200)]
Make GtkEntry a no-window widget
Use input-only windows for capturing input, and just draw onto
the parent window. This allows themes to make entries with rounded
corners. Patch by Boram Park.
Michael Natterer [Thu, 21 Oct 2010 10:54:08 +0000 (12:54 +0200)]
gtk: change GtkIconView to "support" actual trees
Remove the check for GTK_TREE_MODEL_LIST_ONLY and make the view
display only the first level of the tree, ignoring all insert, remove
etc. events on the model's branches. This enables generic application
code which always produces GtkTreeStores (also for flat lists) to
display grids of these flat trees.
We lookup a widget to call a function on GtkWidget that ends up just
performing an operation directly on the GdkWindow again anyway
(beeping). There's already fallback code at the point of the call that
does exactly that anyway, so just do that all of the time.
Michael Natterer [Wed, 20 Oct 2010 14:58:18 +0000 (16:58 +0200)]
gtk: clean up GtkWidget signals
- add slots for damage-event, move-focus and keynav-failed
- reorder signals a bit so related stuff is grouped together
- some indentation fixes in the GtkWidgetClass
- remove the move-focus compat hack from GtkTextView
- turn the move-focus compat hack in GtkWindow into properly
implementing GtkWidget::move-focus()
Emmanuele Bassi [Tue, 19 Oct 2010 17:14:46 +0000 (18:14 +0100)]
Split off gtkprivate.h
The gtkprivate.h header contains GtkWidget-specific private symbols that
are not useful except in a handful of cases. Basically everything
includes gtkprivate.h for the GTK_PARAM_* macros.
Emmanuele Bassi [Tue, 19 Oct 2010 10:47:40 +0000 (11:47 +0100)]
settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.
Benjamin Otte [Mon, 18 Oct 2010 17:08:55 +0000 (19:08 +0200)]
cups: Add hack to work around gcc warning
gcc warns if you switch on values that are not part of the enum you're
switching on. So handle those cases in the default handler by using if
statments.
Benjamin Otte [Mon, 18 Oct 2010 15:34:33 +0000 (17:34 +0200)]
widget: Remove special case in gtk_widget_queue_draw_area()
This path would only do anything where widget->window was not located at
widget->allocation.x/y but at a different position. This should never
happen in the real world. But if it does, GTK3 will break for you.
Better fix your widget.
Icon view must layout before the draw handler is called
gtk_icon_view_layout(), which can resize the bin window and thus
underlying surfaces, could be called from gtk_icon_view_draw(). So
we have to make sure that layouting is done before the draw handler is
called. We use the same construction as in tree view here, the layout
idle handler is installed with a higher priority than
GDK_PRIORITY_REDRAW and we wrap the call to gdk_window_process_updates()
in a new function that will flush the layout queue beforehand.
Allow GtkComboBox popup to be wider than the combo itself.
This patch adds a GtkComboBox:popup-fixed-width to decide if the
popup's width should be a fixed width matching the combo's allocated width.
The patch includes a kindof hack to work around treeviews currently
not supporting height-for-width geometry (for list-mode only), this
hack can be safely removed once treeviews start reporting natural
widths properly.