Index: gc_lang/fr/webext/content_scripts/panel.css ================================================================== --- gc_lang/fr/webext/content_scripts/panel.css +++ gc_lang/fr/webext/content_scripts/panel.css @@ -144,20 +144,21 @@ border-radius: 3px; } div.grammalecte_menu_button:hover { background-color: hsl(210, 80%, 40%); } -div.grammalecte_autorefresh_button { +div.grammalecte_menu_subbutton { display: inline-block; padding: 0 5px; margin-left: 5px; border-radius: 3px; background-color: hsl(0, 50%, 50%); + font-size: 10px; color: hsl(0, 50%, 96%); opacity: .7; } -div.grammalecte_autorefresh_button:hover { +div.grammalecte_menu_subbutton:hover { opacity: 1; } div.grammalecte_panel_content { /* https://stackoverflow.com/questions/7676022/html5-flexible-box-model-height-calculation/15388247#15388247 */ Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -74,16 +74,19 @@ this.bListenConj = false; } createMenu () { this.xMenu = oGrammalecte.createNode("div", {className: "grammalecte_panel_menu"}); + // tabs this.xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Formateur de texte"}); this.xEditorButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Éditeur"}); this.xLxgButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Lexicographe"}); this.xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Conjugueur"}); - this.xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "•Éditeur lexical•"}); - this.xAutoRefresh = oGrammalecte.createNode("div", {className: "grammalecte_autorefresh_button", textContent: "AR", title: "Auto-rafraîchissement de la correction grammaticale (3 s après la dernière frappe)"}) + // buttons + this.xLexEditButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_subbutton", textContent: "ÉditLex", title: "Ouvrir l’éditeur lexical", style: "background-color: hsl(210, 50%, 40%)"}); + this.xLxgButton.appendChild(this.xLexEditButton) + this.xAutoRefresh = oGrammalecte.createNode("div", {className: "grammalecte_menu_subbutton", textContent: "AutoRafr", title: "Auto-rafraîchissement de la correction grammaticale (3 s après la dernière frappe)"}) this.xEditorButton.appendChild(this.xAutoRefresh); this.bAutoRefresh = oGrammalecte.bAutoRefresh; this.setAutoRefreshButton(); this.xTFButton.onclick = () => { if (!this.bWorking) { @@ -123,19 +126,18 @@ this.xConjButton.onclick = () => { if (!this.bWorking) { this.showConjugueur(); } }; - this.xLEButton.onclick = () => { + this.xLexEditButton.onclick = () => { xGrammalectePort.postMessage({sCommand: "openLexiconEditor", dParam: null, dInfo: null}); }; - // Menu, tabs + // Add tabs to menu this.xMenu.appendChild(this.xTFButton) this.xMenu.appendChild(this.xEditorButton) this.xMenu.appendChild(this.xLxgButton) this.xMenu.appendChild(this.xConjButton) - this.xMenu.appendChild(this.xLEButton) this.xPanelBar.appendChild(this.xMenu); } start (what) { this.oTooltip.hide();