vlang / ui

A cross-platform UI library written in V
MIT License
2.32k stars 154 forks source link

[Improvement] Make the menu item compact #455

Closed lazalong closed 2 years ago

lazalong commented 2 years ago

Proof of concept to make the menuitem adjust to the text size. The adjustement assumes a fixed sized font (or make the font_size param large enough.
The code is a proof of concept and has a known bugs: The sub-menu don't align correctly (see the end of the screenshot).

It should be easy to add a setting to have fixed-width menu item and compact ones (...once the bug is fixed)

compact menu with bug 220618

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

medvednikov commented 2 years ago

code style ci is red, make sure you use vfmt