summaryrefslogtreecommitdiff
path: root/plugins/gtkui/ddblistview.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-03 21:51:58 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-03 21:51:58 +0200
commitf896a3e7d10bc3d5cf6a9eb292159b676ef66ac5 (patch)
tree63c8b260c3b85d1baa613bd36db7727b41a77746 /plugins/gtkui/ddblistview.c
parentf5a42be89f5acd1a171a671a71cdd9b3a5f8991f (diff)
handle on the fly theme/font changing in custom widgets
Diffstat (limited to 'plugins/gtkui/ddblistview.c')
-rw-r--r--plugins/gtkui/ddblistview.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c
index 8a417ce6..46b3684b 100644
--- a/plugins/gtkui/ddblistview.c
+++ b/plugins/gtkui/ddblistview.c
@@ -534,6 +534,14 @@ ddb_listview_list_configure_event (GtkWidget *widget,
gpointer user_data)
{
DdbListview *ps = DDB_LISTVIEW (gtk_object_get_data (GTK_OBJECT (widget), "owner"));
+
+ draw_init_font (widget->style);
+ int height = draw_get_font_size () + 12;
+ if (height != ps->rowheight) {
+ ps->rowheight = height;
+ ddb_listview_build_groups (ps);
+ }
+
ddb_listview_list_setup_vscroll (ps);
ddb_listview_list_setup_hscroll (ps);
widget = ps->list;
@@ -2040,6 +2048,11 @@ ddb_listview_header_configure_event (GtkWidget *widget,
gpointer user_data)
{
DdbListview *ps = DDB_LISTVIEW (gtk_object_get_data (GTK_OBJECT (widget), "owner"));
+ draw_init_font (widget->style);
+ int height = draw_get_font_size () + 12;
+ if (height != widget->allocation.height) {
+ gtk_widget_set_size_request (widget, -1, height);
+ }
if (ps->backbuf_header) {
g_object_unref (ps->backbuf_header);
ps->backbuf_header = NULL;