Skip to content

reflect palette in gui, use for cords_to_foreground - #2692

Open
ben-wes wants to merge 1 commit into
pure-data:masterfrom
ben-wes:feat/tcl-palette
Open

ben-wes wants to merge 1 commit into
pure-data:masterfrom
ben-wes:feat/tcl-palette

Conversation

@ben-wes

@ben-wes ben-wes commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

this is adding a tcl interpolation function for an attenuated foreground color and reflects the palette in the gui, updated by the colors message.

known issues:
the redundancy of setting the initial color values on the gui side is a bit ugly. it might be an option to send an initial colors message? but i didn't want to do this here

@ben-wes
ben-wes force-pushed the feat/tcl-palette branch 4 times, most recently from 0387058 to 9d0e48f Compare July 19, 2025 09:32
@porres

This comment was marked as outdated.

@porres

This comment was marked as off-topic.

Comment thread src/g_canvas.c Outdated
Comment thread tcl/pdtk_canvas.tcl Outdated
Comment thread tcl/pdtk_canvas.tcl Outdated
Comment thread tcl/pdtk_canvas.tcl Outdated
@ben-wes
ben-wes force-pushed the feat/tcl-palette branch 5 times, most recently from f631971 to 6f7f39b Compare July 22, 2025 10:11
@ben-wes ben-wes changed the title reflect palette in gui, use for cords_to_foreground reflect palette in gui, use for cords_to_foreground, colors message fixes Jul 22, 2025
@ben-wes
ben-wes marked this pull request as ready for review July 22, 2025 10:18
@porres

This comment was marked as outdated.

@ben-wes
ben-wes force-pushed the feat/tcl-palette branch from 9019575 to 2f433b3 Compare July 29, 2025 19:50
@ben-wes ben-wes changed the title reflect palette in gui, use for cords_to_foreground, colors message fixes reflect palette in gui, use for cords_to_foreground Aug 22, 2025
@ben-wes

ben-wes commented Aug 22, 2025

Copy link
Copy Markdown
Contributor Author

removed the commit changing colors to color message and swapping foreground and background arguments. i assume that these shouldn't be changed anymore after the release of Pd0.56-0.

@porres

porres commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Is this good for 0.56-1? :) I say fixing cord highlighting is an important bug fix. I hope this gets considered - ping @millerpuckette

@millerpuckette

millerpuckette commented Aug 22, 2025 via email

Copy link
Copy Markdown
Contributor

@porres

porres commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

is it possible to put the logic in the C code instead of the tk?

Sure. If I remember correctly, that's how I first did this on another PR

@umlaeute

Copy link
Copy Markdown
Contributor

please do not.

right now, the core does not know anything about the "cords to foreground" - it is entirely implemented on the GUI side.
if a prospective GTK version wants to have the same functionality, it can easily implement it all by itself. or ignore it.


i'm really opposed to moving GUI-only stuff over to the core, only to save a bit of implementation for a potential GUI written in another toolkit. in the end this all boils down to: "if you want to write a GUI in GTK/JUCE/FooWdiget, you just have to implement your own TclTk layer for your fancy toolkit". but:

  • implementing Tcl/Tk (or just Tk) is a non-trivial operation, and a very easy way to introduce very serious bugs
  • these toolkits already have their own idiosyncratic ways to handle things
  • adding another (complext) layer on top of an existing toolkit is very likely to destroy all the benefits you ever get from the new toolikt. if your brandnew JUCE-based GUI looks identical to the 90ies-style Tcl/Tk GUI and performs worse (because of the additional translation layer, that effectively circumvents all performance improviements), why would you want to re-implement such a GUI in the first place?

@umlaeute

Copy link
Copy Markdown
Contributor

because @porres is re-iterating this:

Is this good for 0.56-1? :) I say fixing cord highlighting is an important bug fix.

i think not.

  • there are "millions" of background/foreground combinations where the currently hard-coded color for backgrounded cords is perfectly visible.
  • if you happen to pick a combination where this is not true, you can easily switch off the "Highlight active cord" functionality in the GUI properties
  • if you cannot live without the "hightlight active cord", you can probably live with the fact that you do not see the already-connected (non-active) cords while connecting

i totally agree that it is ugly, and annoying.
and that it should be fixed.
i just don't see how this is an important issue. instead i would label it as "very minor".

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.

Issue with Pd colors and "Highlight active cord while connecting".

4 participants