Dynamically avoid cutting off the rightmost character in menus

Before I had it wide enough for English, with a max-width,
but not all languages. This is a better solution.
This commit is contained in:
Isaiah Odhner 2023-04-18 22:56:04 -04:00
parent 66ce8df21d
commit d2ab602ff5

View File

@ -118,8 +118,9 @@ Screen {
/* calc isn't supported, and this should be determined by the y position anyways, which is set in python */ /* calc isn't supported, and this should be determined by the y position anyways, which is set in python */
/* max-height: calc(100vh - 3); */ /* max-height: calc(100vh - 3); */
max-height: 90vh; max-height: 90vh;
/* width: auto doesn't account for the scrollbar... */ /* width: auto doesn't account for the vertical scrollbar... */
/* This can cut off a character, but it's not as ugly as having a horizontal scrollbar */ /* which means it would make a horizontal scrollbar or cut off a character on the right, */
/* but I'm accounting for this with padding-right inside the menu item */
overflow-x: hidden; overflow-x: hidden;
} }
/* MenuBar { */ /* MenuBar { */
@ -152,6 +153,8 @@ Screen {
.menu_popup Button { .menu_popup Button {
min-width: 1fr; min-width: 1fr;
text-align: left; text-align: left;
/* This compensates for the scrollbar, so text isn't cut off (though it also applies when there's no scrollbar) */
padding-right: 1;
} }
.window { .window {