Bug #7550
openWGridLayout does not work inside of WStackedWidget
0%
Description
The vertical rescaling of GridLayout does not work if located inside of WStackedWidget.
In the attached example two things are strange:
- The size of "view"
object is sometimes big, sometimes small. Press reloadit is random.
2. The heights of the integrated TextItems are always small. In the same example without WStackedWidget, they share the window height 50:50.
Tested with 3.4.1 on Firefox and Chrome.
Files
Updated by Roel Standaert over 3 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Hm, so this seems to be the case if you're using a WGridLayout
(which uses JavaScript) inside of a stacked widget inside of a WVBoxLayout
(which uses CSS flex), and the issue isn't there when:
-
Wt::WLayout::setDefaultImplementation(Wt::LayoutImplementation::JavaScript)
is used, making all layout implementations JavaScript based - You're using two
WVBoxLayout
s instead (both using flex) - You're giving the
WContainerWidget
namedview
100% width and height.
Now, I'm not sure if those first two cases are by design, or it just happens like that. Normally, a WStackedWidget
with a WContainerWidget
in it is just a <div>
in a <div>
. There's no rule there that says the inside div is the same size as the outside div. You can see that if you're not using layouts, and you have a WContainerWidget
inside of a WStackedWidget
of a certain size, that widget does not automatically fill the WStackedWidget
. I'm assigning this to Koen so he can shed some light on how this is actually supposed to work.