Add hint display
authorVirgil Dupras <hsoft@hardcoded.net>
Mon, 24 Apr 2017 02:47:22 +0000 (22:47 -0400)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 6 May 2017 23:31:56 +0000 (01:31 +0200)
Pressing 'F' will show hints with the old styling from the master
branch.

src/config.def.h
src/scripts/hints.js
src/scripts/js2h.sh

index 2682a9d..95e8970 100644 (file)
 #define SETTING_GUI_FONT_NORMAL               "10pt monospace"
 #define SETTING_GUI_FONT_EMPH                 "bold 10pt monospace"
 #define SETTING_HOME_PAGE                     "about:blank"
+
+/* CSS style use on creating hints. This might also be averrules by css out of
+ * $XDG_CONFIG_HOME/vimb/style.css file. */
+#define HINT_CSS "#_hintContainer{\
+position:static\
+}\
+._hintLabel{\
+-webkit-transform:translate(-4px,-4px);\
+position:absolute;\
+z-index:100000;\
+font:bold .8em monospace;\
+color:#000;\
+background-color:#fff;\
+margin:0;\
+padding:0px 1px;\
+border:1px solid #444;\
+opacity:0.7\
+}\
+._hintElem{\
+background-color:#ff0 !important;\
+color:#000 !important;\
+transition:all 0 !important;\
+transition-delay:all 0 !important\
+}\
+._hintElem._hintFocus{\
+background-color:#8f0 !important\
+}\
+._hintLabel._hintFocus{\
+z-index:100001;\
+opacity:1\
+}"
+
index 7f4dcf2..04cd51c 100644 (file)
@@ -541,5 +541,5 @@ var hints = Object.freeze((function(){
 
 function testHint() {
     console.log("harmless testing!");
-    /* hints.init('t', false, 500, '', false, false); */
+    hints.init('t', false, 500, '0123456789', false, false);
 }
index 82903d5..4a76777 100755 (executable)
@@ -32,7 +32,8 @@ sed -e 's:/\*[^*]*\*/::g' \
 # ecaspe
 sed -e 's|\\x20| |g' \
     -e 's|\\|\\\\|g' \
-    -e 's|"|\\"|g' | \
+    -e 's|"|\\"|g' \
+    -e 's|HINT_CSS|" HINT_CSS "|' | \
 # write opener with the starting and ending quote char
 sed -e "1s/^/#define $CONSTANT \"/" \
     -e '$s/$/"\n/'