add a 'paned' mode to the function to let it draw the seven dots, instead
2000-02-23 Jonathan Blandford <jrb@redhat.com> * gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to the function to let it draw the seven dots, instead of the old, much maligned, method. (draw_dot): New function to draw a dot. * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation to draw the handle inside the border width as opposed to outside. Use paint function instead of gdk_draw_point. * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation to draw the handle inside the border width as opposed to outside. Use paint function instead of gdk_draw_point. * gtk/gtkfilesel.c (gtk_file_selection_update_history_menu): Change indenting to be more GTK like.
This commit is contained in:

committed by
Jonathan Blandford

parent
2444c80ff7
commit
6654a22891
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
2000-02-23 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstyle.c (gtk_default_draw_handle): add a 'paned' mode to
|
||||||
|
the function to let it draw the seven dots, instead of the old,
|
||||||
|
much maligned, method.
|
||||||
|
(draw_dot): New function to draw a dot.
|
||||||
|
|
||||||
|
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate): changed allocation
|
||||||
|
to draw the handle inside the border width as opposed to outside.
|
||||||
|
Use paint function instead of gdk_draw_point.
|
||||||
|
|
||||||
|
* gtk/gtkfilesel.c (gtk_file_selection_update_history_menu):
|
||||||
|
Change indenting to be more GTK like.
|
||||||
|
|
||||||
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
Wed Feb 23 10:54:14 GMT 2000 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: New section on GtkCalendar
|
* docs/gtk_tut.sgml: New section on GtkCalendar
|
||||||
|
@ -1303,9 +1303,12 @@ gtk_file_selection_update_history_menu (GtkFileSelection *fs,
|
|||||||
/* since the autocompletion gets confused if you don't
|
/* since the autocompletion gets confused if you don't
|
||||||
* supply a trailing '/' on a dir entry, set the full
|
* supply a trailing '/' on a dir entry, set the full
|
||||||
* (current) path to "" which just refreshes the filesel */
|
* (current) path to "" which just refreshes the filesel */
|
||||||
if (dir_len == i) {
|
if (dir_len == i)
|
||||||
|
{
|
||||||
callback_arg->directory = g_strdup ("");
|
callback_arg->directory = g_strdup ("");
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
callback_arg->directory = g_strdup (current_dir);
|
callback_arg->directory = g_strdup (current_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
||||||
/* GTK - The GIMP Toolkit
|
/* GTK - The GIMP Toolkit
|
||||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||||
*
|
*
|
||||||
@ -181,9 +180,9 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
|||||||
/* Move the handle before the children so we don't get extra expose events */
|
/* Move the handle before the children so we don't get extra expose events */
|
||||||
|
|
||||||
paned->handle_xpos = paned->child1_size + border_width;
|
paned->handle_xpos = paned->child1_size + border_width;
|
||||||
paned->handle_ypos = 0;
|
paned->handle_ypos = border_width;
|
||||||
paned->handle_width = paned->handle_size;
|
paned->handle_width = paned->handle_size;
|
||||||
paned->handle_height = widget->allocation.height;
|
paned->handle_height = widget->allocation.height - 2 * border_width;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (widget))
|
if (GTK_WIDGET_REALIZED (widget))
|
||||||
{
|
{
|
||||||
@ -253,74 +252,19 @@ gtk_hpaned_draw (GtkWidget *widget,
|
|||||||
|
|
||||||
if (gdk_rectangle_intersect (&handle_area, area, &child_area))
|
if (gdk_rectangle_intersect (&handle_area, area, &child_area))
|
||||||
{
|
{
|
||||||
if (widget->allocation.height > 2)
|
child_area.x -= paned->handle_xpos;
|
||||||
{
|
child_area.y -= paned->handle_ypos;
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
gtk_paint_handle (widget->style,
|
||||||
paned->handle_size/2,
|
paned->handle,
|
||||||
paned->handle_height/2);
|
GTK_STATE_NORMAL,
|
||||||
gdk_draw_point (paned->handle,
|
GTK_SHADOW_NONE,
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
&child_area,
|
||||||
paned->handle_size/2 - 1,
|
widget,
|
||||||
paned->handle_height/2 - 1);
|
"paned",
|
||||||
}
|
0, 0, -1, -1,
|
||||||
if (widget->allocation.height > 11)
|
GTK_ORIENTATION_VERTICAL);
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 + 5);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 + 4);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 - 5);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 - 6);
|
|
||||||
}
|
|
||||||
if (widget->allocation.height > 20)
|
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 - 10);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 - 11);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 + 10);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 + 9);
|
|
||||||
}
|
|
||||||
if (widget->allocation.height > 30)
|
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 - 15);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 - 16);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_size/2,
|
|
||||||
paned->handle_height/2 + 15);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_size/2 - 1,
|
|
||||||
paned->handle_height/2 + 14);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Redraw the children
|
/* Redraw the children
|
||||||
*/
|
*/
|
||||||
|
@ -3079,6 +3079,33 @@ gtk_default_draw_slider (GtkStyle *style,
|
|||||||
width - style->klass->xthickness - 1, height / 2);
|
width - style->klass->xthickness - 1, height / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
draw_dot (GdkWindow *window,
|
||||||
|
GdkGC *light_gc,
|
||||||
|
GdkGC *dark_gc,
|
||||||
|
gint x,
|
||||||
|
gint y,
|
||||||
|
gushort size)
|
||||||
|
{
|
||||||
|
|
||||||
|
size = CLAMP (size, 2, 3);
|
||||||
|
|
||||||
|
if (size == 2)
|
||||||
|
{
|
||||||
|
gdk_draw_point (window, light_gc, x, y);
|
||||||
|
gdk_draw_point (window, light_gc, x+1, y+1);
|
||||||
|
}
|
||||||
|
else if (size == 3);
|
||||||
|
{
|
||||||
|
gdk_draw_point (window, light_gc, x, y);
|
||||||
|
gdk_draw_point (window, light_gc, x+1, y);
|
||||||
|
gdk_draw_point (window, light_gc, x, y+1);
|
||||||
|
gdk_draw_point (window, dark_gc, x+1, y+2);
|
||||||
|
gdk_draw_point (window, dark_gc, x+2, y+1);
|
||||||
|
gdk_draw_point (window, dark_gc, x+2, y+2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_default_draw_handle (GtkStyle *style,
|
gtk_default_draw_handle (GtkStyle *style,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
@ -3113,12 +3140,25 @@ gtk_default_draw_handle (GtkStyle *style,
|
|||||||
gtk_paint_box (style, window, state_type, shadow_type, area, widget,
|
gtk_paint_box (style, window, state_type, shadow_type, area, widget,
|
||||||
detail, x, y, width, height);
|
detail, x, y, width, height);
|
||||||
|
|
||||||
light_gc = style->light_gc[state_type];
|
|
||||||
dark_gc = style->dark_gc[state_type];
|
|
||||||
|
|
||||||
|
if (!strcmp (detail, "paned"))
|
||||||
|
{
|
||||||
|
/* we want to ignore the shadow border in paned widgets */
|
||||||
|
xthick = 0;
|
||||||
|
ythick = 0;
|
||||||
|
|
||||||
|
light_gc = style->light_gc[state_type];
|
||||||
|
dark_gc = style->black_gc;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
xthick = style->klass->xthickness;
|
xthick = style->klass->xthickness;
|
||||||
ythick = style->klass->ythickness;
|
ythick = style->klass->ythickness;
|
||||||
|
|
||||||
|
light_gc = style->light_gc[state_type];
|
||||||
|
dark_gc = style->dark_gc[state_type];
|
||||||
|
}
|
||||||
|
|
||||||
rect.x = x + xthick;
|
rect.x = x + xthick;
|
||||||
rect.y = y + ythick;
|
rect.y = y + ythick;
|
||||||
rect.width = width - (xthick * 2);
|
rect.width = width - (xthick * 2);
|
||||||
@ -3135,24 +3175,35 @@ gtk_default_draw_handle (GtkStyle *style,
|
|||||||
if (!intersect)
|
if (!intersect)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#define DRAW_POINT(w, gc, clip, xx, yy) \
|
gdk_gc_set_clip_rectangle (light_gc, &dest);
|
||||||
{ \
|
gdk_gc_set_clip_rectangle (dark_gc, &dest);
|
||||||
if ((xx) >= (clip).x \
|
|
||||||
&& (yy) >= (clip).y \
|
|
||||||
&& (xx) < (clip).x + (clip).width \
|
|
||||||
&& (yy) < (clip).y + (clip).height) \
|
|
||||||
gdk_draw_point ((w), (gc), (xx), (yy)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!strcmp (detail, "paned"))
|
||||||
|
{
|
||||||
|
gint window_width;
|
||||||
|
gint window_height;
|
||||||
|
|
||||||
|
gdk_window_get_size (window, &window_width, &window_height);
|
||||||
|
|
||||||
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||||
|
for (xx = window_width/2 - 15; xx <= window_width/2 + 15; xx += 5)
|
||||||
|
draw_dot (window, light_gc, dark_gc, xx, window_height/2 - 1, 3);
|
||||||
|
else
|
||||||
|
for (yy = window_height/2 - 15; yy <= window_height/2 + 15; yy += 5)
|
||||||
|
draw_dot (window, light_gc, dark_gc, window_width/2 - 1, yy, 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for (yy = y + ythick; yy < (y + height - ythick); yy += 3)
|
for (yy = y + ythick; yy < (y + height - ythick); yy += 3)
|
||||||
for (xx = x + xthick; xx < (x + width - xthick); xx += 6)
|
for (xx = x + xthick; xx < (x + width - xthick); xx += 6)
|
||||||
{
|
{
|
||||||
DRAW_POINT (window, light_gc, dest, xx, yy);
|
draw_dot (window, light_gc, dark_gc, xx, yy, 2);
|
||||||
DRAW_POINT (window, dark_gc, dest, xx + 1, yy + 1);
|
draw_dot (window, light_gc, dark_gc, xx + 3, yy + 1, 2);
|
||||||
|
|
||||||
DRAW_POINT (window, light_gc, dest, xx + 3, yy + 1);
|
|
||||||
DRAW_POINT (window, dark_gc, dest, xx + 4, yy + 2);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gdk_gc_set_clip_rectangle (light_gc, NULL);
|
||||||
|
gdk_gc_set_clip_rectangle (dark_gc, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -179,9 +179,9 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
/* Move the handle before the children so we don't get extra expose events */
|
/* Move the handle before the children so we don't get extra expose events */
|
||||||
|
|
||||||
paned->handle_xpos = 0;
|
paned->handle_xpos = border_width;
|
||||||
paned->handle_ypos = paned->child1_size + border_width;
|
paned->handle_ypos = paned->child1_size + border_width;
|
||||||
paned->handle_width = widget->allocation.width;
|
paned->handle_width = widget->allocation.width - 2 * border_width;
|
||||||
paned->handle_height = paned->handle_size;
|
paned->handle_height = paned->handle_size;
|
||||||
|
|
||||||
if (GTK_WIDGET_REALIZED(widget))
|
if (GTK_WIDGET_REALIZED(widget))
|
||||||
@ -247,79 +247,24 @@ gtk_vpaned_draw (GtkWidget *widget,
|
|||||||
|
|
||||||
handle_area.x = paned->handle_xpos;
|
handle_area.x = paned->handle_xpos;
|
||||||
handle_area.y = paned->handle_ypos;
|
handle_area.y = paned->handle_ypos;
|
||||||
handle_area.width = paned->handle_height;
|
handle_area.width = paned->handle_width;
|
||||||
handle_area.height = paned->handle_size;
|
handle_area.height = paned->handle_size;
|
||||||
|
|
||||||
if (gdk_rectangle_intersect (&handle_area, area, &child_area))
|
if (gdk_rectangle_intersect (&handle_area, area, &child_area))
|
||||||
{
|
{
|
||||||
if (widget->allocation.height > 2)
|
child_area.x -= paned->handle_xpos;
|
||||||
{
|
child_area.y -= paned->handle_ypos;
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
gtk_paint_handle (widget->style,
|
||||||
paned->handle_width/2,
|
paned->handle,
|
||||||
paned->handle_size/2);
|
GTK_STATE_NORMAL,
|
||||||
gdk_draw_point (paned->handle,
|
GTK_SHADOW_NONE,
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
&child_area,
|
||||||
paned->handle_width/2 - 1,
|
widget,
|
||||||
paned->handle_size/2 - 1);
|
"paned",
|
||||||
}
|
0, 0, -1, -1,
|
||||||
if (widget->allocation.height > 11)
|
GTK_ORIENTATION_HORIZONTAL);
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 + 5,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 + 4,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 - 5,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 - 6,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
}
|
|
||||||
if (widget->allocation.height > 20)
|
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 - 10,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 - 11,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 + 10,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 + 9,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
}
|
|
||||||
if (widget->allocation.height > 30)
|
|
||||||
{
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 - 15,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 - 16,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
|
||||||
paned->handle_width/2 + 15,
|
|
||||||
paned->handle_size/2);
|
|
||||||
gdk_draw_point (paned->handle,
|
|
||||||
widget->style->bg_gc[GTK_STATE_PRELIGHT],
|
|
||||||
paned->handle_width/2 + 14,
|
|
||||||
paned->handle_size/2 - 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Redraw the children
|
/* Redraw the children
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user