Browse Source

Tooltip code, widescreen layout, hide auto-expands

Slightly better layout for wide screens.
pull/1/head
Scott Lahteine 10 years ago
parent
commit
335b7680c9
  1. 4
      Marlin/configurator/config/Configuration.h
  2. 13
      Marlin/configurator/css/configurator.css
  3. 13
      Marlin/configurator/js/configurator.js

4
Marlin/configurator/config/Configuration.h

@ -655,6 +655,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
//#define RA_CONTROL_PANEL
// @section hidden
//automatic expansion
#if defined (MAKRPANEL)
#define DOGLCD
@ -778,6 +780,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif
#endif
// @section lcd
// default LCD contrast for dogm-like LCD displays
#ifdef DOGLCD
# ifndef DEFAULT_LCD_CONTRAST

13
Marlin/configurator/css/configurator.css

@ -25,7 +25,7 @@ body { margin: 0; padding: 0; background: #56A; color: #000; font-family: monosp
#main {
max-width: 1000px;
margin: 0 auto;
padding: 0 4%; width: 92%;
padding: 0 2%; width: 96%;
}
h1, h2, h3, h4, h5, h6 { clear: both; }
@ -83,7 +83,7 @@ fieldset {
label, input, select, textarea { display: block; float: left; margin: 1px 0; }
label.newline, textarea, fieldset { clear: both; }
label {
width: 140px; /* label area */
width: 120px; /* label area */
height: 1em;
padding: 10px 460px 10px 1em;
margin-right: -450px;
@ -292,3 +292,12 @@ a.download {
text-decoration: none;
}
@media all and (min-width: 1100px) {
#main { max-width: 10000px; }
fieldset { float: left; width: 50%; height: auto; }
#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
}

13
Marlin/configurator/js/configurator.js

@ -938,24 +938,21 @@ var configuratorApp = (function(){
// Success?
if (info.type) {
// Get the end-of-line comment, if there is one
var tooltip = '';
var tooltip = '', eoltip = '';
findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)');
if (info.line.search(findDef) >= 0)
tooltip = info.line.replace(findDef, '$1');
eoltip = tooltip = info.line.replace(findDef, '$1');
// Get all the comments immediately before the item
var r, s;
findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})([ \\t]*\n)?' + info.line.regEsc(), 'g');
findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g');
if (r = findDef.exec(txt)) {
// Get the text of the found comments
findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
while((s = findDef.exec(r[1])) !== null) {
var tip = s[1].replace(/[ \\t]*(={5,}|@section[ \\t]+\w+)[ \\t]*/g, '');
var tip = s[1].replace(/[ \\t]*(={5,}|(#define[ \\t]+.*|@section[ \\t]+\w+))[ \\t]*/g, '');
if (tip.length) {
if (tip.match(/^#define[ \\t]/) != null) {
tooltip = '';
break;
}
if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
// JSON data? Save as select options
if (!info.options && tip.match(/:[\[{]/) != null) {
// TODO

Loading…
Cancel
Save