[gnome-builder] editor: tweak background for spell check widget
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: tweak background for spell check widget
- Date: Mon, 10 Jul 2017 21:42:08 +0000 (UTC)
commit c8185236af85cbc5ceded922713118048c8bce71
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 10 14:41:30 2017 -0700
editor: tweak background for spell check widget
This also moves to DzlBin so that we can use it's helpers for
drawing the background.
Signed-off-by: Christian Hergert <chergert redhat com>
data/themes/shared.css | 6 ++++++
libide/editor/ide-editor-spell-widget.c | 6 ++++--
libide/editor/ide-editor-spell-widget.h | 5 ++---
libide/editor/ide-editor-spell-widget.ui | 2 +-
4 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/data/themes/shared.css b/data/themes/shared.css
index 746f586..a29a7ea 100644
--- a/data/themes/shared.css
+++ b/data/themes/shared.css
@@ -365,3 +365,9 @@ popover.transfers list row > box {
padding: 10px;
}
+ideeditorspellwidget {
+ background: @theme_bg_color;
+}
+ideeditorspellwidget:backdrop {
+ background: @theme_unfocused_bg_color;
+}
diff --git a/libide/editor/ide-editor-spell-widget.c b/libide/editor/ide-editor-spell-widget.c
index 1ba0371..13534db 100644
--- a/libide/editor/ide-editor-spell-widget.c
+++ b/libide/editor/ide-editor-spell-widget.c
@@ -39,7 +39,7 @@ typedef enum
struct _IdeEditorSpellWidget
{
- GtkBin parent_instance;
+ DzlBin parent_instance;
GspellNavigator *navigator;
IdeSourceView *view;
@@ -89,7 +89,7 @@ struct _IdeEditorSpellWidget
guint spellchecking_status : 1;
};
-G_DEFINE_TYPE (IdeEditorSpellWidget, ide_editor_spell_widget, GTK_TYPE_BIN)
+G_DEFINE_TYPE (IdeEditorSpellWidget, ide_editor_spell_widget, DZL_TYPE_BIN)
#define CHECK_WORD_INTERVAL_MIN 100
#define DICT_CHECK_WORD_INTERVAL_MIN 100
@@ -1256,6 +1256,8 @@ ide_editor_spell_widget_class_init (IdeEditorSpellWidgetClass *klass)
gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, dict_add_button);
gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, dict_words_list);
gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, count_box);
+
+ gtk_widget_class_set_css_name (widget_class, "ideeditorspellwidget");
}
static void
diff --git a/libide/editor/ide-editor-spell-widget.h b/libide/editor/ide-editor-spell-widget.h
index c08bb08..0820f45 100644
--- a/libide/editor/ide-editor-spell-widget.h
+++ b/libide/editor/ide-editor-spell-widget.h
@@ -19,8 +19,7 @@
#ifndef IDE_EDITOR_SPELL_WIDGET_H
#define IDE_EDITOR_SPELL_WIDGET_H
-#include <glib-object.h>
-#include <gtk/gtk.h>
+#include <dazzle.h>
#include "sourceview/ide-source-view.h"
@@ -28,7 +27,7 @@ G_BEGIN_DECLS
#define IDE_TYPE_EDITOR_SPELL_WIDGET (ide_editor_spell_widget_get_type())
-G_DECLARE_FINAL_TYPE (IdeEditorSpellWidget, ide_editor_spell_widget, IDE, EDITOR_SPELL_WIDGET, GtkBin)
+G_DECLARE_FINAL_TYPE (IdeEditorSpellWidget, ide_editor_spell_widget, IDE, EDITOR_SPELL_WIDGET, DzlBin)
GtkWidget *ide_editor_spell_widget_new (IdeSourceView *source_view);
GtkWidget *ide_editor_spell_widget_get_entry (IdeEditorSpellWidget *self);
diff --git a/libide/editor/ide-editor-spell-widget.ui b/libide/editor/ide-editor-spell-widget.ui
index 0ea1e72..b21959b 100644
--- a/libide/editor/ide-editor-spell-widget.ui
+++ b/libide/editor/ide-editor-spell-widget.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.15 -->
- <template class="IdeEditorSpellWidget" parent="GtkBin">
+ <template class="IdeEditorSpellWidget" parent="DzlBin">
<child>
<object class="GtkGrid">
<property name="visible">true</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]