diff options
Diffstat (limited to 'src/examples/elementary/bg_cxx_example_01.cc')
-rw-r--r-- | src/examples/elementary/bg_cxx_example_01.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc index c852b07c90..7e0724c3ca 100644 --- a/src/examples/elementary/bg_cxx_example_01.cc +++ b/src/examples/elementary/bg_cxx_example_01.cc @@ -1,3 +1,4 @@ +#define EFL_CXXPERIMENTAL // for background part #include <Elementary.hh> using efl::eo::instantiate; @@ -9,12 +10,7 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED) win.text_set("Window Background"); win.autohide_set(true); win.size_set({320,320}); - try { - auto bg = efl::eo::downcast<efl::ui::win::Part>(win.part("background")); - bg.color_set(139, 69, 19, 255); - } catch (std::exception const&e) { - std::cerr << "Failed to set bg color: " << e.what() << std::endl; - } + win.background().color_set(139, 69, 19, 255); // Clean exit elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); |