Compare commits

...

15 Commits

Author SHA1 Message Date
Matthias Clasen
dcb267bcda Grr, try again to fix GtkExpander docs 2011-01-05 22:46:40 -05:00
Tristan Van Berkom
3bc33066d7 Ensure that GtkIconView items get redrawn when the focus cell changes.
Seems the redraw was not happenning from keynav when set_focus_cell()
was called because keynav already updates the focus-cell. Now we
just unconditionally redraw the focus item when set_focus_cell() is
called.
2011-01-06 01:30:17 +09:00
Tristan Van Berkom
223b5bd1ea Fixed GtkIconView keynav
Icon View was not initially setting focus on a cell when
focus initially comes into the view. Focusing into whatever
is the first cell in the cursor item when set_cursor_item
is called with a NULL cell fixes this.
2011-01-05 21:58:32 +09:00
Tristan Van Berkom
df72c3aef2 Fixed gtkiconview dispose cycle to not fire warnings. 2011-01-05 19:44:29 +09:00
Tristan Van Berkom
59f5003061 Restored the old GtkIconView guess for wrap-width/width size of text cell
GtkIconView sets the minimum width of the text cell to be at least 50
pixels and otherwise twice the width of the first pixbuf cell found
in the icon list.
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
eb31ea1210 Made GtkIconView reset the context and invalidate all sizes when a row changes.
GtkIconView should have a "grow-only" mode to handle optimization to
only allow icons to grow in width when rows change, however since
GtkIconView still does not handle large numbers of rows for now we'll
just relayout the whole thing whenever a series of rows change.

Also fixed up to watch the context incase of implicit resets.
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
ddfe5e6f36 Removed gtk_icon_view_get_item_area()
Now use a GdkRectangle at the begining of the GtkIconViewItem
structure and just re-cast the struct to get the item area.
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
1fd59c3b0d Fixed GtkIconView buildable custom tag end to let cell layout properly
handle <cell-packing>
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
95a40246d4 Added gtk_icon_view_new_with_area() 2011-01-05 19:44:29 +09:00
Tristan Van Berkom
47a1eeb8e3 GtkIconView now uses a per-row GtkCellAreaContext to store the alignments
of each row.

GtkIconView now properly calculates the height of each row separately
using a separate GtkCellAreaContext stored in an array which it can
always easily index with the item->row index for all purposes.
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
b68fb6aa85 Alignments with variable row heights almost works perfectly.
However, I'm going to have to figure a way to store the alignments
for rows separately, this may involve using a separate GtkCellAreaContext
for each row, unfortunately.
2011-01-05 19:44:29 +09:00
Tristan Van Berkom
8927a2efb8 Experimenting with allocating the context a different height for each row. 2011-01-05 19:44:28 +09:00
Tristan Van Berkom
865a99dddb Committing working version of GtkIconView using GtkCellArea.
Some things still not sorted out, GtkCellAreaContext is not allocated
so icons dont recieve alignments yet, focus navigation is not exactly
what it used to be (maybe we can work around that by observing the
item orientation and explicitly setting focus to the same cell when
navigating in the wrong orientation).
2011-01-05 19:44:28 +09:00
Tristan Van Berkom
0d40f1a3c0 Initial messy commit of GtkIconView using GtkCellArea (nothing works yet). 2011-01-05 19:44:28 +09:00
Tristan Van Berkom
38add6b597 Added GtkCellArea & GtkCellAreaContext to GtkIconView
First commit to icon-view-refactor, essentially only adds the
construct-only "cell-area" property and the context but doesnt
use it.
2011-01-05 19:44:28 +09:00
5 changed files with 720 additions and 1406 deletions

View File

@@ -1621,6 +1621,7 @@ gtk_hseparator_get_type
GtkIconView
GtkIconViewForeachFunc
gtk_icon_view_new
gtk_icon_view_new_with_area
gtk_icon_view_new_with_model
gtk_icon_view_set_model
gtk_icon_view_get_model

View File

@@ -1241,6 +1241,7 @@ gtk_icon_view_get_type G_GNUC_CONST
gtk_icon_view_get_visible_range
gtk_icon_view_item_activated
gtk_icon_view_new
gtk_icon_view_new_with_area
gtk_icon_view_new_with_model
gtk_icon_view_path_is_selected
gtk_icon_view_scroll_to_path

View File

@@ -26,16 +26,14 @@
* @Short_description: A container which can hide its child
* @Title: GtkExpander
*
* <para>
* A #GtkExpander allows the user to hide or show its child by clicking
* on an expander triangle similar to the triangles used in a #GtkTreeView.
* </para>
* <para>
*
* Normally you use an expander as you would use any other descendant
* of #GtkBin; you create the child widget and use gtk_container_add()
* to add it to the expander. When the expander is toggled, it will take
* care of showing and hiding the child automatically.
* </para>
*
* <refsect2 id="expander-special-usage">
* <title>Special Usage</title>
* <para>

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,7 @@
#include <gtk/gtkcontainer.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtkcellrenderer.h>
#include <gtk/gtkcellarea.h>
#include <gtk/gtkselection.h>
#include <gtk/gtktooltip.h>
@@ -112,6 +113,7 @@ struct _GtkIconViewClass
GType gtk_icon_view_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_icon_view_new (void);
GtkWidget * gtk_icon_view_new_with_area (GtkCellArea *area);
GtkWidget * gtk_icon_view_new_with_model (GtkTreeModel *model);
void gtk_icon_view_set_model (GtkIconView *icon_view,