Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pen color selection #83

Closed
wants to merge 2 commits into from
Closed

Conversation

serpilliere
Copy link

This PR adds the feature of choosing color from the menu.
Fix #71

@serpilliere serpilliere force-pushed the color_select branch 2 times, most recently from f2006b8 to e8178c4 Compare April 30, 2020 20:20
@bk138
Copy link
Owner

bk138 commented May 2, 2020

Thanks for the contribution! This does not work for me yet, though: The dialog pops up, I can choose a colour, but the painting colour stays red... Any idea what to do/look at?

@serpilliere
Copy link
Author

serpilliere commented May 2, 2020

Oh! Interesting.
Can you add a printf("test\n"); at line 602, just after the:

      gdk_cairo_set_source_rgba(data->default_pen->paint_ctx, data->default_pen->paint_color);

If should display "test" after you validate the color.
It's to validate all the callback color selector

@bk138
Copy link
Owner

bk138 commented May 2, 2020

Yeah, that fires.

@serpilliere
Copy link
Author

Thank you for the feed back @bk138 !
This means I missed something in setting the color back to the pen...

@bk138
Copy link
Owner

bk138 commented May 2, 2020

Might this relate to differing gtk versions?

@serpilliere
Copy link
Author

I just realized that using the default branch, I cannot erase using right or middle button.
This may be linked to this (I tested on arch linux)

@serpilliere
Copy link
Author

Ok, I manage to reproduce the bug: I forgot to set a configuration file. This explains that I wasn't able to erase using right click.
I am debugging the branch now I have reproduced the bug

@serpilliere
Copy link
Author

Hi!
It seems that the different tools are stored in a hash table, and the way to get them is to know their shortcut 😢
So I added a pointer to the current tool, which is update each time the user select a different tool.
Now, the color may change the current tool !
The color is not stored back to the config file.

@bk138
Copy link
Owner

bk138 commented Dec 5, 2020

Some of this can be used for #110, so I'd like to keep a reference once work starts on that. Closing as this PR will not be merged as-is, but code will be re-used.

@bk138 bk138 closed this Dec 5, 2020
@serpilliere
Copy link
Author

Great!

@serpilliere serpilliere deleted the color_select branch December 6, 2020 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

color selector
2 participants