Add css style classes to parts of the register

This commit is contained in:
Robert Fewell 2017-08-01 09:05:30 +01:00
parent 60ff88041d
commit 8468783ad8
4 changed files with 12 additions and 0 deletions

View File

@ -606,6 +606,9 @@ gnc_header_init (GncHeader *header)
header->width = 400;
header->style = NULL;
// Set the style context for this widget so it can be easily manipulated with css
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(header)), "GncRegisterHeader");
gtk_widget_add_events(GTK_WIDGET(header), (GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK

View File

@ -505,6 +505,9 @@ gnc_item_edit_new (GnucashSheet *sheet)
NULL);
gtk_layout_put (GTK_LAYOUT(sheet), GTK_WIDGET(item_edit), 0, 0);
// Set the style context for this widget so it can be easily manipulated with css
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(item_edit)), "GncRegisterItemEdit");
/* Create the text entry */
item_edit->editor = gtk_entry_new();
sheet->entry = item_edit->editor;

View File

@ -346,6 +346,9 @@ gnucash_register_init (GnucashRegister *g_reg)
gtk_widget_set_can_focus (GTK_WIDGET(table), FALSE);
gtk_widget_set_can_default (GTK_WIDGET(table), FALSE);
// Set the style context for this widget so it can be easily manipulated with css
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(g_reg)), "GncRegister");
gtk_grid_set_row_homogeneous (GTK_GRID(table), FALSE);
gtk_grid_set_column_homogeneous (GTK_GRID(table), FALSE);
}

View File

@ -2503,6 +2503,9 @@ gnucash_sheet_init (GnucashSheet *sheet)
gtk_widget_set_can_focus (GTK_WIDGET(sheet), TRUE);
gtk_widget_set_can_default (GTK_WIDGET(sheet), TRUE);
// Set the style context for this widget so it can be easily manipulated with css
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(sheet)), "GncRegisterSheet");
sheet->num_visible_blocks = 1;
sheet->num_visible_phys_rows = 1;