Project

General

Profile

Actions

Bug #1333

open

Inheritance Issue - Decoration Style

Added by Nelson Azadian almost 12 years ago. Updated about 11 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/21/2012
Due date:
% Done:

0%

Estimated time:

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

ScrollAreaScreenShot1.PNG (128 KB) ScrollAreaScreenShot1.PNG Screen Shot 1 Nelson Azadian, 06/21/2012 03:17 AM
ScrollAreaScreenShot2.PNG (114 KB) ScrollAreaScreenShot2.PNG Screen Shot 2 Nelson Azadian, 06/21/2012 03:17 AM
Actions #1

Updated by suburgatory 29 almost 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)

Actions #2

Updated by Koen Deforche almost 12 years ago

  • Target version changed from 3.2.0 to 3.2.3
Actions #3

Updated by Nelson Azadian almost 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

Actions #4

Updated by Koen Deforche over 11 years ago

  • Target version changed from 3.2.3 to 3.3.0
Actions #5

Updated by Koen Deforche about 11 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

Actions #6

Updated by Koen Deforche about 11 years ago

  • Target version deleted (3.3.0)
Actions

Also available in: Atom PDF