From 335b7680c9b52f7c5ad308f5acad907066f49883 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Feb 2015 03:11:16 -0800 Subject: [PATCH] Tooltip code, widescreen layout, hide auto-expands Slightly better layout for wide screens. --- Marlin/configurator/config/Configuration.h | 4 ++++ Marlin/configurator/css/configurator.css | 13 +++++++++++-- Marlin/configurator/js/configurator.js | 13 +++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 2b97772da9..76d20326b4 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/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 diff --git a/Marlin/configurator/css/configurator.css b/Marlin/configurator/css/configurator.css index 8b8f8c9994..fc54e8e01a 100644 --- a/Marlin/configurator/css/configurator.css +++ b/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%; } + +} diff --git a/Marlin/configurator/js/configurator.js b/Marlin/configurator/js/configurator.js index 169b41f99f..a662664366 100644 --- a/Marlin/configurator/js/configurator.js +++ b/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