From fdeb87bb751d7f8818e1df9a3d8925dd8721e2e7 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Tue, 30 Apr 2019 18:50:47 +0200 Subject: [PATCH] Fix alignment of some widgets Summary: Commit 78ae9c0ae069ff86e701ff98cf5674cc491ee156 introduced a new API (efl_gfx_hint_fill_set) and changed the default behavior of aligned widgets. The same commit made the necessary changes to all examples in the efl repo, but not in the examples repo. This patch here aligns the widgets again they way they were meant to. We have gone 6 months without anybody noticing that the examples did not render correctly... let's try and add some unit tests later. Test Plan: Try the hello-gui c tutorial. The text should be centered instead of in a corner. Reviewers: YOhoho, bu5hm4n Differential Revision: https://phab.enlightenment.org/D8791 --- reference/csharp/ui/src/focus_main.cs | 1 + tutorial/c/hello-gui/src/gui_main.c | 1 + tutorial/csharp/hello-gui/src/gui_main.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/reference/csharp/ui/src/focus_main.cs b/reference/csharp/ui/src/focus_main.cs index cc806f74..43170be1 100644 --- a/reference/csharp/ui/src/focus_main.cs +++ b/reference/csharp/ui/src/focus_main.cs @@ -30,6 +30,7 @@ public class Example : Efl.Csharp.Application for (int i = 0; i< 5; i++) { var checkbox = new Efl.Ui.Check(vbox); checkbox.SetText("Check " + i); + checkbox.SetHintFill(false, false); checkbox.SetHintAlign(0.5, 0.5); checkbox.FocusChangedEvt += FocusChangedCb; vbox.Pack(checkbox); diff --git a/tutorial/c/hello-gui/src/gui_main.c b/tutorial/c/hello-gui/src/gui_main.c index 1e86a791..8ecbf5b7 100644 --- a/tutorial/c/hello-gui/src/gui_main.c +++ b/tutorial/c/hello-gui/src/gui_main.c @@ -33,6 +33,7 @@ _gui_setup() efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), efl_gfx_hint_weight_set(efl_added, 1.0, 0.9), efl_gfx_hint_align_set(efl_added, 0.5, 0.5), + efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), efl_text_multiline_set(efl_added,EINA_TRUE), efl_pack(box, efl_added)); diff --git a/tutorial/csharp/hello-gui/src/gui_main.cs b/tutorial/csharp/hello-gui/src/gui_main.cs index cc6eaa90..888fbef6 100644 --- a/tutorial/csharp/hello-gui/src/gui_main.cs +++ b/tutorial/csharp/hello-gui/src/gui_main.cs @@ -36,6 +36,7 @@ public class Example : Efl.Csharp.Application label.SetText("Hello World. This is an Efl.Ui application!"); label.SetSelectionAllowed(false); label.SetHintWeight(1.0, 0.9); + label.SetHintFill(false, false); label.SetHintAlign(0.5, 0.5); // Add the text to the box container box.Pack(label);