From 7e8b8345e7b50b67c4848711a3cf4d7efa467556 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 10 Mar 2021 12:21:27 -0800 Subject: [PATCH] Fix some graphical glitches in fish_config fish_config has some shadows and other elements which don't align propertly. Fix these, and apply some other miscellaneous polish. Fixes #7811 --- CHANGELOG.rst | 2 ++ share/tools/web_config/fishconfig.css | 37 +++++++++++++-------- share/tools/web_config/partials/colors.html | 2 +- share/tools/web_config/partials/prompt.html | 20 ++++++----- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bbdef7007..2e0acd5a0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -45,6 +45,7 @@ This release of fish fixes a few issues discovered in fish 3.2.0: - ``set_color --print-colors`` no longer prints all colors in bold (:issue:`7805`) - Completing commands starting with a ``-`` no longer prints an error (:issue:`7809`). + As well as a few small enhancements: - ``help`` and ``fish_config`` no longer open to a "Your file couldn't be accessed" page when fish is running in a Chrome OS Crostini Linux VM and URLs are opened in Chrome running outside the VM (:issue:`7789`). @@ -54,6 +55,7 @@ As well as a few small enhancements: - ``fish_command_not_found`` is now always defined, even if there is no os-specific handler, instead of relying on fish's hardcoded fallback (:issue:`7777`). - fish no longer prints an annoying error if ``access(3)`` fails in standard-nonconforming ways (:issue:`7785`). - Some completion descriptions were reworded and shortened (:issue:`7788`). +- Some graphics glitches in ``fish_config`` have been resolved (:issue:`7811`). If you are upgrading from version 3.1.2 or before, please also review diff --git a/share/tools/web_config/fishconfig.css b/share/tools/web_config/fishconfig.css index ad042b5e1..7a611cdd2 100644 --- a/share/tools/web_config/fishconfig.css +++ b/share/tools/web_config/fishconfig.css @@ -2,13 +2,16 @@ body { background: linear-gradient(to bottom, #a7cfdf 0%, #23538a 100%); font-family: monospace, fixed; color: #222; - min-height: 100vh; /* at least 1 screen high - to prevent the gradient from running out on a short tab */ +} + +#ancestor { width: 90%; margin-left: auto; margin-right: auto; -moz-box-shadow: 0 0 1px 1px #333; -webkit-box-shadow: 0 0 1px 1px #333; box-shadow: 0 0 5px 1px #333; + border-radius: 8px; } code { @@ -33,6 +36,7 @@ code { display: table-cell; border: 1px solid #ccc; border-right: none; + border-top: none; padding-bottom: 15px; padding-top: 15px; padding-left: 3px; @@ -45,22 +49,13 @@ code { #tab_parent :first-child { border-top-left-radius: 8px; + border-left: none; } #tab_parent :last-child { border-top-right-radius: 8px; } -.tab_first { - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; -} - -.tab_last { - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} - .selected_tab { background-color: #eeeefa; border-bottom: none; @@ -70,11 +65,24 @@ code { padding-top: 20px; padding-bottom: 20px; width: 100%; - min-height: 80vh; + min-height: 90vh; background-color: #eeeefa; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; margin-bottom: 20px; + position: relative; + box-sizing: border-box; +} + +/* This may be placed directly inside a tab, to prevent its contents from growing vertically. */ +.height_limiter { + display: flex; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + flex-direction: column; } .footer { @@ -429,7 +437,10 @@ code { .prompt_choices_scrollview { padding-top: 5px; overflow-y: scroll; - max-height: 70vh; /* fill out roughly the rest of the screen once scrolled to the preview */ +} + +.prompt_choices_scrollview { + position: relative; } .color_scheme_choices_list, diff --git a/share/tools/web_config/partials/colors.html b/share/tools/web_config/partials/colors.html index f13c4c7f9..cdf21f297 100644 --- a/share/tools/web_config/partials/colors.html +++ b/share/tools/web_config/partials/colors.html @@ -1,6 +1,6 @@
+fish cannot change the background color of your terminal. Refer to your terminal documentation to set its background color.">
{{ selectedColorScheme.name }}
diff --git a/share/tools/web_config/partials/prompt.html b/share/tools/web_config/partials/prompt.html index 57119bdde..84bc2bd56 100644 --- a/share/tools/web_config/partials/prompt.html +++ b/share/tools/web_config/partials/prompt.html @@ -1,20 +1,22 @@ +
-
{{ selectedPrompt.name }}
+
{{ selectedPrompt.name }}
{{ savePromptButtonTitle }} + ng-show="showSaveButton" + style="color: #CCC" + ng-click="setPrompt()">{{ savePromptButtonTitle }}
-
Preview a prompt below:
+
Preview a prompt below:
-
-
{{ prompt.name }}
-
-
+
+
{{ prompt.name }}
+
+
+