Project

General

Profile

Actions

Feature #7434

closed

Allow setBackgroundColor() to change the alpha-level.

Added by Harm ​ almost 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Currently, setting an alpha-level with setBackgroundColor() does not have any effect.

 

 

For instance, the following code:

container->decorationStyle().setBackgroundColor(Wt::WColor(255, 0, 0, 128));

Produces a container with its color defined in rgb() instead of rgba():

<div id="o3knw4h" style="background-color:rgb(255,0,0);"></div>

This isn't really a bug since this has always been the case.

It is possible to change the alpha-level using CSS, and I guess that's what most people have been using.

 

 

Forum topic related to the issue: Can't set alpha-level of WContainerWidget


Related issues 1 (0 open1 closed)

Has duplicate Bug #8721: Wt::Color::Transparent is black (workaround)Closed06/23/2021

Actions
Actions #1

Updated by Roel Standaert over 3 years ago

  • Has duplicate Bug #8721: Wt::Color::Transparent is black (workaround) added
Actions #2

Updated by Roel Standaert over 3 years ago

  • Description updated (diff)
  • Target version set to future
Actions #3

Updated by Roel Standaert over 3 years ago

  • Assignee set to ruben kindt
  • Target version changed from future to 4.7.0
Actions #4

Updated by Roel Standaert almost 3 years ago

  • Status changed from New to Resolved
Actions #5

Updated by Roel Standaert almost 3 years ago

  • % Done changed from 0 to 100
Actions #6

Updated by Roel Standaert almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF