Update gtk46

This commit is contained in:
daleclack 2021-02-27 11:10:59 +08:00
parent fc563e87e3
commit 24870f6749
1 changed files with 5 additions and 5 deletions

View File

@ -43,12 +43,12 @@ static void draw_brush(GtkWidget *widget,double x,double y){
cairo_t *cr;
//Draw on the surface
cr=cairo_create(surface);
//Some bugs in color set
GdkRGBA color;
//gdk_rgba_parse(&color,"66CCFF");
//Draw and fill in color
cairo_rectangle(cr,x-3,y-3,6,6);
cairo_arc(cr,x,y,3,0,2*G_PI);
//gdk_rgba_parse(&color,"66CCFF");
//gdk_cairo_set_source_rgba(cr,&color);
cairo_fill(cr);
@ -109,7 +109,7 @@ static void gtkmain(GtkApplication *app,gpointer user_data){
GtkGesture *press,*drag;
//Create a window
window=gtk_application_window_new(app);
gtk_window_set_title(GTK_WINDOW(window),"Mouse Event Test");
gtk_window_set_title(GTK_WINDOW(window),"Drawing Test");
gtk_window_set_default_size(GTK_WINDOW(window),640,360);
gtk_window_set_icon_name(GTK_WINDOW(window),"org.gtk.daleclack");