Bwidget Source Code
View Ticket
Not logged in
Ticket UUID: 3f82f0429d5e18adc1a52b5e898ca905a6804b2b
Title: Color picker: 11 user colors, why not 12 ?
Type: Bug Version: current
Submitter: oehhar Created on: 2025-02-28 13:07:56
Subsystem: bwidget 1.x Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2025-03-31 14:36:56
Resolution: None Closed By: nobody
    Closed on:
Description:
And i notice there are only 11 userColors initialised for some reason. I had been duplicating this in my program until today, but i find that If i tell bwidgets to use 12 User Colors, it works perfectly.
User Comments: anonymous (claiming to be TWu) added on 2025-03-31 14:36:56:
Hello together,
the solution is simple and in colors.tcl, line 20:
Please add the twelfth _userColors definition "\#ffffff".
Reason, as long as the inner foreach loop runs only over the defined values, it breaks after the eleventh defined color (line 187 ff.).
Best greetings and success
Thomas W.

oehhar added on 2025-02-28 13:12:36:
Hi Steven,
thank you for the proposal.
I think, there are 11 user colors for the reason, that all colors may be shown on the small color palette.

The colors are aranged in 6 columns on both widgets and 5 rows.
In the small color picker, the lower-right corner has an icon to open the big color picker.

That might be the reason, why there is one user color less?

It might be also ok to show the last user color only in the large display.

Thanks for any patches.

Take care,
Harald

Attachments: