[evince/687-adwaita-dark-while-typing-font-in-forms-is-unreadable-white-on-white: 17/17] remove '.flat' style from PDF forms GtkEntry's
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/687-adwaita-dark-while-typing-font-in-forms-is-unreadable-white-on-white: 17/17] remove '.flat' style from PDF forms GtkEntry's
- Date: Thu, 24 Jan 2019 02:05:06 +0000 (UTC)
commit 4633c6bc75135c96ab97231927109bd866f9ada9
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Sun Dec 23 17:30:44 2018 +0000
remove '.flat' style from PDF forms GtkEntry's
As that style adds a transparent background which
causes a white-on-white effect when using a
white-on-black theme (eg. Adwaita dark).
Issue #687
libview/ev-view.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 602cc24c..61394882 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -2472,6 +2472,7 @@ ev_view_form_field_text_create_widget (EvView *view,
EvFormFieldText *field_text = EV_FORM_FIELD_TEXT (field);
GtkWidget *text = NULL;
gchar *txt;
+ GtkStyleContext *context;
txt = ev_document_forms_form_field_text_get_text (EV_DOCUMENT_FORMS (view->document),
field);
@@ -2482,6 +2483,10 @@ ev_view_form_field_text_create_widget (EvView *view,
case EV_FORM_FIELD_TEXT_NORMAL:
text = gtk_entry_new ();
gtk_entry_set_has_frame (GTK_ENTRY (text), FALSE);
+ /* Remove '.flat' style added by previous call
+ * gtk_entry_set_has_frame(FALSE) which caused bug #687 */
+ context = gtk_widget_get_style_context (text);
+ gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FLAT);
gtk_entry_set_max_length (GTK_ENTRY (text), field_text->max_len);
gtk_entry_set_visibility (GTK_ENTRY (text), !field_text->is_password);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]