Re: [Tuxpaint-devel] Please, test the sdl2.0 branch
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Pere P. i C. <per...@gm...> - 2022-02-22 01:24:59
|
El dj. 17 de 02 de 2022 a les 21:19 -0800, en/na Bill Kendrick va escriure: > On Fri, Feb 18, 2022 at 01:00:28AM +0100, Pere Pujal i Carabantes wrote: > > Hi all, > > > > This last month has been a lot of work in master, congrats :) > > Thanks /slash/ apologies! :^D (Glad it wasn't just me, though!) > > > > Today I've just reached to keep sdl2.0 in sync, > > but at the cost of having to solve really big merge conflicts > > and potentially making mistakes, so I would be very grateful if > > you could test the sdl2.0 branch and catch any of them. > > > > Right now, in Linux, I see the onscreen keyboard not sizing > > the same as in master.(tuxpaint --800x600 --onscreen-keyboard) > > > > I also see the apply label not working, it doesn't apply the label, > > but this happens too in master, > > so not sure if this is a bug or is just work in progress. > > Correct -- it is still a work-in-progress. I've had to take a > break from it for a while, > You already had it, just need to blit the label node surface and disable the edit node diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 0ab9e2cf..1b2b5a6c 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -28441,6 +28441,7 @@ static void apply_label_node(int old_x, int old_y) { cursor_x = old_x; cursor_y = old_y; cursor_left = old_x; + SDL_Rect rect; rec_undo_buffer(); do_render_cur_text(1); @@ -28453,6 +28454,14 @@ static void apply_label_node(int old_x, int old_y) { draw_fonts(); have_to_rec_label_node = TRUE; + + rect.x = label_node_to_edit->save_x; + rect.y = label_node_to_edit->save_y; + rect.w = label_node_to_edit->save_width; + rect.w = label_node_to_edit->save_height; + + SDL_BlitSurface( label_node_to_edit->label_node_surface, NULL, canvas, &rect); + label_node_to_edit->is_enabled = FALSE; add_label_node(0, 0, 0, 0, NULL); derender_node(&label_node_to_edit); label_node_to_edit = NULL; HTH Pere |