From 05290bf9c98d159a3f45d4961b26ef5806834b89 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Tue, 11 Dec 2018 14:52:30 +0100 Subject: [PATCH] Fix settings button on small screens --- public/javascripts/components/game.js | 6 +++--- public/stylesheets/variant.sass | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index c7ec715a..f5b7eda2 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -92,7 +92,7 @@ Vue.component('my-game', { const settingsBtnElt = document.getElementById("settingsBtn"); const indicWidth = !!settingsBtnElt //-2 for border: ? parseFloat(window.getComputedStyle(settingsBtnElt).height.slice(0,-2)) - 2 - : 37; //TODO: always 37? + : (smallScreen ? 31 : 37); if (this.mode == "human") { let connectedIndic = h( @@ -140,8 +140,8 @@ Vue.component('my-game', { "tooltip": true, "topindicator": true, "indic-right": true, - "settings-btn": true, - "small": smallScreen, + "settings-btn": !smallScreen, + "settings-btn-small": smallScreen, }, }, [h('i', { 'class': { "material-icons": true } }, "settings")] diff --git a/public/stylesheets/variant.sass b/public/stylesheets/variant.sass index 0ea9af42..9f38e774 100644 --- a/public/stylesheets/variant.sass +++ b/public/stylesheets/variant.sass @@ -76,6 +76,9 @@ figure.diagram-container > .diagram .settings-btn padding: 6px 7px 0 7px +.settings-btn-small + padding: 0 3px + .white-turn background-color: white -- 2.44.0