[gnumeric] GUI: Theme background for full-sheet graphs.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Theme background for full-sheet graphs.
- Date: Wed, 27 Mar 2013 16:07:11 +0000 (UTC)
commit b952e0654bd5a881120c7a53828c1999444d925d
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 27 12:06:46 2013 -0400
GUI: Theme background for full-sheet graphs.
src/gnumeric.css | 11 +++++++++++
src/sheet-control-gui.c | 16 ++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/src/gnumeric.css b/src/gnumeric.css
index f4f9b6f..f2ac8ef 100644
--- a/src/gnumeric.css
+++ b/src/gnumeric.css
@@ -122,6 +122,17 @@ GtkDrawingArea.button.all {
}
/* ------------------------------------------------------------------------- */
+/* This is for full-sheet sheet object, presumably graphs. */
+
+GocCanvas.full-sheet {
+ background-image: none;
+ background-color: white;
+ padding: 0;
+ border-style: none;
+ border-width: 0;
+}
+
+/* ------------------------------------------------------------------------- */
/* GnmNotebook is a fake notebook holding just the sheet tabs area */
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index abb16c3..2bc9c01 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -1610,7 +1610,7 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
scg->va = (GtkAdjustment *)gtk_adjustment_new (0., 0., 1, 1., 1., 1.);
scg->vs = g_object_new (GTK_TYPE_SCROLLBAR,
"orientation", GTK_ORIENTATION_VERTICAL,
- "adjustment", scg->va,
+ "adjustment", scg->va,
NULL);
g_signal_connect (G_OBJECT (scg->vs),
"value_changed",
@@ -1686,11 +1686,13 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
g_object_ref (scg->grid);
sheet->hide_col_header = sheet->hide_row_header = FALSE;
if (sheet->sheet_type == GNM_SHEET_OBJECT) {
- scg->vs = g_object_new (GOC_TYPE_CANVAS, NULL);
- g_object_set (scg->vs,
- "hexpand", TRUE,
- "vexpand", TRUE,
- NULL);
+ /* WHY store this in ->vs? */
+ scg->vs = g_object_new (GOC_TYPE_CANVAS,
+ "hexpand", TRUE,
+ "vexpand", TRUE,
+ NULL);
+ gtk_style_context_add_class (gtk_widget_get_style_context (scg->vs),
+ "full-sheet");
gtk_grid_attach (scg->grid, scg->vs, 0, 0, 1, 1);
gtk_widget_set_can_focus (scg->vs, TRUE);
gtk_widget_set_can_default (scg->vs, TRUE);
@@ -1699,8 +1701,6 @@ sheet_control_gui_new (SheetView *sv, WBCGtk *wbcg)
}
sv_attach_control (sv, SHEET_CONTROL (scg));
if (scg->vs) {
-#warning GTK3: we used GtkStyle::white there */
- gtk_widget_override_background_color (scg->vs, GTK_STATE_FLAG_NORMAL, &gs_white);
g_object_set_data (G_OBJECT (scg->vs), "sheet-control", scg);
if (sheet->sheet_objects) {
/* we need an idle function because not every thing is initialized at this
point */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]