Set given color as initial color in gtk color picker #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sets the given color as initial color. Keeps the given value if the users doesn't change the color dialog.
gtk2
Example when passing an initial color ofr: 200,g: 255, b: 255, a: 100
:Currently it's always:
![Screenshot_20231006_182452](https://private-user-images.githubusercontent.com/34311583/273276064-1a5066a8-b785-465f-ae3e-1689949c54b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTkzMTIsIm5iZiI6MTczOTE1OTAxMiwicGF0aCI6Ii8zNDMxMTU4My8yNzMyNzYwNjQtMWE1MDY2YTgtYjc4NS00NjVmLWFlM2UtMTY4OTk0OWM1NGI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAzNDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhMzMwMzU2YWU0YTNhNDk3ZTFkYmI2MGViODU3OTU1N2IwNjI3Njc3ODQwN2UzZDdlN2IxY2Q3NWNkNTkwZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.SzY-id9nJAEYVmd4HtX9Gq1ykThCe5SLtgfW4KdbzH8)
When the user chooses okay, the color
r: 255, g: 255, b: 255, a: 255
is returned, no matter the initial input.Now, it opens with the values that are passed initially:
![Screenshot_20231006_182514](https://private-user-images.githubusercontent.com/34311583/273276008-c424917a-31e4-49fa-8093-373da208bccd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTkzMTIsIm5iZiI6MTczOTE1OTAxMiwicGF0aCI6Ii8zNDMxMTU4My8yNzMyNzYwMDgtYzQyNDkxN2EtMzFlNC00OWZhLTgwOTMtMzczZGEyMDhiY2NkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAzNDMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0OWVhNjUwNTRkYmNhNmNkYWFiNWM5YTY4NzUyZGEwM2VlMGI2ODg2MDM0MDUwODFjNWUxZTY4ZmJmMDg3YTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IsKKGjTf0DRr9xodISiDX3TD70tKKiB594VaXrWy7hY)
and keeps them when confirming the dialog without further changes.
This would resemble the behavior of the color picker windows.