Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cosmetic] Alternate bezel style text alignment #220

Open
ryanbugden opened this issue Jan 3, 2025 · 1 comment
Open

[Cosmetic] Alternate bezel style text alignment #220

ryanbugden opened this issue Jan 3, 2025 · 1 comment

Comments

@ryanbugden
Copy link

Button bezel style 8 is nice and useful sometimes. Any idea why the sizing, and vertical alignment of text, appears different? This affects ezui as well. Is this an Apple issue?

The text alignment on RoboFont Mechanic’s buttons look better, but there's no explicit bezel style setting, so I guess it's the native button type for Popovers?

Test script

image
from vanilla import *

class VanillaController():

    def __init__(self):
        self.w = Window((200, 100))

        self.w.button1 = Button((20, 20, 100, 14), "Button")
        self.w.button1.getNSButton().setBezelStyle_(8)
        
        self.w.button2 = Button((20, 60, 100, 14), "Button")
        
        self.w.open()
        

VanillaController()

Batch example

https://github.com/robofont-mechanic/mechanic-2/blob/dfa3e0961d31146c665db1628f7c04de5eef7c03/Mechanic2.roboFontExt/lib/mechanic2/ui/controller.py#L77-L80

image
@typemytype
Copy link
Member

you will need to play around with the sizeStyle, when the height is 15 it looks already better...

also see standard dimensions: https://github.com/robotools/vanilla/blob/master/Lib/vanilla/vanillaButton.py#L70-L76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants