Option button text align?

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
bogs
Posts: 3717
Joined: Sat Feb 25, 2017 10:45 pm

Option button text align?

Post by bogs » Sun Jan 27, 2019 1:54 pm

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.
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6117
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Option button text align?

Post by dunbarx » Wed Jan 30, 2019 12:24 am

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2365
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Option button text align?

Post by jmburnod » Wed Jan 30, 2019 9:21 am

Hi bogs,
Works as expected for me (OSX 10.13 LC 9.0.1
best
Jean-Marc

bogs
Posts: 3717
Joined: Sat Feb 25, 2017 10:45 pm

Re: Option button text align?

Post by bogs » Wed Jan 30, 2019 9:59 am

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 473 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:
Image

bogs
Posts: 3717
Joined: Sat Feb 25, 2017 10:45 pm

Re: Option button text align?

Post by bogs » Wed Jan 30, 2019 11:34 am

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.
Image

Post Reply

Return to “Bug Triage”