aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface-gtk/interface.c')
-rw-r--r--src/interface-gtk/interface.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c
index 665a635..c09feb2 100644
--- a/src/interface-gtk/interface.c
+++ b/src/interface-gtk/interface.c
@@ -782,8 +782,6 @@ teco_interface_set_css_variables(teco_view_t *view)
guint32 calltip_fg_color = teco_view_ssm(view, SCI_STYLEGETFORE, STYLE_CALLTIP, 0);
guint32 calltip_bg_color = teco_view_ssm(view, SCI_STYLEGETBACK, STYLE_CALLTIP, 0);
- guint text_height = teco_cmdline_ssm(SCI_TEXTHEIGHT, 0, 0);
-
/*
* Generates a CSS that sets some predefined color variables.
* This effectively "exports" Scintilla styles into the CSS
@@ -810,12 +808,13 @@ teco_interface_set_css_variables(teco_view_t *view)
gtk_css_provider_load_from_data(teco_interface.css_var_provider, css, -1, NULL);
/*
- * The font and size of the commandline view might have changed,
+ * The font and size and height of the command-line view might have changed,
* so we resize it.
* This cannot be done via CSS or Scintilla messages.
- * Currently, it is always exactly one line high in order to mimic the Curses UI.
*/
- gtk_widget_set_size_request(GTK_WIDGET(teco_cmdline.view), -1, text_height);
+ g_assert(teco_cmdline.height > 0);
+ gtk_widget_set_size_request(GTK_WIDGET(teco_cmdline.view), -1,
+ teco_cmdline.height*teco_cmdline_ssm(SCI_TEXTHEIGHT, 0, 0));
}
static void
@@ -1291,7 +1290,7 @@ static void
teco_interface_cmdline_size_allocate_cb(GtkWidget *widget,
GdkRectangle *allocation, gpointer user_data)
{
- teco_cmdline_resize(allocation->width);
+ teco_cmdline_resized(allocation->width);
}
static gboolean