Don't draw quite as large a "flat_box". If draw_borders is TRUE, cause the
2000-07-09 Christopher James Lahey <clahey@helixcode.com> * widgets/e-text/e-text.c: Don't draw quite as large a "flat_box". If draw_borders is TRUE, cause the cursor to change even if not editing. svn path=/trunk/; revision=4017
This commit is contained in:
committed by
Chris Lahey
parent
4ac82c14c8
commit
14f210e058
@ -1,3 +1,9 @@
|
||||
2000-07-09 Christopher James Lahey <clahey@helixcode.com>
|
||||
|
||||
* widgets/e-text/e-text.c: Don't draw quite as large a "flat_box".
|
||||
If draw_borders is TRUE, cause the cursor to change even if not
|
||||
editing.
|
||||
|
||||
2000-07-09 Christopher James Lahey <clahey@helixcode.com>
|
||||
|
||||
* widgets/e-text/e-entry.c: Removed some border padding and set
|
||||
|
||||
@ -1689,15 +1689,15 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
|
||||
gdouble thisx = 0, thisy = 0;
|
||||
gdouble thiswidth, thisheight;
|
||||
GtkWidget *widget = GTK_WIDGET(item->canvas);
|
||||
gtk_paint_flat_box (widget->style, drawable,
|
||||
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
|
||||
NULL, widget, "entry_bg",
|
||||
0, 0, -1, -1);
|
||||
|
||||
gtk_object_get(GTK_OBJECT(text),
|
||||
"width", &thiswidth,
|
||||
"height", &thisheight,
|
||||
NULL);
|
||||
gtk_paint_flat_box (widget->style, drawable,
|
||||
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
|
||||
NULL, widget, "entry_bg",
|
||||
0, 0, thiswidth, thisheight);
|
||||
if (text->editing) {
|
||||
thisx += 1;
|
||||
thisy += 1;
|
||||
@ -2554,7 +2554,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
if(!text->editing) {
|
||||
text->editing = TRUE;
|
||||
if ( text->pointer_in ) {
|
||||
if ( text->default_cursor_shown ) {
|
||||
if ( text->default_cursor_shown && (!text->draw_borders)) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->i_cursor);
|
||||
text->default_cursor_shown = FALSE;
|
||||
}
|
||||
@ -2572,7 +2572,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
} else {
|
||||
text->editing = FALSE;
|
||||
if ( ! text->default_cursor_shown ) {
|
||||
if ( (!text->default_cursor_shown) && (!text->draw_borders) ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->default_cursor);
|
||||
text->default_cursor_shown = TRUE;
|
||||
}
|
||||
@ -2717,7 +2717,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
text->pointer_in = TRUE;
|
||||
if (text->editing) {
|
||||
if (text->editing || text->draw_borders) {
|
||||
if ( text->default_cursor_shown ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->i_cursor);
|
||||
text->default_cursor_shown = FALSE;
|
||||
@ -2735,7 +2735,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
text->pointer_in = FALSE;
|
||||
if (text->editing) {
|
||||
if (text->editing || text->draw_borders) {
|
||||
if ( ! text->default_cursor_shown ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->default_cursor);
|
||||
text->default_cursor_shown = TRUE;
|
||||
|
||||
@ -1689,15 +1689,15 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
|
||||
gdouble thisx = 0, thisy = 0;
|
||||
gdouble thiswidth, thisheight;
|
||||
GtkWidget *widget = GTK_WIDGET(item->canvas);
|
||||
gtk_paint_flat_box (widget->style, drawable,
|
||||
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
|
||||
NULL, widget, "entry_bg",
|
||||
0, 0, -1, -1);
|
||||
|
||||
gtk_object_get(GTK_OBJECT(text),
|
||||
"width", &thiswidth,
|
||||
"height", &thisheight,
|
||||
NULL);
|
||||
gtk_paint_flat_box (widget->style, drawable,
|
||||
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
|
||||
NULL, widget, "entry_bg",
|
||||
0, 0, thiswidth, thisheight);
|
||||
if (text->editing) {
|
||||
thisx += 1;
|
||||
thisy += 1;
|
||||
@ -2554,7 +2554,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
if(!text->editing) {
|
||||
text->editing = TRUE;
|
||||
if ( text->pointer_in ) {
|
||||
if ( text->default_cursor_shown ) {
|
||||
if ( text->default_cursor_shown && (!text->draw_borders)) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->i_cursor);
|
||||
text->default_cursor_shown = FALSE;
|
||||
}
|
||||
@ -2572,7 +2572,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
} else {
|
||||
text->editing = FALSE;
|
||||
if ( ! text->default_cursor_shown ) {
|
||||
if ( (!text->default_cursor_shown) && (!text->draw_borders) ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->default_cursor);
|
||||
text->default_cursor_shown = TRUE;
|
||||
}
|
||||
@ -2717,7 +2717,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
text->pointer_in = TRUE;
|
||||
if (text->editing) {
|
||||
if (text->editing || text->draw_borders) {
|
||||
if ( text->default_cursor_shown ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->i_cursor);
|
||||
text->default_cursor_shown = FALSE;
|
||||
@ -2735,7 +2735,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
text->pointer_in = FALSE;
|
||||
if (text->editing) {
|
||||
if (text->editing || text->draw_borders) {
|
||||
if ( ! text->default_cursor_shown ) {
|
||||
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, text->default_cursor);
|
||||
text->default_cursor_shown = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user