Bug #1333
openInheritance Issue - Decoration Style
0%
Description
When creating a WContainerWidget within a WScrollArea within a WDialog, the decoration style of the WContainerWidget is not preserved. Being the innermost object, the decoration style of the WContainerWidget should override the decoration style of the either the WScrollArea or WDialog.
This inheritance issue seems to occur with contents which is not initially visible. See screen shot 1 for the an example of the proper behavior (notice how we are at the top of the WScrollArea) versus screen shot 2 for an example of the incorrect behavior (notice how we are at the bottom of the WScrollArea).
Nelson
Files
Updated by suburgatory 29 over 12 years ago
So where did you exactly use "setStyleClass" for your WContainerWidget and others. Maybe some code...
And i guess you can try the "scrolled()" event.(i.e. setStyleClass when you scroll)
Updated by Koen Deforche over 12 years ago
- Target version changed from 3.2.0 to 3.2.3
Updated by Nelson Azadian over 12 years ago
Sorry for not getting back sooner.
The setStyleClass was used almost immediately after initializing each object. I no longer have a code sample pertaining to the exact issue as I coded around it, but the code looked something like the following:
using namespace Wt;
//Create children widgets...
WContainerWidget *conWid = new WContainerWidget();
conWid->decorationStyle().setBackgroundColor(col);
conWid->addWidget(children widgets);
WScrollArea *scrAre = new WScrollArea();
//Scroll area not using any decoration style
scrAre->setWidget(conWid);
WDialog dia("");
(dia.contents())->decorationStyle().setBackgroundColor(black);
(dia.contents())->addWidget(scrAre);
if(dia.exec())
{
//Do something
}
Since the WContainerWidget is at the topmost position (regarding z-order), it's background color should only be visible.
Nelson
Updated by Koen Deforche about 12 years ago
- Target version changed from 3.2.3 to 3.3.0
Updated by Koen Deforche almost 12 years ago
- Status changed from New to Feedback
Hey,
We fail to reproduce this issue ... it also sounds bizarre since indeed CSS and the browsers should be taking care of handling this correctly.
So in case you or anyone else hits this problem : test-case welcome !
Regards,
koen