From d2ab602ff56306d3152962801c6b9aea55b59fc2 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Tue, 18 Apr 2023 22:56:04 -0400 Subject: [PATCH] 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. --- paint.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paint.css b/paint.css index 6c310b6..65aafb6 100644 --- a/paint.css +++ b/paint.css @@ -118,8 +118,9 @@ Screen { /* 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: 90vh; - /* width: auto doesn't account for the scrollbar... */ - /* This can cut off a character, but it's not as ugly as having a horizontal scrollbar */ + /* width: auto doesn't account for the vertical 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; } /* MenuBar { */ @@ -152,6 +153,8 @@ Screen { .menu_popup Button { min-width: 1fr; 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 {