aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-spinner.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-12 07:16:13 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-12 07:16:13 +0800
commitba8e5adcfe00c659f055d0e851a895c2b83e2554 (patch)
treef8e41153d765cbc6666e26d2fc2fcf74b2e8edde /lib/widgets/ephy-spinner.c
parentd3938a1cec5e2520289e37ff1ce5e2f808c97f03 (diff)
downloadgsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar.gz
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar.bz2
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar.lz
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar.xz
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.tar.zst
gsoc2013-epiphany-ba8e5adcfe00c659f055d0e851a895c2b83e2554.zip
Make spinner not use a visible window, and fix coordinates accordingly.
2004-06-12 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-spinner.c: (ephy_spinner_new), (ephy_spinner_init), (ephy_spinner_expose): Make spinner not use a visible window, and fix coordinates accordingly. Patch by Crispin Flowerday, fixes bug #134686.
Diffstat (limited to 'lib/widgets/ephy-spinner.c')
-rw-r--r--lib/widgets/ephy-spinner.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index 19ddae8bb..7467b85cb 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -105,7 +105,9 @@ ephy_spinner_get_type (void)
GtkWidget *
ephy_spinner_new (void)
{
- return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, NULL));
+ return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER,
+ "visible-window", FALSE,
+ NULL));
}
static gboolean
@@ -164,8 +166,6 @@ ephy_spinner_init (EphySpinner *spinner)
{
GtkWidget *widget = GTK_WIDGET (spinner);
- GTK_WIDGET_UNSET_FLAGS (spinner, GTK_NO_WINDOW);
-
gtk_widget_set_events (widget,
gtk_widget_get_events (widget)
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
@@ -261,8 +261,8 @@ ephy_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
x_offset = (widget->allocation.width - width) / 2;
y_offset = (widget->allocation.height - height) / 2;
- pix_area.x = x_offset;
- pix_area.y = y_offset;
+ pix_area.x = x_offset + widget->allocation.x;
+ pix_area.y = y_offset + widget->allocation.y;
pix_area.width = width;
pix_area.height = height;
@@ -274,7 +274,8 @@ ephy_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
gc = gdk_gc_new (widget->window);
gdk_draw_pixbuf (widget->window, gc, pixbuf,
- dest.x - x_offset, dest.y - y_offset,
+ dest.x - x_offset - widget->allocation.x,
+ dest.y - y_offset - widget->allocation.y,
dest.x, dest.y,
dest.width, dest.height,
GDK_RGB_DITHER_MAX, 0, 0);