spiralofhope / _DevPad.GUI

[unmaintained] A World of Warcraft addon: A notepad for Lua scripts and mini-addons. (GUI component)
http://blog.spiralofhope.com/?p=17397
Other
5 stars 1 forks source link

Change the font of the main list #14

Open spiralofhope opened 7 years ago

spiralofhope commented 7 years ago

A user would likely have a font and size preference for coding in the editor, and would also likely have a font and size preference for the list.

First pass

At the moment, font changes to the list's entries must be hard-coded in.

_DevPad and _DevPad.GUI were made separate, to implement a load-on-demand _DevPad.GUI.

Because of this, there is no current mechanism to have a font preference set from the _DevPad options panel (which must remain with _DevPad) also influence the drawing of _DevPad.GUI components.

From what I can tell, once the list is loaded, its font preferences and size become unalterable.

See #16 - Merge _DevPad and _DevPad.GUI

Customization

The default is 10. It can be changed in _DevPad.GUI.List.lua by editing this line:

Object._ListButton.Name:SetFont( fontName, 10 )
spiralofhope commented 7 years ago

A hard-coded implementation has been introduced in 7.3.0.6

spiralofhope commented 7 years ago

@ssateneth let me know if 10 looks good at your resolution, and if not then the size that's comfortable for you. I'm curious how the font size and scaling interact.

ssateneth commented 7 years ago

Assuming I can look at the font sized through the editor, and assuming it starts at size 2, then 4, 6, 8, etc, a size 6 or 7 (6.5) should match what it was previously for me. But also need to keep in mind that the texture elements (borders, buttons, etc) will still be disproportionately larger compared to the font. Also keep in mind at this point we're tackling aesthetics. Functionally, the addon has been restored, just trying to restore the old visual behavior is up to Blizzard at this point it seems.

spiralofhope commented 7 years ago

I was hoping something universal would suit different resolutions, but a 6 or 7 would be too small for me.

Feel free to edit the _DevPad.GUI.List.lua and hard-code a number that suits you.

Thanks for the feedback. This definitely needs some more thought.. it'll be low priority for some time.