##// END OF EJS Templates
Merge pull request #7139 from jdfreder/widget-space-fix...
Min RK -
r19397:ec25dd92 merge
parent child Browse files
Show More
@@ -1403,7 +1403,7 b' h6:hover .anchor-link {'
1403 .widget-text {
1403 .widget-text {
1404 /* String Textbox - used for TextBoxView and TextAreaView */
1404 /* String Textbox - used for TextBoxView and TextAreaView */
1405 width: 350px;
1405 width: 350px;
1406 margin: 0px !important;
1406 margin: 0px;
1407 }
1407 }
1408 .widget-listbox {
1408 .widget-listbox {
1409 /* Listbox */
1409 /* Listbox */
@@ -1413,7 +1413,7 b' h6:hover .anchor-link {'
1413 .widget-numeric-text {
1413 .widget-numeric-text {
1414 /* Single Line Textbox - used for IntTextView and FloatTextView */
1414 /* Single Line Textbox - used for IntTextView and FloatTextView */
1415 width: 150px;
1415 width: 150px;
1416 margin: 0px !important;
1416 margin: 0px;
1417 }
1417 }
1418 .widget-progress {
1418 .widget-progress {
1419 /* Progress Bar */
1419 /* Progress Bar */
@@ -1451,10 +1451,6 b' h6:hover .anchor-link {'
1451 display: flex;
1451 display: flex;
1452 flex-direction: row;
1452 flex-direction: row;
1453 align-items: stretch;
1453 align-items: stretch;
1454 margin-top: 0px !important;
1455 margin-bottom: 0px !important;
1456 margin-right: 5px;
1457 margin-left: 5px;
1458 }
1454 }
1459 .widget-hbox input[type="checkbox"] {
1455 .widget-hbox input[type="checkbox"] {
1460 margin-top: 9px;
1456 margin-top: 9px;
@@ -9266,7 +9266,7 b' h6:hover .anchor-link {'
9266 .widget-text {
9266 .widget-text {
9267 /* String Textbox - used for TextBoxView and TextAreaView */
9267 /* String Textbox - used for TextBoxView and TextAreaView */
9268 width: 350px;
9268 width: 350px;
9269 margin: 0px !important;
9269 margin: 0px;
9270 }
9270 }
9271 .widget-listbox {
9271 .widget-listbox {
9272 /* Listbox */
9272 /* Listbox */
@@ -9276,7 +9276,7 b' h6:hover .anchor-link {'
9276 .widget-numeric-text {
9276 .widget-numeric-text {
9277 /* Single Line Textbox - used for IntTextView and FloatTextView */
9277 /* Single Line Textbox - used for IntTextView and FloatTextView */
9278 width: 150px;
9278 width: 150px;
9279 margin: 0px !important;
9279 margin: 0px;
9280 }
9280 }
9281 .widget-progress {
9281 .widget-progress {
9282 /* Progress Bar */
9282 /* Progress Bar */
@@ -9314,10 +9314,6 b' h6:hover .anchor-link {'
9314 display: flex;
9314 display: flex;
9315 flex-direction: row;
9315 flex-direction: row;
9316 align-items: stretch;
9316 align-items: stretch;
9317 margin-top: 0px !important;
9318 margin-bottom: 0px !important;
9319 margin-right: 5px;
9320 margin-left: 5px;
9321 }
9317 }
9322 .widget-hbox input[type="checkbox"] {
9318 .widget-hbox input[type="checkbox"] {
9323 margin-top: 9px;
9319 margin-top: 9px;
@@ -30,7 +30,11 b' define(['
30 /**
30 /**
31 * Set a css attr of the widget view.
31 * Set a css attr of the widget view.
32 */
32 */
33 this.$checkbox.css(name, value);
33 if (name == 'padding' || name == 'margin') {
34 this.$el.css(name, value);
35 } else {
36 this.$checkbox.css(name, value);
37 }
34 },
38 },
35
39
36 handle_click: function() {
40 handle_click: function() {
@@ -57,6 +57,8 b' define(['
57 this.$slider_container.css(name, value);
57 this.$slider_container.css(name, value);
58 } else if (name == 'width' || name == 'height' || name == 'background') {
58 } else if (name == 'width' || name == 'height' || name == 'background') {
59 this.$slider_container.css(name, value);
59 this.$slider_container.css(name, value);
60 } else if (name == 'padding' || name == 'margin') {
61 this.$el.css(name, value);
60 } else {
62 } else {
61 this.$slider.css(name, value);
63 this.$slider.css(name, value);
62 }
64 }
@@ -333,7 +335,11 b' define(['
333 /**
335 /**
334 * Set a css attr of the widget view.
336 * Set a css attr of the widget view.
335 */
337 */
336 this.$textbox.css(name, value);
338 if (name == 'padding' || name == 'margin') {
339 this.$el.css(name, value);
340 } else {
341 this.$textbox.css(name, value);
342 }
337 },
343 },
338
344
339 events: {
345 events: {
@@ -468,6 +474,8 b' define(['
468 this.$progress.css(name, value);
474 this.$progress.css(name, value);
469 } else if (name == 'color') {
475 } else if (name == 'color') {
470 this.$bar.css('background', value);
476 this.$bar.css('background', value);
477 } else if (name == 'padding' || name == 'margin') {
478 this.$el.css(name, value);
471 } else {
479 } else {
472 this.$bar.css(name, value);
480 this.$bar.css(name, value);
473 }
481 }
@@ -135,6 +135,8 b' define(['
135 } else if (name == 'height') {
135 } else if (name == 'height') {
136 this.$droplabel.css(name, value);
136 this.$droplabel.css(name, value);
137 this.$dropbutton.css(name, value);
137 this.$dropbutton.css(name, value);
138 } else if (name == 'padding' || name == 'margin') {
139 this.$el.css(name, value);
138 } else {
140 } else {
139 this.$droplist.css(name, value);
141 this.$droplist.css(name, value);
140 this.$droplabel.css(name, value);
142 this.$droplabel.css(name, value);
@@ -241,7 +243,11 b' define(['
241 /**
243 /**
242 * Set a css attr of the widget view.
244 * Set a css attr of the widget view.
243 */
245 */
244 this.$container.css(name, value);
246 if (name == 'padding' || name == 'margin') {
247 this.$el.css(name, value);
248 } else {
249 this.$container.css(name, value);
250 }
245 },
251 },
246
252
247 handle_click: function (e) {
253 handle_click: function (e) {
@@ -356,8 +362,12 b' define(['
356 /**
362 /**
357 * Set a css attr of the widget view.
363 * Set a css attr of the widget view.
358 */
364 */
359 this._css_state[name] = value;
365 if (name == 'padding' || name == 'margin') {
360 this.update_style_traits();
366 this.$el.css(name, value);
367 } else {
368 this._css_state[name] = value;
369 this.update_style_traits();
370 }
361 },
371 },
362
372
363 update_style_traits: function(button) {
373 update_style_traits: function(button) {
@@ -478,7 +488,11 b' define(['
478 /**
488 /**
479 * Set a css attr of the widget view.
489 * Set a css attr of the widget view.
480 */
490 */
481 this.$listbox.css(name, value);
491 if (name == 'padding' || name == 'margin') {
492 this.$el.css(name, value);
493 } else {
494 this.$listbox.css(name, value);
495 }
482 },
496 },
483
497
484 handle_click: function (e) {
498 handle_click: function (e) {
@@ -184,7 +184,11 b' define(['
184 /**
184 /**
185 * Set a css attr of the widget view.
185 * Set a css attr of the widget view.
186 */
186 */
187 this.$tabs.css(name, value);
187 if (name == 'padding' || name == 'margin') {
188 this.$el.css(name, value);
189 } else {
190 this.$tabs.css(name, value);
191 }
188 },
192 },
189
193
190 remove_child_view: function(view) {
194 remove_child_view: function(view) {
@@ -125,7 +125,11 b' define(['
125 /**
125 /**
126 * Set a css attr of the widget view.
126 * Set a css attr of the widget view.
127 */
127 */
128 this.$textbox.css(name, value);
128 if (name == 'padding' || name == 'margin') {
129 this.$el.css(name, value);
130 } else {
131 this.$textbox.css(name, value);
132 }
129 },
133 },
130
134
131 events: {
135 events: {
@@ -208,7 +212,11 b' define(['
208 /**
212 /**
209 * Set a css attr of the widget view.
213 * Set a css attr of the widget view.
210 */
214 */
211 this.$textbox.css(name, value);
215 if (name == 'padding' || name == 'margin') {
216 this.$el.css(name, value);
217 } else {
218 this.$textbox.css(name, value);
219 }
212 },
220 },
213
221
214 events: {
222 events: {
@@ -145,8 +145,8 b''
145
145
146 .widget-text {
146 .widget-text {
147 /* String Textbox - used for TextBoxView and TextAreaView */
147 /* String Textbox - used for TextBoxView and TextAreaView */
148 width : 350px;
148 width : 350px;
149 margin : 0px !important;
149 margin : 0px;
150 }
150 }
151
151
152 .widget-listbox {
152 .widget-listbox {
@@ -158,7 +158,7 b''
158 .widget-numeric-text {
158 .widget-numeric-text {
159 /* Single Line Textbox - used for IntTextView and FloatTextView */
159 /* Single Line Textbox - used for IntTextView and FloatTextView */
160 width : 150px;
160 width : 150px;
161 margin : 0px !important;
161 margin : 0px;
162 }
162 }
163
163
164 .widget-progress {
164 .widget-progress {
@@ -188,10 +188,6 b''
188 .widget-hbox {
188 .widget-hbox {
189 /* Horizontal widgets */
189 /* Horizontal widgets */
190 .hbox();
190 .hbox();
191 margin-top: 0px !important;
192 margin-bottom: 0px !important;
193 margin-right: 5px;
194 margin-left: 5px;
195
191
196 input[type="checkbox"] {
192 input[type="checkbox"] {
197 margin-top: 9px;
193 margin-top: 9px;
@@ -434,7 +434,8 b' class DOMWidget(Widget):'
434
434
435 width = CUnicode(sync=True)
435 width = CUnicode(sync=True)
436 height = CUnicode(sync=True)
436 height = CUnicode(sync=True)
437 padding = CUnicode(sync=True)
437 # A default padding of 2.5 px makes the widgets look nice when displayed inline.
438 padding = CUnicode("2.5px", sync=True)
438 margin = CUnicode(sync=True)
439 margin = CUnicode(sync=True)
439
440
440 color = Unicode(sync=True)
441 color = Unicode(sync=True)
General Comments 0
You need to be logged in to leave comments. Login now