[libgda] Have a unique CSS file for Libgdaui
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Have a unique CSS file for Libgdaui
- Date: Sat, 25 Aug 2012 17:18:32 +0000 (UTC)
commit 8fa8fb457cc16d975a6d0487ea9ba6f0fa528d9c
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Aug 25 19:17:46 2012 +0200
Have a unique CSS file for Libgdaui
and bumped GLib requirement to 2.32 to use GResources
configure.ac | 5 +-
control-center/gdaui-dsn-assistant.c | 14 +------
libgda-ui/.gitignore | 2 +
libgda-ui/Makefile.am | 16 ++++++-
libgda-ui/data-entries/gdaui-entry-shell.c | 33 ----------------
libgda-ui/demos/ddl_queries.c | 1 +
libgda-ui/gdaui-combo.c | 27 +++++--------
libgda-ui/gdaui-data-proxy-info.c | 16 --------
libgda-ui/gdaui-init.c | 29 ++++++++++++++
libgda-ui/gdaui-rt-editor.c | 13 ------
libgda-ui/gdaui.css | 50 +++++++++++++++++++++++++
libgda-ui/gdaui.gresource.xml | 6 +++
testing/gdaui-test-rt-editor.c | 3 +-
tools/browser/common/ui-formgrid.c | 1 +
tools/browser/data-manager/data-console.c | 2 +
tools/browser/query-exec/query-console-page.c | 1 +
16 files changed, 121 insertions(+), 98 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index dc9d5c6..dbe66a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ m4_undefine([minor])
m4_undefine([micro])
dnl required versions of other tools.
-m4_define([req_ver_glib],[2.28.0])
+m4_define([req_ver_glib],[2.32.0])
#
# Making releases:
@@ -131,9 +131,10 @@ fi
AM_CONDITIONAL(HAVE_GDU, test x$have_gdu != xno)
dnl ******************************
-dnl glib-genmarshal
+dnl glib utilities
dnl ******************************
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
dnl ******************************
dnl Translations
diff --git a/control-center/gdaui-dsn-assistant.c b/control-center/gdaui-dsn-assistant.c
index fdd515c..b697e0a 100644
--- a/control-center/gdaui-dsn-assistant.c
+++ b/control-center/gdaui-dsn-assistant.c
@@ -570,25 +570,13 @@ gdaui_dsn_assistant_init (GdauiDsnAssistant *assistant,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE);
vp = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (vp, "gdaui-transparent-background");
gtk_viewport_set_shadow_type (GTK_VIEWPORT (vp), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (sw), vp);
assistant->priv->newdb_box = vp;
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
assistant->priv->newdb_params = NULL;
- /* CSS theming */
- GtkStyleContext *context;
- GtkStyleProvider *provider;
-#define CSS "* {\n" \
- "background-color : transparent;\n" \
- "}"
- provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
- gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider), CSS, -1, NULL);
- context = gtk_widget_get_style_context (vp);
- gtk_style_context_add_provider (context, provider, G_MAXUINT);
- g_object_unref (provider);
-
-
gtk_widget_show_all (vbox);
gtk_assistant_append_page (assist, vbox);
diff --git a/libgda-ui/.gitignore b/libgda-ui/.gitignore
index ded2312..f2a37e4 100644
--- a/libgda-ui/.gitignore
+++ b/libgda-ui/.gitignore
@@ -7,3 +7,5 @@ gdaui-enum-types.h
libgdaui.def
Gdaui-5.0.gir
Gdaui-5.0.typelib
+gdaui-resources.h
+gdaui-resources.c
\ No newline at end of file
diff --git a/libgda-ui/Makefile.am b/libgda-ui/Makefile.am
index 1649dcd..0165eb7 100644
--- a/libgda-ui/Makefile.am
+++ b/libgda-ui/Makefile.am
@@ -68,6 +68,8 @@ ui_sources = \
gdaui-set.h \
gdaui-set.c \
gdaui-tree-store.c \
+ gdaui-resources.h \
+ gdaui-resources.c \
gdaui-init.c
libgda_ui_5_0_la_SOURCES = \
@@ -108,7 +110,7 @@ s-enum-types-c: @REBUILD@ $(ui_headers) Makefile
libgda_ui_built_headers = gdaui-enum-types.h
libgda_ui_built_cfiles = gdaui-enum-types.c
-$(OBJECTS) $(libgda_ui_5_0_la_OBJECTS): $(libgda_ui_built_headers) $(libgda_ui_built_cfiles)
+$(OBJECTS) $(libgda_ui_5_0_la_OBJECTS): gdaui-resources.h gdaui-resources.c $(libgda_ui_built_headers) $(libgda_ui_built_cfiles)
libgda_ui_5_0_la_LDFLAGS = -version-info $(GDA_CURRENT):$(GDA_REVISION):$(GDA_AGE) \
$(NO_UNDEFINED) $(LIBTOOL_UI_EXPORT_OPTIONS)
@@ -152,13 +154,21 @@ CLEANFILES = $(libgda_ui_built_headers) $(libgda_ui_built_cfiles) \
gdaui-enum-types.c \
s-enum-types-c \
libgda-ui.def \
- libgda-ui-$(GDA_ABI_VERSION).lib
+ libgda-ui-$(GDA_ABI_VERSION).lib \
+ gdaui-resources.h \
+ gdaui-resources.c
DTD_FILES = gdaui-layout.dtd
dtddir=$(datadir)/libgda-$(GDA_ABI_MAJOR_VERSION).$(GDA_ABI_MINOR_VERSION)/dtd
dtd_DATA=$(DTD_FILES)
-EXTRA_DIST = $(DTD_FILES) libgda-ui.symbols
+gdaui-resources.h gdaui-resources.c: $(srcdir)/gdaui.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/gdaui.gresource.xml)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name _gdaui --manual-register $<
+
+EXTRA_DIST = $(DTD_FILES) \
+ libgda-ui.symbols \
+ gdaui.css \
+ gdaui.gresource.xml
if ENABLE_GDAUI_GI
-include $(INTROSPECTION_MAKEFILE)
diff --git a/libgda-ui/data-entries/gdaui-entry-shell.c b/libgda-ui/data-entries/gdaui-entry-shell.c
index 6f3c8b3..ce8ff1d 100644
--- a/libgda-ui/data-entries/gdaui-entry-shell.c
+++ b/libgda-ui/data-entries/gdaui-entry-shell.c
@@ -70,7 +70,6 @@ struct _GdauiEntryShellPriv {
/* get a pointer to the parents to be able to call their destructor */
static GObjectClass *parent_class = NULL;
-static GtkCssProvider *css_provider = NULL;
/**
* gdaui_entry_shell_get_type:
@@ -143,21 +142,6 @@ gdaui_entry_shell_init (GdauiEntryShell *shell)
GtkWidget *button, *hbox, *arrow;
GValue *gval;
- if (!css_provider) {
- css_provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (css_provider,
- "* {\n"
- "-GtkArrow-arrow-scaling: 0.4;\n"
- "margin: 0;\n"
- "padding: 0;\n"
- "border-style: none;\n"
- "border-width: 0;\n"
- "-GtkButton-default-border: 0;\n"
- "-GtkButton-default-outside-border: 0;\n"
- "-GtkButton-inner-border: 0}",
- -1, NULL);
- }
-
/* Private structure */
shell->priv = g_new0 (GdauiEntryShellPriv, 1);
shell->priv->embedder = NULL;
@@ -175,38 +159,21 @@ gdaui_entry_shell_init (GdauiEntryShell *shell)
/* Setting the initial layout */
gtk_viewport_set_shadow_type (GTK_VIEWPORT (shell), GTK_SHADOW_NONE);
gtk_container_set_border_width (GTK_CONTAINER (shell), 0);
- gtk_style_context_add_provider (gtk_widget_get_style_context ((GtkWidget*) shell),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
/* hbox */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (shell), hbox);
gtk_widget_show (hbox);
shell->priv->hbox = hbox;
- gtk_style_context_add_provider (gtk_widget_get_style_context (hbox),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
/* vbox to insert the real widget to edit data */
shell->priv->embedder = widget_embedder_new ();
- gtk_style_context_add_provider (gtk_widget_get_style_context (shell->priv->embedder),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_box_pack_start (GTK_BOX (hbox), shell->priv->embedder, TRUE, TRUE, 0);
gtk_widget_show (shell->priv->embedder);
/* button to change the entry's state and to display that state */
arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
- gtk_style_context_add_provider (gtk_widget_get_style_context (arrow),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-
button = gtk_button_new ();
- gtk_style_context_add_provider (gtk_widget_get_style_context (button),
- GTK_STYLE_PROVIDER (css_provider),
- G_MAXUINT);
-
gtk_container_add (GTK_CONTAINER (button), arrow);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
shell->priv->button = button;
diff --git a/libgda-ui/demos/ddl_queries.c b/libgda-ui/demos/ddl_queries.c
index 6b4d7dd..9c6bf87 100644
--- a/libgda-ui/demos/ddl_queries.c
+++ b/libgda-ui/demos/ddl_queries.c
@@ -119,6 +119,7 @@ do_ddl_queries (GtkWidget *do_widget)
gtk_widget_set_size_request (sw, 600, 450);
gtk_grid_attach (GTK_GRID (grid), sw, 0, 4, 2, 1);
vp = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (vp, "gdaui-transparent-background");
gtk_viewport_set_shadow_type (GTK_VIEWPORT (vp), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (sw), vp);
data->op_container = vp;
diff --git a/libgda-ui/gdaui-combo.c b/libgda-ui/gdaui-combo.c
index 0dee5db..8d82bd9 100644
--- a/libgda-ui/gdaui-combo.c
+++ b/libgda-ui/gdaui-combo.c
@@ -76,7 +76,6 @@ enum {
/* get a pointer to the parents to be able to call their destructor */
static GObjectClass *parent_class = NULL;
-static GtkCssProvider *css_provider = NULL;
/*
* GdauiCombo class implementation
@@ -166,18 +165,6 @@ gdaui_combo_init (GdauiCombo *combo, G_GNUC_UNUSED GdauiComboClass *klass)
gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo), 0);
combo->priv->changed_id = g_signal_connect (combo, "changed",
G_CALLBACK (selection_changed_cb), NULL);
-
- if (!css_provider) {
- css_provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (css_provider,
- "#gdaui-combo-as-list {\n"
- "-GtkComboBox-appears-as-list : 1;\n"
- "-GtkComboBox-arrow-size : 5}",
- -1, NULL);
- }
- gtk_style_context_add_provider (gtk_widget_get_style_context ((GtkWidget*) combo),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
static void
@@ -224,10 +211,16 @@ gdaui_combo_set_property (GObject *object,
0, NULL);
break;
case PROP_AS_LIST: {
- if (g_value_get_boolean (value))
- gtk_widget_set_name ((GtkWidget*) combo, "gdaui-combo-as-list");
- else
- gtk_widget_set_name ((GtkWidget*) combo, NULL);
+ GtkStyleContext *style;
+ style = gtk_widget_get_style_context (GTK_WIDGET (combo));
+ if (g_value_get_boolean (value)) {
+ gtk_style_context_remove_class (style, "gdaui-combo-normal");
+ gtk_style_context_add_class (style, "gdaui-combo-as-list");
+ }
+ else {
+ gtk_style_context_remove_class (style, "gdaui-combo-as-list");
+ gtk_style_context_add_class (style, "gdaui-combo-normal");
+ }
break;
}
default :
diff --git a/libgda-ui/gdaui-data-proxy-info.c b/libgda-ui/gdaui-data-proxy-info.c
index 7e8c117..c4b02e7 100644
--- a/libgda-ui/gdaui-data-proxy-info.c
+++ b/libgda-ui/gdaui-data-proxy-info.c
@@ -77,7 +77,6 @@ struct _GdauiDataProxyInfoPriv
/* get a pointer to the parents to be able to call their destructor */
static GObjectClass *parent_class = NULL;
-static GtkCssProvider *css_provider = NULL;
/* properties */
enum {
@@ -467,15 +466,6 @@ modif_buttons_make (GdauiDataProxyInfo *info)
GtkWidget *wid;
GdauiDataProxyInfoFlag flags = info->priv->flags;
- if (!css_provider) {
- css_provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (css_provider,
- "* {\n"
- "-GtkToolbar-shadow-type : none;\n"
- "-GtkSpinButton-shadow-type : none}",
- -1, NULL);
- }
-
if (! info->priv->data_proxy)
return;
@@ -552,9 +542,6 @@ modif_buttons_make (GdauiDataProxyInfo *info)
g_object_ref_sink (info->priv->buttons_bar);
gtk_toolbar_set_icon_size (GTK_TOOLBAR (info->priv->buttons_bar), GTK_ICON_SIZE_MENU);
g_object_set (G_OBJECT (info->priv->buttons_bar), "toolbar-style", GTK_TOOLBAR_ICONS, NULL);
- gtk_style_context_add_provider (gtk_widget_get_style_context (info->priv->buttons_bar),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_box_pack_start (GTK_BOX (info), info->priv->buttons_bar, TRUE, TRUE, 0);
gtk_widget_show (info->priv->buttons_bar);
@@ -590,9 +577,6 @@ modif_buttons_make (GdauiDataProxyInfo *info)
wid = gtk_spin_button_new_with_range (0, 1, 1);
gtk_widget_override_font (wid, fdc);
- gtk_style_context_add_provider (gtk_widget_get_style_context (wid),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (wid), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wid), TRUE);
gtk_box_pack_start (GTK_BOX (toolwid), wid, FALSE, TRUE, 2);
diff --git a/libgda-ui/gdaui-init.c b/libgda-ui/gdaui-init.c
index b839cb3..9216ee2 100644
--- a/libgda-ui/gdaui-init.c
+++ b/libgda-ui/gdaui-init.c
@@ -37,6 +37,7 @@
#include "data-entries/gdaui-data-cell-renderer-textual.h"
#include "data-entries/gdaui-data-cell-renderer-boolean.h"
#include "data-entries/gdaui-data-cell-renderer-bin.h"
+#include "gdaui-resources.h"
/* plugins list */
@@ -86,6 +87,34 @@ gdaui_init (void)
if (! gdaui_plugins_hash)
gdaui_plugins_hash = init_plugins_hash ();
+ /* initialize CSS */
+ GBytes *css_data;
+ GError *error = NULL;
+ _gdaui_register_resource ();
+ css_data = g_resources_lookup_data ("/gdaui/gdaui.css", G_RESOURCE_LOOKUP_FLAGS_NONE, &error);
+ if (css_data) {
+ GtkCssProvider *css_provider;
+ css_provider = gtk_css_provider_new ();
+ if (gtk_css_provider_load_from_data (css_provider,
+ (gchar*) g_bytes_get_data (css_data, NULL), -1,
+ &error))
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
+ GTK_STYLE_PROVIDER (css_provider),
+ G_MAXUINT);
+ else {
+ g_warning ("Could not parse resource CSS data: %s",
+ error && error->message ? error->message : _("No detail"));
+ g_clear_error (&error);
+ }
+ g_object_unref (css_provider);
+ }
+ else {
+ g_warning ("Could not load resource CSS data: %s",
+ error && error->message ? error->message : _("No detail"));
+ g_clear_error (&error);
+ }
+ _gdaui_unregister_resource ();
+
initialized = TRUE;
}
diff --git a/libgda-ui/gdaui-rt-editor.c b/libgda-ui/gdaui-rt-editor.c
index 1d11548..10b8898 100644
--- a/libgda-ui/gdaui-rt-editor.c
+++ b/libgda-ui/gdaui-rt-editor.c
@@ -89,7 +89,6 @@ struct _GdauiRtEditorPriv
/* get a pointer to the parents to be able to call their destructor */
static GObjectClass *parent_class = NULL;
-static GtkCssProvider *css_provider = NULL;
static gchar *help_str=N_("\"\"\"= Title level 1 =\n"
"== Title level 2 ==\n"
"\"\"\"= Title level 1 =\n"
@@ -404,18 +403,6 @@ gdaui_rt_editor_init (GdauiRtEditor *rte)
/* toolbar */
toolbar = gtk_ui_manager_get_widget (rte->priv->uimanager, "/ToolBar");
-
- if (!css_provider) {
- css_provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (css_provider,
- "* {\n"
- "-GtkToolbar-shadow-type : none}",
- -1, NULL);
- }
- gtk_style_context_add_provider (gtk_widget_get_style_context ((GtkWidget*) toolbar),
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-
gtk_toolbar_set_icon_size (GTK_TOOLBAR (toolbar), GTK_ICON_SIZE_MENU);
rte->priv->toolbar = toolbar;
gtk_box_pack_end (GTK_BOX (rte), toolbar, FALSE, FALSE, 0);
diff --git a/libgda-ui/gdaui.css b/libgda-ui/gdaui.css
new file mode 100644
index 0000000..ffbbc22
--- /dev/null
+++ b/libgda-ui/gdaui.css
@@ -0,0 +1,50 @@
+#gdaui-transparent-background {
+ background-color : transparent;
+}
+
+GdauiEntryShell {
+ -GtkArrow-arrow-scaling: 0.4;
+ margin: 0;
+ padding: 0;
+ border-style: none;
+ border-width: 0;
+ -GtkButton-default-border: 0;
+ -GtkButton-default-outside-border: 0;
+ -GtkButton-inner-border: 0;
+ background-color : transparent;
+}
+
+GdauiCombo.gdaui-combo-as-list {
+ -GtkComboBox-appears-as-list : true;
+}
+
+GdauiCombo.gdaui-combo-normal {
+ -GtkComboBox-appears-as-list : false;
+}
+
+GdauiCombo, GdauiCombo GtkButton, GdauiCombo GtkArrow, GdauiCombo GtkBox {
+ -GtkArrow-arrow-scaling: 0.4;
+ -GtkComboBox-arrow-size : 4;
+ border-style: none;
+ border-width: 0px;
+ margin: 0px;
+ padding: 0px;
+ -GtkButton-default-border: 0px;
+ -GtkButton-default-outside-border: 0px;
+ -GtkButton-inner-border: 0px;
+}
+
+GdauiDataProxyInfo * {
+ -GtkToolbar-shadow-type : none;
+ -GtkSpinButton-shadow-type : none;
+ border-style: none;
+ border-width: 0px;
+}
+
+GdauiRtEditor GtkToolbar {
+ -GtkToolbar-shadow-type : none;
+ border-style: none;
+ border-width: 0px;
+ margin: 0px;
+ padding: 0px;
+}
diff --git a/libgda-ui/gdaui.gresource.xml b/libgda-ui/gdaui.gresource.xml
new file mode 100644
index 0000000..b47086e
--- /dev/null
+++ b/libgda-ui/gdaui.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/gdaui">
+ <file compressed="true">gdaui.css</file>
+ </gresource>
+</gresources>
diff --git a/testing/gdaui-test-rt-editor.c b/testing/gdaui-test-rt-editor.c
index 66831ff..603273c 100644
--- a/testing/gdaui-test-rt-editor.c
+++ b/testing/gdaui-test-rt-editor.c
@@ -19,7 +19,7 @@
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixdata.h>
#include <string.h>
-#include <libgda-ui/gdaui-rt-editor.h>
+#include <libgda-ui/libgda-ui.h>
#ifdef GDA_DEBUG
static gboolean
@@ -187,6 +187,7 @@ create_window (void)
int main (int argc, char ** argv)
{
gtk_init (& argc, & argv);
+ gdaui_init ();
/*
* Creation et mise en place de la fenetre:
diff --git a/tools/browser/common/ui-formgrid.c b/tools/browser/common/ui-formgrid.c
index d04e26b..57f4f6d 100644
--- a/tools/browser/common/ui-formgrid.c
+++ b/tools/browser/common/ui-formgrid.c
@@ -250,6 +250,7 @@ ui_formgrid_show (GtkWidget *widget)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_NONE);
vp = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (vp, "gdaui-transparent-background");
gtk_container_add (GTK_CONTAINER (sw), vp);
gtk_viewport_set_shadow_type (GTK_VIEWPORT (vp), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (vp), formgrid->priv->raw_form);
diff --git a/tools/browser/data-manager/data-console.c b/tools/browser/data-manager/data-console.c
index dbb327d..7f6a0d4 100644
--- a/tools/browser/data-manager/data-console.c
+++ b/tools/browser/data-manager/data-console.c
@@ -336,6 +336,7 @@ data_console_new (BrowserConnection *bcnc)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
dconsole->priv->params_form_box = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (dconsole->priv->params_form_box, "gdaui-transparent-background");
gtk_viewport_set_shadow_type (GTK_VIEWPORT (dconsole->priv->params_form_box), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (sw), dconsole->priv->params_form_box);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
@@ -890,6 +891,7 @@ compose_mode_toggled_cb (G_GNUC_UNUSED GtkToggleAction *action, DataConsole *dco
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE);
vp = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (vp, "gdaui-transparent-background");
gtk_viewport_set_shadow_type (GTK_VIEWPORT (vp), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (sw), vp);
diff --git a/tools/browser/query-exec/query-console-page.c b/tools/browser/query-exec/query-console-page.c
index 49520fc..d9f6554 100644
--- a/tools/browser/query-exec/query-console-page.c
+++ b/tools/browser/query-exec/query-console-page.c
@@ -346,6 +346,7 @@ query_console_page_new (BrowserConnection *bcnc)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
tconsole->priv->params_form_box = gtk_viewport_new (NULL, NULL);
+ gtk_widget_set_name (tconsole->priv->params_form_box, "gdaui-transparent-background");
gtk_viewport_set_shadow_type (GTK_VIEWPORT (tconsole->priv->params_form_box), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (sw), tconsole->priv->params_form_box);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]