Selaa lähdekoodia

Tooltip code, widescreen layout, hide auto-expands

Slightly better layout for wide screens.
Scott Lahteine 9 vuotta sitten
vanhempi
commit
335b7680c9

+ 4
- 0
Marlin/configurator/config/Configuration.h Näytä tiedosto

655
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
655
 // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
656
 //#define RA_CONTROL_PANEL
656
 //#define RA_CONTROL_PANEL
657
 
657
 
658
+// @section hidden
659
+
658
 //automatic expansion
660
 //automatic expansion
659
 #if defined (MAKRPANEL)
661
 #if defined (MAKRPANEL)
660
  #define DOGLCD
662
  #define DOGLCD
778
   #endif
780
   #endif
779
 #endif
781
 #endif
780
 
782
 
783
+// @section lcd
784
+
781
 // default LCD contrast for dogm-like LCD displays
785
 // default LCD contrast for dogm-like LCD displays
782
 #ifdef DOGLCD
786
 #ifdef DOGLCD
783
 # ifndef DEFAULT_LCD_CONTRAST
787
 # ifndef DEFAULT_LCD_CONTRAST

+ 11
- 2
Marlin/configurator/css/configurator.css Näytä tiedosto

25
 #main {
25
 #main {
26
 	max-width: 1000px;
26
 	max-width: 1000px;
27
 	margin: 0 auto;
27
 	margin: 0 auto;
28
- 	padding: 0 4%; width: 92%;
28
+ 	padding: 0 2%; width: 96%;
29
 	}
29
 	}
30
 
30
 
31
 h1, h2, h3, h4, h5, h6 { clear: both; }
31
 h1, h2, h3, h4, h5, h6 { clear: both; }
83
 label, input, select, textarea { display: block; float: left; margin: 1px 0; }
83
 label, input, select, textarea { display: block; float: left; margin: 1px 0; }
84
 label.newline, textarea, fieldset { clear: both; }
84
 label.newline, textarea, fieldset { clear: both; }
85
 label {
85
 label {
86
-	width: 140px; /* label area */
86
+	width: 120px; /* label area */
87
 	height: 1em;
87
 	height: 1em;
88
 	padding: 10px 460px 10px 1em;
88
 	padding: 10px 460px 10px 1em;
89
 	margin-right: -450px;
89
 	margin-right: -450px;
292
 	text-decoration: none;
292
 	text-decoration: none;
293
 	}
293
 	}
294
 
294
 
295
+@media all and (min-width: 1100px) {
296
+
297
+	#main { max-width: 10000px; }
298
+
299
+	fieldset { float: left; width: 50%; height: auto; }
300
+
301
+	#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
302
+
303
+}

+ 5
- 8
Marlin/configurator/js/configurator.js Näytä tiedosto

938
       // Success?
938
       // Success?
939
       if (info.type) {
939
       if (info.type) {
940
         // Get the end-of-line comment, if there is one
940
         // Get the end-of-line comment, if there is one
941
-        var tooltip = '';
941
+        var tooltip = '', eoltip = '';
942
         findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)');
942
         findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)');
943
         if (info.line.search(findDef) >= 0)
943
         if (info.line.search(findDef) >= 0)
944
-          tooltip = info.line.replace(findDef, '$1');
944
+          eoltip = tooltip = info.line.replace(findDef, '$1');
945
 
945
 
946
         // Get all the comments immediately before the item
946
         // Get all the comments immediately before the item
947
         var r, s;
947
         var r, s;
948
-        findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})([ \\t]*\n)?' + info.line.regEsc(), 'g');
948
+        findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g');
949
         if (r = findDef.exec(txt)) {
949
         if (r = findDef.exec(txt)) {
950
           // Get the text of the found comments
950
           // Get the text of the found comments
951
           findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
951
           findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
952
           while((s = findDef.exec(r[1])) !== null) {
952
           while((s = findDef.exec(r[1])) !== null) {
953
-            var tip = s[1].replace(/[ \\t]*(={5,}|@section[ \\t]+\w+)[ \\t]*/g, '');
953
+            var tip = s[1].replace(/[ \\t]*(={5,}|(#define[ \\t]+.*|@section[ \\t]+\w+))[ \\t]*/g, '');
954
             if (tip.length) {
954
             if (tip.length) {
955
-              if (tip.match(/^#define[ \\t]/) != null) {
956
-                tooltip = '';
957
-                break;
958
-              }
955
+              if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
959
               // JSON data? Save as select options
956
               // JSON data? Save as select options
960
               if (!info.options && tip.match(/:[\[{]/) != null) {
957
               if (!info.options && tip.match(/:[\[{]/) != null) {
961
                 // TODO
958
                 // TODO

Loading…
Peruuta
Tallenna