- size = MIN (text_size, max_size);
- size = MAX (size, column_width - 2 * COLUMN_TITLES_HEIGHT);
-
- row = sheet->active_cell.row;
- col = sheet->active_cell.col;
-
- shentry_allocation.x = g_sheet_column_start_pixel (sheet->column_geometry, sheet->active_cell.col);
- shentry_allocation.y = g_sheet_row_start_pixel (sheet->row_geometry, sheet->active_cell.row);
- if ( sheet->column_titles_visible)
- shentry_allocation.y += sheet->column_title_area.height;
-
- shentry_allocation.y -= sheet->vadjustment->value;
-
- if ( sheet->row_titles_visible)
- shentry_allocation.x += sheet->row_title_area.width;
-
- shentry_allocation.x -= sheet->hadjustment->value;
-
- shentry_allocation.width = column_width;
- shentry_allocation.height = g_sheet_row_get_height (sheet->row_geometry, sheet->active_cell.row);
-
- if (GTK_IS_ITEM_ENTRY (sheet->entry_widget))
- {
- shentry_allocation.height -= 2 * COLUMN_TITLES_HEIGHT;
- shentry_allocation.y += COLUMN_TITLES_HEIGHT;
- shentry_allocation.width = size;
-
- switch (GTK_ITEM_ENTRY (sheet_entry)->justification)
- {
- case GTK_JUSTIFY_CENTER:
- shentry_allocation.x += column_width / 2 - size / 2;
- break;
- case GTK_JUSTIFY_RIGHT:
- shentry_allocation.x += column_width - size - COLUMN_TITLES_HEIGHT;
- break;
- case GTK_JUSTIFY_LEFT:
- case GTK_JUSTIFY_FILL:
- shentry_allocation.x += COLUMN_TITLES_HEIGHT;
- break;
- }
- }
-
- if (!GTK_IS_ITEM_ENTRY (sheet->entry_widget))
- {
- shentry_allocation.x += 2;
- shentry_allocation.y += 2;
- shentry_allocation.width -= MIN (shentry_allocation.width, 3);
- shentry_allocation.height -= MIN (shentry_allocation.height, 3);
- }
-
- gtk_widget_size_allocate (sheet->entry_widget, &shentry_allocation);
-
- if (previous_style == style) g_object_unref (previous_style);