Re: [E-devel] Vertical Align of Edje Textblock

2008-01-18 Thread Gustavo Sverzut Barbieri
On Jan 18, 2008 4:19 AM, The Rasterman Carsten Haitzler
[EMAIL PROTECTED] wrote:
 On Wed, 26 Dec 2007 00:29:27 +0100 Thomas Gstädtner [EMAIL PROTECTED]
 babbled:

  Hello people,
 
  I'm currently working on my first interface in edje and guess I found a bug
  in the edje-textblock.
  As I want to do multi-line captions on buttons, I want to have the textblock
  centered on the button-graphics.
  I assumed that the valign-property in the style-block was what I wanted, but
  neither valign=center nor valign=0.5 works.
  Horizontal align works perfectly.
  So I also tried to set the align property for the part itself (even if it
  should be 0.5 0.5 by default) what didn't work, too.
  As the valign style-property seems to do nothing at all, I assume that's a
  bug.
  Can somebody confirm and fix this? :)

 valign in a textblock is the alignment WITHIN a line of text - so imagine u
 have a 30point font and a 8point fount on the same line - valign controls 
 where
 the 8point font is aligned.

this clarify things a bit :-) Maybe someone could add it to the wiki?
(please remind me later if nobody does).


 align SHOULD work if you set the min: 1 1; (ie make the minimum size of the
 part controlled by the minimum size of the text itself.

given that the part have a _small_ size (ie: height = 0), then part
will grow (due: min: 1 1) and be aligned to _external_ align (the one
inside description, not the one inside TEXT, not sure TEXTBLOCK have
that), am I right?


-- 
Gustavo Sverzut Barbieri
--
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2008-01-18 Thread The Rasterman
On Fri, 18 Jan 2008 09:16:52 -0300 Gustavo Sverzut Barbieri
[EMAIL PROTECTED] babbled:

 On Jan 18, 2008 4:19 AM, The Rasterman Carsten Haitzler
 [EMAIL PROTECTED] wrote:
  On Wed, 26 Dec 2007 00:29:27 +0100 Thomas Gstädtner
  [EMAIL PROTECTED] babbled:
 
   Hello people,
  
   I'm currently working on my first interface in edje and guess I found a
   bug in the edje-textblock.
   As I want to do multi-line captions on buttons, I want to have the
   textblock centered on the button-graphics.
   I assumed that the valign-property in the style-block was what I wanted,
   but neither valign=center nor valign=0.5 works.
   Horizontal align works perfectly.
   So I also tried to set the align property for the part itself (even if it
   should be 0.5 0.5 by default) what didn't work, too.
   As the valign style-property seems to do nothing at all, I assume that's a
   bug.
   Can somebody confirm and fix this? :)
 
  valign in a textblock is the alignment WITHIN a line of text - so imagine u
  have a 30point font and a 8point fount on the same line - valign controls
  where the 8point font is aligned.
 
 this clarify things a bit :-) Maybe someone could add it to the wiki?
 (please remind me later if nobody does).
 
 
  align SHOULD work if you set the min: 1 1; (ie make the minimum size of the
  part controlled by the minimum size of the text itself.
 
 given that the part have a _small_ size (ie: height = 0), then part
 will grow (due: min: 1 1) and be aligned to _external_ align (the one
 inside description, not the one inside TEXT, not sure TEXTBLOCK have
 that), am I right?

well textblock itself won't align the text within the tb object to be in the
middle, but the tb object will resize to be the minimum size of the tb object
when the text is formatted. so that means it will be 2 lines of text (lets say
80x40 in size) then THIS object will align WITHIN its given allocated space
(you set rel1/rel2 to cover the entire parent region) and the align property on
the part will be able to vertically center the tb object itself. :)

 
 -- 
 Gustavo Sverzut Barbieri
 --
 Jabber: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
   ICQ#: 17249123
  Skype: gsbarbieri
 Mobile: +55 (81) 9927 0010
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2008-01-18 Thread Gustavo Sverzut Barbieri
On Jan 18, 2008 9:16 AM, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote:
 On Jan 18, 2008 4:19 AM, The Rasterman Carsten Haitzler
 [EMAIL PROTECTED] wrote:
  On Wed, 26 Dec 2007 00:29:27 +0100 Thomas Gstädtner [EMAIL PROTECTED]
  babbled:
 
   Hello people,
  
   I'm currently working on my first interface in edje and guess I found a 
   bug
   in the edje-textblock.
   As I want to do multi-line captions on buttons, I want to have the 
   textblock
   centered on the button-graphics.
   I assumed that the valign-property in the style-block was what I wanted, 
   but
   neither valign=center nor valign=0.5 works.
   Horizontal align works perfectly.
   So I also tried to set the align property for the part itself (even if it
   should be 0.5 0.5 by default) what didn't work, too.
   As the valign style-property seems to do nothing at all, I assume that's a
   bug.
   Can somebody confirm and fix this? :)
 
  valign in a textblock is the alignment WITHIN a line of text - so imagine u
  have a 30point font and a 8point fount on the same line - valign controls 
  where
  the 8point font is aligned.

 this clarify things a bit :-) Maybe someone could add it to the wiki?
 (please remind me later if nobody does).

Done: http://wiki.enlightenment.org/index.php/Edje_Style#Alignment

dresb, I added you to the CC so you can update your docs too.

-- 
Gustavo Sverzut Barbieri
--
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2008-01-17 Thread The Rasterman
On Wed, 26 Dec 2007 00:29:27 +0100 Thomas Gstädtner [EMAIL PROTECTED]
babbled:

 Hello people,
 
 I'm currently working on my first interface in edje and guess I found a bug
 in the edje-textblock.
 As I want to do multi-line captions on buttons, I want to have the textblock
 centered on the button-graphics.
 I assumed that the valign-property in the style-block was what I wanted, but
 neither valign=center nor valign=0.5 works.
 Horizontal align works perfectly.
 So I also tried to set the align property for the part itself (even if it
 should be 0.5 0.5 by default) what didn't work, too.
 As the valign style-property seems to do nothing at all, I assume that's a
 bug.
 Can somebody confirm and fix this? :)

valign in a textblock is the alignment WITHIN a line of text - so imagine u
have a 30point font and a 8point fount on the same line - valign controls where
the 8point font is aligned.

align SHOULD work if you set the min: 1 1; (ie make the minimum size of the
part controlled by the minimum size of the text itself.

 Greetings,
 
 thomasg
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2007-12-27 Thread Ethan Grammatikidis
On Tue, 25 Dec 2007 20:13:21 -0600
Nick Hughart [EMAIL PROTECTED] wrote:

 My thoughts on this would be to leave the valign as is and implement a 
 way to adjust the line height independent of the font size so that the 
 valign will actually mean something.  Then make sure that the align 
 property for the part actually works.  This seems the most logical to 
 me, anyone else?

If you're adjusting the line height independently of the font size, won't that 
mean that lines get run together at some font sizes, or maybe even at unusual 
dot pitches (such as are found in embedded devices)? Also there's the opposite 
possibility of lines being spaced ridiculously far apart. Either possibility 
would break edje's claim to making it easy to adapt nicely to different screen 
resolutions.

I'm not sure I understand Thomas' issue right, but if I do then it sounds like 
a bug to me. If you are packing a multi-line text block into a larger 
container, then expected behavior for a valign value corresponding to center 
would be to align the vertical center of the text block with the vertical 
center of the container. An exception might be if the valign of the text widget 
is specifically meant to apply to the first line only, in which case I would 
question it's usefulness.

Without knowing anything of the edje code, (or Thomas') all I can suggest as a 
possible gotcha is that the total line-height of a font does not correspond 
to it's size in points or pixels. It is the font's size plus the line spacing, 
leading to use the proper term, and fonts always have some built-in leading. 
It's a simple error, but could possibly have been made in the edje code for 
vertical-aligning blocks of text.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2007-12-27 Thread Nick Hughart
Ethan Grammatikidis wrote:
 On Tue, 25 Dec 2007 20:13:21 -0600
 Nick Hughart [EMAIL PROTECTED] wrote:

   
 My thoughts on this would be to leave the valign as is and implement a 
 way to adjust the line height independent of the font size so that the 
 valign will actually mean something.  Then make sure that the align 
 property for the part actually works.  This seems the most logical to 
 me, anyone else?
 

 If you're adjusting the line height independently of the font size, won't 
 that mean that lines get run together at some font sizes, or maybe even at 
 unusual dot pitches (such as are found in embedded devices)? Also there's the 
 opposite possibility of lines being spaced ridiculously far apart. Either 
 possibility would break edje's claim to making it easy to adapt nicely to 
 different screen resolutions.
   
The purpose here was to provide some way to space lines of text.  So a 
padding, margin, or line spacing would be good as well and avoid the 
issue you are talking about.  It comes with it's own issues, but the 
theme has a lot of control and could potentially base it's 
padding/margins off the font size if there are proper signals in place.  
If one of these properties already exists, I was unable to find it.
 I'm not sure I understand Thomas' issue right, but if I do then it sounds 
 like a bug to me. If you are packing a multi-line text block into a larger 
 container, then expected behavior for a valign value corresponding to 
 center would be to align the vertical center of the text block with the 
 vertical center of the container. An exception might be if the valign of the 
 text widget is specifically meant to apply to the first line only, in which 
 case I would question it's usefulness.
   
The issue is the valign property for textblock applies to the lines.  
This is useless as there is no padding or margins to make the property 
of any use.  The line will always be in the same position as the line 
height is the same as the font height.  The align on the textblock part 
should work though.  The issue might be that the textblock doesn't 
report it's height correctly or something.

If you think about the align textblock property you'll note it works on 
a line by line basis and not the whole block.  It would be interesting 
to know if the align on the part itself works horizontally as well.  If 
not then it could be another pointer to the textblock not reporting it's 
size.

Since I haven't touched much edje internals, it's just a guess.  I had 
spent some time trying to figure out a way to achieve a certain effect, 
but ended up having to use some embryo to change the offset of the 
textblock to make it vertical align bottom and scroll up.
 Without knowing anything of the edje code, (or Thomas') all I can suggest as 
 a possible gotcha is that the total line-height of a font does not 
 correspond to it's size in points or pixels. It is the font's size plus the 
 line spacing, leading to use the proper term, and fonts always have some 
 built-in leading. It's a simple error, but could possibly have been made in 
 the edje code for vertical-aligning blocks of text.

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
   


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Vertical Align of Edje Textblock

2007-12-25 Thread Nick Hughart
My thoughts on this would be to leave the valign as is and implement a 
way to adjust the line height independent of the font size so that the 
valign will actually mean something.  Then make sure that the align 
property for the part actually works.  This seems the most logical to 
me, anyone else?

Thomas Gstädtner wrote:
 Hello people,

 I'm currently working on my first interface in edje and guess I found a bug
 in the edje-textblock.
 As I want to do multi-line captions on buttons, I want to have the textblock
 centered on the button-graphics.
 I assumed that the valign-property in the style-block was what I wanted, but
 neither valign=center nor valign=0.5 works.
 Horizontal align works perfectly.
 So I also tried to set the align property for the part itself (even if it
 should be 0.5 0.5 by default) what didn't work, too.
 As the valign style-property seems to do nothing at all, I assume that's a
 bug.
 Can somebody confirm and fix this? :)

 Greetings,

 thomasg
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
   


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel