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

The Alpha channel value not restored #3330

Closed
rhelms opened this issue Mar 30, 2020 · 3 comments · Fixed by #3331
Closed

The Alpha channel value not restored #3330

rhelms opened this issue Mar 30, 2020 · 3 comments · Fixed by #3331
Labels
interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) pending A PR has been submitted to fix the issue

Comments

@rhelms
Copy link

rhelms commented Mar 30, 2020

Describe the bug
The Alpha channel value not restored

Steps to reproduce the behavior:

  1. Select Ctrl-T to add a Title.
  2. Select a template
  3. Click on 'Background Color'
  4. Change the Alpha channel value to 125 for partial transparency
  5. Select OK then Save.
  6. Add the title to a track. At this point, the Alpha channel value has been ignored.
  7. Edit the Title.
  8. Click on 'Background Color'
  9. Change the Alpha channel value to 125 for partial transparency
  10. Select OK then Save. At this point, the Alpha channel value can be seen in action.
  11. Edit the Title
  12. Click on 'Background Color'
  13. The Alpha channel value presents as 255.

Expected behavior
If the Alpha channel value is set, then when the Color picker is selected to edit the colour, the Alpha transparency value should display as the previously saved value.

System Details

Log Files

Exception / Stacktrace
No stacktrace found in log files

Screenshots (Optional)
If applicable, add screenshots to help explain your problem. You can include screenshots by
copy/pasting them on GitHub or dragging-and-dropping into the GitHub page. All images are public,
so please don't post screenshots containing personal information.

@rhelms rhelms changed the title The Alpha channel value not restored (Give your bug report a descriptive title) The Alpha channel value not restored Mar 30, 2020
@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 30, 2020

If the Alpha channel value is set, then when the Color picker is selected to edit the colour, the Alpha transparency value should display as the previously saved value.

Mmm, yeah, I see the issue.

The problem is that the alpha value effectively gets separated from the color value in the process of storing it in the SVG source.

When the color dialog returns, it outputs a QColor value including alpha, which we store and reuse. That's why subsequent reopenings display the same color (and alpha) values.

When the QColor value is used to update the SVG data for the title, it's split into an RGB value that's used for the fill property, and a separate opacity property that's assigned the color's alpha level.

It should be possible to recombine them into a QColor with alpha when retrieving the color for re-edits, though.

@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 30, 2020

#3331 should fix this, and as a consequence the color dialog will also display the correct alpha value on the first use, as well. (Instead of showing 255 for backgrounds that are really completely transparent.)

@ferdnyc ferdnyc added interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) pending A PR has been submitted to fix the issue labels Mar 30, 2020
@ferdnyc
Copy link
Contributor

ferdnyc commented Apr 4, 2020

@rhelms This is now fixed with the merge of #3331, which will be included in the next set of Daily Builds generated at https://openshot.org/download/ if you'd like to test it out!

(They should be there shortly, I'd say give it 10-15 minutes from this comment.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) pending A PR has been submitted to fix the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants