+2006-09-22 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+
+ * hildon-widgets-plugins/hildon-color-chooser-dialog-hsv.c:
+ * hildon-widgets-plugins/hildon-color-chooser-hsv.c: Changing the name
+ in witch the borders afre being draw around color selectors. Fixes
+ NB#40057.
+ Making the dimmed color bar/plane look a bit nicer.
+
+ * hildon-widgets/hildon-name-password-dialog.c: Changing the 'name'
+ property of the dialog to 'username'. Fixes #MB772.
+
2006-09-21 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
* hildon-widgets/hildon-font-selection-dialog.c: Do not put the
x = ((i % w) * (tot_w + spacing));
y = ((i / w) * (tot_h + spacing));
- if(brd) {
- gtk_paint_box(gtk_widget_get_style(GTK_WIDGET(dialog)), widget->window, (i == num_selected) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL,
- (i == num_selected) ? GTK_SHADOW_IN : GTK_SHADOW_OUT, &event->area, GTK_WIDGET(dialog), "color-radio", x, y, tot_w, tot_h);
- }
-
- gdk_draw_rectangle(widget->window, start_gc[i], TRUE, event->area.x, event->area.y, event->area.width, event->area.height);
+ gdk_draw_rectangle(widget->window,
+ widget->style->black_gc,
+ TRUE,
+ (i == num_selected) ? x : x + 2,
+ (i == num_selected) ? y : y + 2,
+ (i == num_selected) ? tot_w : tot_w - 4,
+ (i == num_selected) ? tot_h : tot_h - 4);
+
+ gdk_draw_rectangle(widget->window,
+ widget->style->white_gc,
+ TRUE,
+ x + 3,
+ y + 3,
+ tot_w - 6,
+ tot_h - 6);
+
+ gdk_draw_rectangle(widget->window,
+ start_gc [i],
+ TRUE,
+ x + 3 + 1,
+ y + 3 + 1,
+ tot_w - 6 - 2,
+ tot_h - 6 - 2);
+
+// gtk_paint_box(gtk_widget_get_style(GTK_WIDGET(dialog)), widget->window, (i == num_selected) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL,
+// (i == num_selected) ? GTK_SHADOW_IN : GTK_SHADOW_OUT, &event->area, GTK_WIDGET(dialog), "color-radio", x, y, tot_w, tot_h);
+ //}
+
+ //gdk_draw_rectangle(widget->window, start_gc[i], TRUE, event->area.x, event->area.y, event->area.width, event->area.height);
}
return;
}
-
buf = (unsigned char *)g_malloc(w*h*3);
hvec = 65535/sh;
return;
}
-
- buf = (unsigned char *)g_malloc(w*h*3);
+ buf = (unsigned char *)g_malloc(w*h*4);
hvec = 65535/sh;
hcurr = hvec * (y - sy);
ptr[0] = avg;
ptr[1] = avg;
ptr[2] = avg;
- ptr += 3;
+ ptr[3] = ((((i % 2) + j) % 2) == 0) ? 60 : 10;
+ ptr += 4;
}
hcurr += hvec;
}
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data (buf, GDK_COLORSPACE_RGB, TRUE, 8, w, h, w * 4, g_free, buf);
- gdk_draw_rgb_image(widget->parent->window, widget->style->fg_gc[0], x, y, w, h, GDK_RGB_DITHER_NONE, buf, w*3);
-
-
- g_free(buf);
+ gdk_draw_pixbuf (widget->parent->window, widget->style->fg_gc [0], pixbuf, 0, 0, x, y, w, h, GDK_RGB_DITHER_NONE, 0, 0);
+ g_object_unref (pixbuf);
}
}
- buf = (unsigned char *)g_malloc(w*h*3);
+ buf = (unsigned char *)g_malloc(w*h*4);
ptr = buf;
ptr[0] = avg;
ptr[1] = avg;
ptr[2] = avg;
+ ptr[3] = ((((i % 2) + j) % 2) == 0) ? 60 : 10;
rgbtmp[0] += rgbx[0];
rgbtmp[1] += rgbx[1];
rgbtmp[2] += rgbx[2];
- ptr += 3;
+ ptr += 4;
}
rgbx[0] += rgby[0];
rgbx[2] += rgby[2];
}
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data (buf, GDK_COLORSPACE_RGB, TRUE, 8, w, h, w * 4, g_free, buf);
- gdk_draw_rgb_image(widget->parent->window, widget->style->fg_gc[0], x, y, w, h, GDK_RGB_DITHER_NONE, buf, w*3);
-
-
- g_free(buf);
+ gdk_draw_pixbuf (widget->parent->window, widget->style->fg_gc [0], pixbuf, 0, 0, x, y, w, h, GDK_RGB_DITHER_NONE, 0, 0);
+ g_object_unref (pixbuf);
}
enum{
PROP_NONE = 0,
PROP_CONTENT,
- PROP_NAME,
+ PROP_USERNAME,
PROP_PASSWORD
};
/* Set the password domain text */
hildon_name_password_dialog_set_domain(dialog, g_value_get_string(value));
break;
- case PROP_NAME:
+ case PROP_USERNAME:
/* Set the current username displayed in the dialog */
gtk_entry_set_text(priv->nameEntry, g_value_get_string(value));
break;
case PROP_CONTENT:
g_value_set_string(value, gtk_label_get_text(priv->domainLabel));
break;
- case PROP_NAME:
+ case PROP_USERNAME:
g_value_set_string(value, hildon_name_password_dialog_get_name(dialog));
break;
case PROP_PASSWORD:
G_PARAM_READWRITE));
g_object_class_install_property(object_class,
- PROP_NAME,
- g_param_spec_string ("name",
- "Name",
+ PROP_USERNAME,
+ g_param_spec_string ("username",
+ "Username",
"Set content for name entry.",
"DEFAULT",
G_PARAM_READWRITE));
/**
* hildon_name_password_dialog_new_with_default:
* @parent: the parent window of the dialog
- * @name: default name, NULL if unset
+ * @name: default username, NULL if unset
* @password: default password, NULL if unset
*
* Same as #hildon_name_password_dialog_new, but with a
GtkWidget *self = hildon_name_password_dialog_new(parent);
if(name != NULL)
- g_object_set(G_OBJECT(self), "name", name, NULL);
+ g_object_set(G_OBJECT(self), "username", name, NULL);
if(password != NULL)
g_object_set(G_OBJECT(self), "password", password, NULL);