From 429d0edbf8b712de629c97aab51c1e5d88b44892 Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Mon, 11 Dec 2023 21:44:13 +0100 Subject: [PATCH] Fix overflowing Brazilian Portuguese button and change style of current language button --- public/index.html | 64 ++++++++++++++++--------------- public/scripts/ui.js | 28 +++++++------- public/styles/deferred-styles.css | 27 ++++++++----- 3 files changed, 65 insertions(+), 54 deletions(-) diff --git a/public/index.html b/public/index.html index 317a4cc..09d421b 100644 --- a/public/index.html +++ b/public/index.html @@ -182,79 +182,81 @@

-
- - + - - - - - - - - - - - - - -
diff --git a/public/scripts/ui.js b/public/scripts/ui.js index 8c0efd8..a6c6c8e 100644 --- a/public/scripts/ui.js +++ b/public/scripts/ui.js @@ -774,7 +774,7 @@ class LanguageSelectDialog extends Dialog { this.$languageSelectBtn = $('language-selector'); this.$languageSelectBtn.addEventListener('click', _ => this.show()); - this.$languageButtons = this.$el.querySelectorAll(".language-buttons button"); + this.$languageButtons = this.$el.querySelectorAll(".language-buttons .btn"); this.$languageButtons.forEach($btn => { $btn.addEventListener("click", e => this.selectLanguage(e)); }) @@ -790,22 +790,22 @@ class LanguageSelectDialog extends Dialog { } show() { - if (Localization.isSystemLocale()) { - this.$languageButtons[0].focus(); - } - else { - let locale = Localization.getLocale(); - for (let i=0; i .btn-row { margin: 5px 10px 10px; } -.language-buttons > button > span { - margin: 0 0.3em; +.language-buttons > .btn { + border-top: solid lightgray 1px; + padding: 7px; + font-size: 12px; } -.language-buttons > button { - min-height: 36px; +.language-buttons > .btn:last-of-type { + border-bottom: solid lightgray 1px; +} + +/* Ensure click event target is always button and never span */ +.language-buttons span { + z-index: -1; +} + +.language-buttons > .current > span { + text-decoration: underline 4px; + text-decoration-skip-ink: none; + text-underline-position: under; } .file-description {