}
-#define BORDER_WIDTH 4
+#define BORDER_WIDTH 2
static void
gtk_sheet_realize (GtkWidget *widget)
gdk_draw_rectangle (sheet->sheet_window,
sheet->xor_gc,
FALSE,
- area.x - BORDER_WIDTH / 2,
- area.y - BORDER_WIDTH / 2,
- area.width + BORDER_WIDTH,
- area.height + BORDER_WIDTH);
+ area.x,
+ area.y,
+ area.width + 1,
+ area.height + 1);
}
rectangle_from_cell (sheet, sheet->active_cell.row,
sheet->active_cell.col, &entry_alloc);
+ entry_alloc.width -= BORDER_WIDTH;
+ entry_alloc.height -= BORDER_WIDTH;
+ entry_alloc.x += BORDER_WIDTH / 2;
+ entry_alloc.y += BORDER_WIDTH / 2;
+
+
gtk_widget_set_size_request (sheet->entry_widget, entry_alloc.width,
entry_alloc.height);
gtk_widget_size_allocate (sheet->entry_widget, &entry_alloc);
gtk_widget_size_request (sheet->entry_widget, NULL);
+ if ( GTK_IS_ENTRY (sheet->entry_widget))
+ {
+ g_object_set (sheet->entry_widget,
+ "has-frame", FALSE,
+ NULL);
+ }
+
if (GTK_WIDGET_REALIZED (sheet))
{
gtk_widget_set_parent_window (sheet->entry_widget, sheet->sheet_window);