⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (1.27 KB)
Bug #2809
ยป test_20140312a_WTabWidget_layout.C
Bruce Toll
, 03/13/2014 02:36 AM
#include
<Wt/WServer>
#include
<Wt/WTabWidget>
#include
<Wt/WContainerWidget>
#include
<Wt/WVBoxLayout>
#include
<Wt/WColor>
#include
<Wt/WBootstrapTheme>
using
namespace
Wt
;
class
TestApplication
:
public
WApplication
{
public:
TestApplication
(
const
WEnvironment
&
env
);
};
TestApplication
::
TestApplication
(
const
WEnvironment
&
env
)
:
WApplication
(
env
)
{
setTitle
(
"WTabWidget in layout gets excessive space on bottom"
);
setTheme
(
new
WBootstrapTheme
(
this
));
auto
container_widget_green
=
new
WContainerWidget
();
container_widget_green
->
decorationStyle
().
setBackgroundColor
(
WColor
(
"lightgreen"
));
auto
container_widget_blue
=
new
WContainerWidget
();
container_widget_blue
->
decorationStyle
().
setBackgroundColor
(
WColor
(
"lightblue"
));
auto
tab_widget
=
new
WTabWidget
();
tab_widget
->
addTab
(
container_widget_green
,
"Should be green all the way down when selected..."
);
tab_widget
->
addTab
(
container_widget_blue
,
"Should be blue - test reducing window size horizontally until the tabs wrap"
);
auto
root_layout
=
new
WVBoxLayout
();
root_layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
root_layout
->
addWidget
(
tab_widget
);
root
()
->
setLayout
(
root_layout
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
WRun
(
argc
,
argv
,
[](
const
WEnvironment
&
env
)
{
return
new
TestApplication
(
env
);});
}
(1-1/1)
Loading...