Mercurial > vim
comparison src/gui_xim.c @ 34283:6f13dee16af9 v9.1.0078
patch 9.1.0078: GTK3: using wrong style for pre-edit area
Commit: https://github.com/vim/vim/commit/b1457d4cb9185b2b8d575b7736eff6d3a97d89eb
Author: lilydjwg <lilydjwg@gmail.com>
Date: Tue Feb 6 10:49:14 2024 +0100
patch 9.1.0078: GTK3: using wrong style for pre-edit area
Problem: GTK3: using wrong style for pre-edit area
Solution: remove the widget name, adjust css
(lilydjwg)
closes: #13972
Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 06 Feb 2024 11:00:12 +0100 |
parents | a0a4a774117b |
children |
comparison
equal
deleted
inserted
replaced
34282:890bf6a6c957 | 34283:6f13dee16af9 |
---|---|
323 } | 323 } |
324 | 324 |
325 #if GTK_CHECK_VERSION(3,16,0) | 325 #if GTK_CHECK_VERSION(3,16,0) |
326 { | 326 { |
327 GtkStyleContext * const context | 327 GtkStyleContext * const context |
328 = gtk_widget_get_style_context(gui.drawarea); | 328 = gtk_widget_get_style_context(preedit_label); |
329 GtkCssProvider * const provider = gtk_css_provider_new(); | 329 GtkCssProvider * const provider = gtk_css_provider_new(); |
330 gchar *css = NULL; | 330 gchar *css = NULL; |
331 const char * const fontname | 331 const char * const fontname |
332 = pango_font_description_get_family(gui.norm_font); | 332 = pango_font_description_get_family(gui.norm_font); |
333 gint fontsize | 333 gint fontsize |
347 fontsize_propval = g_strdup_printf("%dpx", fontsize); | 347 fontsize_propval = g_strdup_printf("%dpx", fontsize); |
348 else | 348 else |
349 fontsize_propval = g_strdup_printf("inherit"); | 349 fontsize_propval = g_strdup_printf("inherit"); |
350 | 350 |
351 css = g_strdup_printf( | 351 css = g_strdup_printf( |
352 "widget#vim-gui-preedit-area {\n" | 352 "#vim-gui-preedit-area {\n" |
353 " font-family: %s,monospace;\n" | 353 " font-family: %s,monospace;\n" |
354 " font-size: %s;\n" | 354 " font-size: %s;\n" |
355 " color: #%.2lx%.2lx%.2lx;\n" | 355 " color: #%.2lx%.2lx%.2lx;\n" |
356 " background-color: #%.2lx%.2lx%.2lx;\n" | 356 " background-color: #%.2lx%.2lx%.2lx;\n" |
357 "}\n", | 357 "}\n", |