From 594c81a3fc4c65358ff67025beb840e9ff95188f Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Mon, 25 Jan 2016 00:11:08 -0500 Subject: [PATCH] make canvas/console find bar look halfway decent in default.css, and add boilerplate to adjust it for the other skins --- pd/nw/css/c64.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/default.css | 6 ++++-- pd/nw/css/extended.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/inverted.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/strongbad.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/subdued.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/vanilla.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/css/vanilla_inverted.css | 34 ++++++++++++++++++++++++++++++++++ pd/nw/index.js | 2 +- 9 files changed, 243 insertions(+), 3 deletions(-) diff --git a/pd/nw/css/c64.css b/pd/nw/css/c64.css index c6fb71302..d99f6076a 100644 --- a/pd/nw/css/c64.css +++ b/pd/nw/css/c64.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* patch font and background color. (Note: margin needs to stay at zero.) */ @@ -272,6 +296,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/default.css b/pd/nw/css/default.css index a34617a27..98c3b8fea 100644 --- a/pd/nw/css/default.css +++ b/pd/nw/css/default.css @@ -65,7 +65,8 @@ mark.console_find_highlighted { #console_find { width: 100%; height: 1em; - background: red; + padding: 0.25em; + background: silver; position: fixed; bottom: 0; left: 0; @@ -312,7 +313,8 @@ text { #canvas_find { width: 100%; height: 1em; - background: red; + padding: 3px; + background: silver; position: fixed; bottom: 0; left: 0; diff --git a/pd/nw/css/extended.css b/pd/nw/css/extended.css index 41a9edfa5..4dc07119b 100644 --- a/pd/nw/css/extended.css +++ b/pd/nw/css/extended.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* patch font and background color. (Note: margin needs to stay at zero.) */ @@ -271,6 +295,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/inverted.css b/pd/nw/css/inverted.css index 793b5db93..b7ecb9cfb 100644 --- a/pd/nw/css/inverted.css +++ b/pd/nw/css/inverted.css @@ -48,6 +48,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* patch font and background color. (Note: margin needs to stay at zero.) */ @@ -276,6 +300,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/strongbad.css b/pd/nw/css/strongbad.css index 9d546e9a6..7f4ef3feb 100644 --- a/pd/nw/css/strongbad.css +++ b/pd/nw/css/strongbad.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* patch font and background color. (Note: margin needs to stay at zero.) */ @@ -274,6 +298,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/subdued.css b/pd/nw/css/subdued.css index 69a95925c..19a3eeb69 100644 --- a/pd/nw/css/subdued.css +++ b/pd/nw/css/subdued.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* patch font and background color. (Note: margin needs to stay at zero.) */ @@ -273,6 +297,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/vanilla.css b/pd/nw/css/vanilla.css index b6bba2042..2291adbfc 100644 --- a/pd/nw/css/vanilla.css +++ b/pd/nw/css/vanilla.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* canvas font and background color. (Note: margin needs to stay at zero.) */ @@ -273,6 +297,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/css/vanilla_inverted.css b/pd/nw/css/vanilla_inverted.css index 981ba3f3e..e491009c8 100644 --- a/pd/nw/css/vanilla_inverted.css +++ b/pd/nw/css/vanilla_inverted.css @@ -47,6 +47,30 @@ overflow-y: scroll; } +/* marks for matches to console_find */ +mark { + background: white; +} + +mark.console_find_current.console_find_highlighted, +mark.console_find_current { + background: yellow; +} + +mark.console_find_highlighted { + background: red; +} + +#console_find { + width: 100%; + height: 1em; + padding: 0.2em; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Pure Data Patch Window (aka canvas) */ /* canvas font and background color. (Note: margin needs to stay at zero.) */ @@ -278,6 +302,16 @@ text { -webkit-animation: fizzle 0.5s linear 1; } +#canvas_find { + width: 100%; + height: 1em; + padding: 3px; + background: silver; + position: fixed; + bottom: 0; + left: 0; +} + /* Common to all dialogs */ .submit_buttons { diff --git a/pd/nw/index.js b/pd/nw/index.js index 31a3bb36c..f2976e62d 100644 --- a/pd/nw/index.js +++ b/pd/nw/index.js @@ -475,7 +475,7 @@ function nw_create_pd_window_menus(gui, w) { text_container = w.document.getElementById("console_bottom"), state = find_bar.style.getPropertyValue("display"); if (state === "none") { - text_container.style.setProperty("bottom", "1em"); + text_container.style.setProperty("bottom", "1.4em"); find_bar.style.setProperty("display", "inline"); find_bar.style.setProperty("height", "1em"); text_container.scrollTop = text_container.scrollHeight; -- GitLab