Commit 35b29c98 authored by samhed's avatar samhed

* On low resolution devices the status text is now justified to the left

  button group instead of centered.
* On low resolution devices the padding towards the edges of the screen of
  the left and right button groups are now removed.
* Since the status_bar was merged into the control-bar the actual status_bar
  element became redundant and was therefor removed.
* Improved the style of the control-bar when there is an error or a warning.
* Implemented a fix so that vnc_auto.html works as intended with the improved
  screen real estate patch.
parent 6ca8a2c0
...@@ -51,7 +51,6 @@ html { ...@@ -51,7 +51,6 @@ html {
float:right; float:right;
} }
#noVNC_view_drag_button { #noVNC_view_drag_button {
display: none; display: none;
} }
...@@ -64,7 +63,6 @@ html { ...@@ -64,7 +63,6 @@ html {
.noVNC-buttons-left { .noVNC-buttons-left {
float: left; float: left;
padding-left:10px;
z-index: 1; z-index: 1;
position: relative; position: relative;
} }
...@@ -72,30 +70,19 @@ html { ...@@ -72,30 +70,19 @@ html {
.noVNC-buttons-right { .noVNC-buttons-right {
float:right; float:right;
right: 0px; right: 0px;
padding-right:10px; z-index: 2;
z-index: 1;
position: relative;
}
#noVNC_status_bar {
margin-top: 0px;
padding: 0px;
z-index: 0;
position: absolute; position: absolute;
width: 100%;
} }
#noVNC_status_bar div { #noVNC_status {
font-size: 12px; font-size: 12px;
padding-top: 4px; padding-top: 4px;
}
#noVNC_status {
height:32px; height:32px;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
} }
#noVNC_settings_menu { #noVNC_settings_menu {
margin: 3px; margin: 3px;
text-align: left; text-align: left;
...@@ -110,16 +97,6 @@ html { ...@@ -110,16 +97,6 @@ html {
float:right; float:right;
} }
.noVNC_status_normal {
background: transparent;
}
.noVNC_status_error {
background: rgba(240,64,64,0.5);
}
.noVNC_status_warn {
background: rgba(240,240,64,0.5);
}
/* Do not set width/height for VNC_screen or VNC_canvas or incorrect /* Do not set width/height for VNC_screen or VNC_canvas or incorrect
* scaling will occur. Canvas resizes to remote VNC settings */ * scaling will occur. Canvas resizes to remote VNC settings */
#noVNC_screen_pad { #noVNC_screen_pad {
...@@ -238,9 +215,7 @@ html { ...@@ -238,9 +215,7 @@ html {
* Advanced Styling * Advanced Styling
*/ */
/* Control bar */ .noVNC_status_normal {
#noVNC-control-bar {
position:fixed;
background: #b2bdcd; /* Old browsers */ background: #b2bdcd; /* Old browsers */
background: -moz-linear-gradient(top, #b2bdcd 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */ background: -moz-linear-gradient(top, #b2bdcd 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b2bdcd), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b2bdcd), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
...@@ -248,7 +223,30 @@ html { ...@@ -248,7 +223,30 @@ html {
background: -o-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */ background: -o-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */ background: -ms-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */ background: linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
.noVNC_status_error {
background: #f04040; /* Old browsers */
background: -moz-linear-gradient(top, #f04040 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f04040), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
.noVNC_status_warn {
background: #f0f040; /* Old browsers */
background: -moz-linear-gradient(top, #f0f040 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f040), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
/* Control bar */
#noVNC-control-bar {
position:fixed;
display:block; display:block;
height:36px; height:36px;
left:0; left:0;
...@@ -391,10 +389,39 @@ html { ...@@ -391,10 +389,39 @@ html {
font-size: 180px; font-size: 180px;
} }
@media screen and (min-width: 481px) and (max-width: 640px) { .noVNC-buttons-left {
padding-left: 10px;
}
.noVNC-buttons-right {
padding-right: 10px;
}
#noVNC_status {
z-index: 0;
position: absolute;
width: 100%;
}
@media screen and (max-width: 640px){
.noVNC_status_button { .noVNC_status_button {
font-size: 10px; font-size: 10px;
} }
.noVNC-buttons-left {
padding-left: 0px;
}
.noVNC-buttons-right {
padding-right: 0px;
}
#noVNC_status {
z-index: 1;
position: relative;
width: auto;
float: left;
}
}
@media screen and (min-width: 481px) and (max-width: 640px) {
#noVNC_clipboard_text { #noVNC_clipboard_text {
width: 410px; width: 410px;
} }
...@@ -404,9 +431,6 @@ html { ...@@ -404,9 +431,6 @@ html {
} }
@media screen and (min-width: 321px) and (max-width: 480px) { @media screen and (min-width: 321px) and (max-width: 480px) {
.noVNC_status_button {
font-size: 10px;
}
#noVNC_clipboard_text { #noVNC_clipboard_text {
width: 250px; width: 250px;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
background-color:#000; background-color:#000;
} }
#noVNC-control-bar { .noVNC_status_normal {
background: #4c4c4c; /* Old browsers */ background: #4c4c4c; /* Old browsers */
background: -moz-linear-gradient(top, #4c4c4c 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */ background: -moz-linear-gradient(top, #4c4c4c 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
...@@ -18,6 +18,24 @@ ...@@ -18,6 +18,24 @@
background: -ms-linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */ background: -ms-linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */ background: linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
} }
.noVNC_status_error {
background: #f04040; /* Old browsers */
background: -moz-linear-gradient(top, #f04040 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f04040), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
}
.noVNC_status_warn {
background: #f0f040; /* Old browsers */
background: -moz-linear-gradient(top, #f0f040 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f040), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
}
.triangle-right { .triangle-right {
border:2px solid #fff; border:2px solid #fff;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt). * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/ */
#noVNC-control-bar { .noVNC_status_normal {
background-color:#04073d; background-color:#04073d;
background-image: -webkit-gradient( background-image: -webkit-gradient(
linear, linear,
...@@ -20,6 +20,36 @@ ...@@ -20,6 +20,36 @@
rgb(4,7,61) 50% rgb(4,7,61) 50%
); );
} }
.noVNC_status_error {
background-color:#f04040;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.54, rgb(240,64,64)),
color-stop(0.5, rgb(4,7,61))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(4,7,61) 54%,
rgb(249,64,64) 50%
);
}
.noVNC_status_warn {
background-color:#f0f040;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.54, rgb(240,240,64)),
color-stop(0.5, rgb(4,7,61))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(4,7,61) 54%,
rgb(240,240,64) 50%
);
}
.triangle-right { .triangle-right {
border:2px solid #fff; border:2px solid #fff;
......
...@@ -158,7 +158,7 @@ addMouseHandlers: function() { ...@@ -158,7 +158,7 @@ addMouseHandlers: function() {
$D("keyboardinput").onblur = UI.keyInputBlur; $D("keyboardinput").onblur = UI.keyInputBlur;
$D("sendCtrlAltDelButton").onclick = UI.sendCtrlAltDel; $D("sendCtrlAltDelButton").onclick = UI.sendCtrlAltDel;
$D("noVNC_status_bar").onclick = UI.togglePopupStatusPanel; $D("noVNC_status").onclick = UI.togglePopupStatusPanel;
$D("noVNC_popup_status_panel").onclick = UI.togglePopupStatusPanel; $D("noVNC_popup_status_panel").onclick = UI.togglePopupStatusPanel;
$D("clipboardButton").onclick = UI.toggleClipboardPanel; $D("clipboardButton").onclick = UI.toggleClipboardPanel;
$D("settingsButton").onclick = UI.toggleSettingsPanel; $D("settingsButton").onclick = UI.toggleSettingsPanel;
...@@ -470,8 +470,6 @@ setMouseButton: function(num) { ...@@ -470,8 +470,6 @@ setMouseButton: function(num) {
updateState: function(rfb, state, oldstate, msg) { updateState: function(rfb, state, oldstate, msg) {
var s, sb, c, d, cad, vd, klass; var s, sb, c, d, cad, vd, klass;
UI.rfb_state = state; UI.rfb_state = state;
s = $D('noVNC_status');
sb = $D('noVNC_status_bar');
switch (state) { switch (state) {
case 'failed': case 'failed':
case 'fatal': case 'fatal':
...@@ -501,9 +499,8 @@ updateState: function(rfb, state, oldstate, msg) { ...@@ -501,9 +499,8 @@ updateState: function(rfb, state, oldstate, msg) {
} }
if (typeof(msg) !== 'undefined') { if (typeof(msg) !== 'undefined') {
s.setAttribute("class", klass); $D('noVNC-control-bar').setAttribute("class", klass);
sb.setAttribute("class", klass); $D('noVNC_status').innerHTML = msg;
s.innerHTML = msg;
} }
UI.updateVisualState(); UI.updateVisualState();
......
...@@ -65,15 +65,12 @@ ...@@ -65,15 +65,12 @@
<input type="image" src="images/keyboard.png" <input type="image" src="images/keyboard.png"
id="showKeyboard" class="noVNC_status_button" id="showKeyboard" class="noVNC_status_button"
value="Keyboard" title="Show Keyboard"/> value="Keyboard" title="Show Keyboard"/>
<input type="email" <input type="email" autocapitalize="off" autocorrect="off"
autocapitalize="off" autocorrect="off" id="keyboardinput" class=""/>
id="keyboardinput" class="noVNC_status_button"/>
</div> </div>
</div> </div>
<div id="noVNC_status_bar" class="noVNC_status_bar"> <div id="noVNC_status">Loading</div>
<div id="noVNC_status">Loading</div>
</div>
<!--noVNC Buttons--> <!--noVNC Buttons-->
<div class="noVNC-buttons-right"> <div class="noVNC-buttons-right">
......
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
<div id="noVNC_screen"> <div id="noVNC_screen">
<div id="noVNC_status_bar" class="noVNC_status_bar" style="margin-top: 0px;"> <div id="noVNC_status_bar" class="noVNC_status_bar" style="margin-top: 0px;">
<table border=0 width="100%"><tr> <table border=0 width="100%"><tr>
<td><div id="noVNC_status">Loading</div></td> <td><div id="noVNC_status" style="position: relative; height: auto;">
Loading
</div></td>
<td width="1%"><div id="noVNC_buttons"> <td width="1%"><div id="noVNC_buttons">
<input type=button value="Send CtrlAltDel" <input type=button value="Send CtrlAltDel"
id="sendCtrlAltDelButton"> id="sendCtrlAltDelButton">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment