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

ColorPicker popups for foreground/background color close when trying to edit color value hex number #267

Open
birbilis opened this issue Jul 27, 2022 · 6 comments
Assignees
Labels
bug Something isn't working ColorPicker

Comments

@birbilis
Copy link
Contributor

birbilis commented Jul 27, 2022

Version: 0.7.1

More advanced users may want to enter a color value directly or copy a value from one ColorPicker popup to another. However currently when the color picker's color value editbox takes focus it closes the color picker popup.

(Reported by @jasa611)

@birbilis birbilis added bug Something isn't working ColorPicker labels Jul 27, 2022
@birbilis birbilis self-assigned this Jul 27, 2022
@birbilis birbilis added this to To Do in READ-COM App via automation Jul 27, 2022
@birbilis
Copy link
Contributor Author

there is a known issue with the FireMonkey UI library popups that causes it. They don't accept focus. Has been reported to the company that makes Delphi (Embarcadero). A workaround I had done in the past with the StoryItemOptions popup (when it contained the UrlAction as an editbox) is to open an input prompt dialog when the item is clicked and have code that updates its value if OK is pressed on the input dialog. I will look into doing that

@birbilis
Copy link
Contributor Author

A workaround is to copy the item you want to take color from to clipboard, paste to notepad and copy the color value (if you don't know which value you want already)
Then cut an other item to the clipboard, paste in notepad and edit its color value there (will need to set first a random color to it to see the property listed in the object definition) to be the same as the value you had gotten before
The values are in ARGB format in hexadecimal (FF=255), Alpha is the "opacity" where FF is non-transparent and 0 fully transparent (no color shown). R=Reg, G=Green, B=Blue components of the color in RGB color model

image

@birbilis
Copy link
Contributor Author

there is a colorconverter here: https://www.w3schools.com/colors/colors_converter.asp

note that Delphi uses "x" prefix for Hex, not "#" or "0x" that you may see in other languages like Javascript or C/C++

@birbilis
Copy link
Contributor Author

there are also some colorpickers as apps (should be able to find on Windows Store for example I guess) and as browser extensions (e.g. for Chrome and for Firefox: https://www.colorzilla.com/)

@birbilis
Copy link
Contributor Author

You can also do gradients if you set the Image (from its Options with the Load button) for a StoryItem to be a 1-pixel width or height image strip with the other dimension being say of N pixels (whatever the size you plan to make your StoryItem) or less/more. Since the image is stretched it will become a gradient (either horizontal or vertical gradient depending on which dimension of the background image was only 1-pixel long)
Don't create linear gradient backgrounds in other way (e.g. with other program), it's an overkill (in filesize) to use a XY sized image when you can use a X1 or 1*Y sized one

@birbilis
Copy link
Contributor Author

Could also possibly add CTRL+C (copy color value) and CTRL+V (paste color value) actions to the ColorPicker (or if it already has such make sure the app doesn't grab them while the color picker popup is shown. Combined with a tooltip that suggests their use (shown when mouse is over the color value editbox) might help.
Also, should probably set HitTest=false to that color value editbox so that it doesn't close the ColorPicker popup when the user clicks in it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ColorPicker
Projects
Development

No branches or pull requests

1 participant