diff options
author | Xavi Artigas <xavierartigas@yahoo.es> | 2019-04-30 18:50:47 +0200 |
---|---|---|
committer | Xavi Artigas <xavierartigas@yahoo.es> | 2019-04-30 18:56:39 +0200 |
commit | fdeb87bb751d7f8818e1df9a3d8925dd8721e2e7 (patch) | |
tree | a72ce1f0f627cf44a8790a77f1a17b3203b2de26 | |
parent | b2c41e4e011bfddb5980ab011492fd7c70f4baf5 (diff) |
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
-rw-r--r-- | reference/csharp/ui/src/focus_main.cs | 1 | ||||
-rw-r--r-- | tutorial/c/hello-gui/src/gui_main.c | 1 | ||||
-rw-r--r-- | tutorial/csharp/hello-gui/src/gui_main.cs | 1 |
3 files changed, 3 insertions, 0 deletions
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 | |||
30 | for (int i = 0; i< 5; i++) { | 30 | for (int i = 0; i< 5; i++) { |
31 | var checkbox = new Efl.Ui.Check(vbox); | 31 | var checkbox = new Efl.Ui.Check(vbox); |
32 | checkbox.SetText("Check " + i); | 32 | checkbox.SetText("Check " + i); |
33 | checkbox.SetHintFill(false, false); | ||
33 | checkbox.SetHintAlign(0.5, 0.5); | 34 | checkbox.SetHintAlign(0.5, 0.5); |
34 | checkbox.FocusChangedEvt += FocusChangedCb; | 35 | checkbox.FocusChangedEvt += FocusChangedCb; |
35 | vbox.Pack(checkbox); | 36 | 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() | |||
33 | efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), | 33 | efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE), |
34 | efl_gfx_hint_weight_set(efl_added, 1.0, 0.9), | 34 | efl_gfx_hint_weight_set(efl_added, 1.0, 0.9), |
35 | efl_gfx_hint_align_set(efl_added, 0.5, 0.5), | 35 | efl_gfx_hint_align_set(efl_added, 0.5, 0.5), |
36 | efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), | ||
36 | efl_text_multiline_set(efl_added,EINA_TRUE), | 37 | efl_text_multiline_set(efl_added,EINA_TRUE), |
37 | efl_pack(box, efl_added)); | 38 | efl_pack(box, efl_added)); |
38 | 39 | ||
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 | |||
36 | label.SetText("Hello World. This is an Efl.Ui application!"); | 36 | label.SetText("Hello World. This is an Efl.Ui application!"); |
37 | label.SetSelectionAllowed(false); | 37 | label.SetSelectionAllowed(false); |
38 | label.SetHintWeight(1.0, 0.9); | 38 | label.SetHintWeight(1.0, 0.9); |
39 | label.SetHintFill(false, false); | ||
39 | label.SetHintAlign(0.5, 0.5); | 40 | label.SetHintAlign(0.5, 0.5); |
40 | // Add the text to the box container | 41 | // Add the text to the box container |
41 | box.Pack(label); | 42 | box.Pack(label); |