Re: GtkEntry right aligned/justified (and Solution)



Steffen Gutmann wrote:
Hi Egon!

Egon Andersen wrote:


So, it seems their implementation isn't complete yet...

Well, yours isn't complete either ;-)


I think, they were talking about scrolling and that the solution in 59799 didn't cover it correctly. I checked the scrolling in my version and seems to be ok.

There is nothing wrong with the scrolling in the solution in 59799.
We just had some discussions about how the code could be written, but the results are the same. There was a little about clamp, where I had a short brain-damage, as at the time where Owen Taylor commented on it, it was almost 6 months since I looked at this. (And now it is another year.)

Have you tried to set RTL and used your solution?
You have default LEFT, which I believe will not be what was expected when RTL.

59799 respects the RTL and an adjustment equal to 0.0 is the default.
An adjustment of 1.0 will do the opposite, which in LTR means right adjusted, but in RTL means left adjusted.

What is missing in 59799 is commented by Owen Taylor, something like the g_return_if_fail and then the description of the functions should be improved.


Yes, I agree. Actually, the whole gtkentry.c could benefit from some more comments...


Couldn't agree more ...

The solution in 59799 give the possibility to have any alignment, not just right, left and center as your proposal.


This is something I want to discuss. In principle I see no problem in making GtkEntry having any alignment (in [0;1]) and the solution would be straight-forward (given what I have now). But is there any need in having an entry aligned other then left, center, or right? For, a label I see that one might want to have it aligned with a value of 0.1 (so mainly left but also using little space on the left if available), but for a GtkEntry? Would that make sense? Editing a GtkEntry with an alignment of 0.1 might be a strange thing. I only see left, center and right useful like in an text editor: most time you have text left aligned, for numbers you might choose right aligned, and for something pretty, you center it.

Well, my experience it that whenever something is restricted, someone would like to do something that was not possible due to the restrictions.

Furthermore there must be made test-instructions.


How about, if the entry example covers this? A new choice-type field could be added to the example where the user can select the justification.

I believe a test instruction is a little more than just an example.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]