Bwidget Source Code
View Ticket
Not logged in
2024-08-26
08:17 Closed ticket [4f9a4205f0]: color selection dialog accepts named tk colors plus 7 other changes artifact: fa68884b9a user: oehhar
08:15
[4f9a4205] add limited support for manual entry of named colors check-in: b0d8a1c23c user: oehhar tags: bwidget
2024-08-21
16:22 Ticket [4f9a4205f0] color selection dialog accepts named tk colors status still Open with 4 other changes artifact: b2f564aadb user: oehhar
16:16
[4f9a4205f0] fix color display in color picker dialog after manual color entry (#ff0) and clicking on intensity pane (far right) check-in: a17d9fc909 user: oehhar tags: bwidget
2024-08-20
08:52 Ticket [4f9a4205f0] color selection dialog accepts named tk colors status still Open with 3 other changes artifact: addcf7be4b user: anonymous
08:41 Add attachment fix.diff to ticket [4f9a4205f0] artifact: 10f455a75b user: anonymous
2024-08-19
11:49 Ticket [4f9a4205f0] color selection dialog accepts named tk colors status still Open with 4 other changes artifact: 70311c0a02 user: oehhar
11:49 Ticket [4f9a4205f0]: 4 changes artifact: d05377c6f1 user: oehhar
11:46
Ticket [4f9a4205] color names in color picker: alternate solution check-in: 9616d6dea2 user: oehhar tags: 4f9a4205-named-colors-alt
10:11 Ticket [4f9a4205f0] color selection dialog accepts named tk colors status still Open with 3 other changes artifact: e3280b7e17 user: oehhar
10:09
Ticket [4f9a4205f0]: add named color handling for color selection box Closed-Leaf check-in: 2605c8c3e2 user: oehhar tags: 4f9a4205-named-colors
2024-08-16
08:43 New ticket [4f9a4205f0] color selection dialog accepts named tk colors. artifact: c196a51770 user: anonymous

Ticket UUID: 4f9a4205f0009ada674af7c87398d59707bd298
Title: color selection dialog accepts named tk colors
Type: Patch Version: .1
Submitter: anonymous Created on: 2024-08-16 08:43:53
Subsystem: bwidget 1.x Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2024-08-26 08:17:54
Resolution: Accepted Closed By: oehhar
    Closed on: 2024-08-26 08:17:54
Description:
Hi, 
Below is a link to my version of bwidgets color.tcl.
It allows named tk colors to be input into the Bwidget color selection dialog.
Perhaps it'll be useful. I've tried to handle errors, but perhaps there are things i've overlooked.
Cheers, Steven
https://sourceforge.net/projects/scidvspc/files/support%20files/bwidget_custom_color.tcl.gz/download
User Comments: oehhar added on 2024-08-26 08:17:54:

Alternate solution merged with commit [b0d8a1c23c]. RFE closed. Thanks for all, Harald


oehhar added on 2024-08-21 16:22:03:

Thank you for the observation and the patch:

proc SelectColor::_set_hue_sat {hue sat} {
     variable _widget
+    variable _hsv
 
+    set _hsv [lreplace $_hsv 0 1 $hue $sat]
     set x [expr {$hue*200-9}]
     set y [expr {(1-$sat)*200-9}]
     $_widget(chs) coords target $x $y
     _draw_values $hue $sat
}

Please allow me to propose an alternate solution in commit [8acfd06d90]. This bug is also present in the main widget. It was fixed there. Thanks for the bug report.

Thank you, Harald


anonymous added on 2024-08-20 08:52:54:
Your solution seems very nice, cheers. But i can see a hiccup which i   fixed in my version.  To reproduce, open color dialog, type in a new color (eg red), then slide the far-right gradient slider. The colored box is not correct. Attached below is my hack/fix. Cheers, Steven

oehhar added on 2024-08-19 11:49:42:

Hi Steven, thank you for the contribution.

It is now in branch [4f9a4205-named-colors] starting with commit [2605c8c3e2].

We need some fine tuning. Will come up with a version to test.

Thanks again, Harald


oehhar added on 2024-08-19 11:49:14:

Hi Steven,

would the solution in commit [9616d6dea2] of branch [4f9a4205-named-colors-alt] also fit your needs?

It works a bit like an alternate input method. If you enter "red" or "#abc" and press tab, you get the #rrggbb version in the input field. The application always gets #rrggbb back.

To conserve the color name, we would need more work.

Thank you for all, Harald


oehhar added on 2024-08-19 10:11:36:
Hi Steven,
thank you for the contribution.

It is now in branch [4f9a4205-named-colors] starting with commit [2605c8c3e2].

We need some fine tuning. Will come up with a version to test.

Thanks again,
Harald

Attachments: