Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

bug: styling of long channel name is broken #90

Open
drcicero opened this issue Apr 16, 2020 · 0 comments
Open

bug: styling of long channel name is broken #90

drcicero opened this issue Apr 16, 2020 · 0 comments

Comments

@drcicero
Copy link

drcicero commented Apr 16, 2020

Hi, I just tried wey! The first thing I noticed is that I have some channels names are just a bit longer than a single line and also some direct channels with 5 people, where not all names fit in a single line. So some of the text is cut off. That would be not much of a problem, if for example only the first line at the beginning of the channel name would be visible, however what happens is that the name gets split into two lines, but the height of the channel div/box remains constant (e.g. appropiate for a single line), and the text is vertically center in that div/box...

This means you only get to see the lower half of the first line and the upper half of the second line of a long channel name, and that looks broken.

If its related to the native GUI and not the HTML part, it might be relevant that I am using Linux.

EDIT: Looking at the code it seems the channel list is consists of channel titles, which in turn are instances of gui.Containers (https://github.com/yue/wey/blob/master/lib/view/channel-title.js#L14). I think the method measuretext from yue (https://libyue.com/docs/latest/js/api/painter.html#measuretext-text-width-attributes) could be relevant to solve this problem. Another solution could be to use a Label instead of a Container (https://libyue.com/docs/latest/js/api/label.html). But I have no clue about wey or yue so thats just guessing based on using other GUI frameworks. :)

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

No branches or pull requests

1 participant