The property editor, copied from testgtk.
Tue Jun 15 19:59:33 2004 Matthias Clasen <maclas@gmx.de> * libegg/iconlist/prop-editor.[hc]: The property editor, copied from testgtk. Tue Jun 15 19:57:44 2004 Matthias Clasen <maclas@gmx.de> * libegg/iconlist/testiconlist.c (main): Show off some more features of the icon list: rtl layout, sorting, context menus. Also add a property editor. Tue Jun 15 20:01:49 2004 Matthias Clasen <maclas@gmx.de> * libegg/iconlist/eggiconlist.c (egg_icon_list_layout_single_row): Support rtl layout.
This commit is contained in:

committed by
Matthias Clasen

parent
3d8b7d14db
commit
47425e34a4
@ -1452,6 +1452,7 @@ egg_icon_list_layout_single_row (EggIconList *icon_list, GList *first_item, gint
|
|||||||
gint icon_padding;
|
gint icon_padding;
|
||||||
gint left_margin, right_margin;
|
gint left_margin, right_margin;
|
||||||
gint maximum_layout_width;
|
gint maximum_layout_width;
|
||||||
|
gboolean rtl = gtk_widget_get_direction (GTK_WIDGET (icon_list)) == GTK_TEXT_DIR_RTL;
|
||||||
|
|
||||||
x = 0;
|
x = 0;
|
||||||
max_height = 0;
|
max_height = 0;
|
||||||
@ -1486,9 +1487,12 @@ egg_icon_list_layout_single_row (EggIconList *icon_list, GList *first_item, gint
|
|||||||
maximum_layout_width = MAX (item->pixbuf_width, MINIMUM_ICON_ITEM_WIDTH);
|
maximum_layout_width = MAX (item->pixbuf_width, MINIMUM_ICON_ITEM_WIDTH);
|
||||||
|
|
||||||
item->y = *y;
|
item->y = *y;
|
||||||
item->x = x;
|
item->x = rtl ? GTK_WIDGET (icon_list)->allocation.width - item->width - x : x;
|
||||||
|
|
||||||
if (item->width < MINIMUM_ICON_ITEM_WIDTH) {
|
if (item->width < MINIMUM_ICON_ITEM_WIDTH) {
|
||||||
|
if (rtl)
|
||||||
|
item->x -= (MINIMUM_ICON_ITEM_WIDTH - item->width) / 2;
|
||||||
|
else
|
||||||
item->x += (MINIMUM_ICON_ITEM_WIDTH - item->width) / 2;
|
item->x += (MINIMUM_ICON_ITEM_WIDTH - item->width) / 2;
|
||||||
x += (MINIMUM_ICON_ITEM_WIDTH - item->width);
|
x += (MINIMUM_ICON_ITEM_WIDTH - item->width);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user