From c9692e54244d2dd3c3324da0dc77053712f60cb3 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Thu, 26 Oct 2023 18:21:09 -0700 Subject: [PATCH] Add touchpad mobile button to the control bar. - Add touchpad.svg to images. - Add #noVNC_touchpad_button button to #noVNC_mobile_buttons div. - Add/modify css rules so margin applies to mobile buttons, not the surrounding div. --- app/images/touchpad.svg | 62 +++++++++++++++++++++++++++++++++++++++++ app/styles/base.css | 11 +++++++- vnc.html | 3 ++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 app/images/touchpad.svg diff --git a/app/images/touchpad.svg b/app/images/touchpad.svg new file mode 100644 index 00000000..0bdd7a1f --- /dev/null +++ b/app/images/touchpad.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + diff --git a/app/styles/base.css b/app/styles/base.css index f83ad4b9..7a74ff7d 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -345,7 +345,10 @@ html { padding: 0 10px; } -#noVNC_control_bar > .noVNC_scroll > * { +/* Do not apply margin to #noVNC_mobilebuttons div. There is now + more than one button inside it, so we'll apply margins directly + to the buttons in another rule. */ +#noVNC_control_bar > .noVNC_scroll > *:not(#noVNC_mobile_buttons) { display: block; margin: 10px auto; } @@ -553,6 +556,12 @@ html { :root:not(.noVNC_connected) #noVNC_mobile_buttons { display: none; } + +#noVNC_mobile_buttons > .noVNC_button { + display: block; + margin: 10px auto; +} + @media not all and (any-pointer: coarse) { /* FIXME: The button for the virtual keyboard is the only button in this group of "mobile buttons". It is bad to assume that no touch diff --git a/vnc.html b/vnc.html index 24a118db..6ac6e63b 100644 --- a/vnc.html +++ b/vnc.html @@ -79,6 +79,9 @@
+ +