Page 1 of 1

Option button text align?

Posted: Sun Jan 27, 2019 1:54 pm
by bogs
While I was playing with buttons today, I noticed something a bit 'quirky' about the option button text.

By default, the text is aligned centered (theoretically) on the button, however, if you choose the align right instead, the text actually moves left about a space. This only happens if you leave the button at its default size or smaller, and apparently goes all the way back to version 3 of the IDE. Rev 2.2.1 notably does not do this, but 3.x through 8.1.2 do.

Pics from 8.1.2 -
Selection_001.png
Text align center...
Selection_002.png
Text align right...
I am guessing it has something to do with the margin and how Lc determines boundaries on the buttons label, since if you increase the width of the button it works correctly, but should this be reported as a bug and fixed? Obviously it isn't difficult to work around, but I can't imagine too many people want to make their buttons wider than they have to.

Re: Option button text align?

Posted: Wed Jan 30, 2019 12:24 am
by dunbarx
Bogs.

I don't see this in v.8.10.

The text "centers" itself (quotes because the "center" is exclusive of the tiny arrows) or aligns itself in a normal manner. The margins seem to work as they should.

Craig

Re: Option button text align?

Posted: Wed Jan 30, 2019 9:21 am
by jmburnod
Hi bogs,
Works as expected for me (OSX 10.13 LC 9.0.1
best
Jean-Marc

Re: Option button text align?

Posted: Wed Jan 30, 2019 9:59 am
by bogs
Well, what I am seeing looks like "center" doesn't take the | and arrows into account, but when you "align right", those features of the button are taken into account (to different degrees) in the different versions, except 2.x which appears to take the end design of the button into account for all alignments.

I believe the margins are working as they should be, as far as what they do, but I think they are based on 2 different points of this particular button, which is why "right" align pushes the text to the left, if you see what I mean. The pictures in the first post are from 8.1.2, the last version I can get to run (somewhat) reliably on this system.

This is how it aligns in 2.x -
Selection_001.png
Align center...
Selection_001.png (11.66 KiB) Viewed 3331 times
Selection_003.png
Align right...
Of course, I am seeing this on 'nix, I'll go test on Windows and see if it is the same or no.

Thank you for testing it out on Mac, Jean-Marc :D

*Edit - On Windows 7 the align works as I would think it should no matter the size of the button, so I am beginning to think this is a 'nix only issue :roll:

Re: Option button text align?

Posted: Wed Jan 30, 2019 11:34 am
by bogs
So, after 3 hours of playing with this across 3 OSes, it appears this is a 'nix only issue. Since it only happens on 'nix, I'm thinking bug.

*Edit - I've been going through the bug db, so far the two closest reports I have found are
5782 CONFIRMED --- Option menu buttons under GNOME don't look and behave as ... 2016-07-12
for 'nix and
Bug 11415 - Incorrect text alignment in buttons
for Mac. Of the two, the mac one is closer to the actual issue, so even though it has been resolved on Mac, I'll tack this onto the end of it.