Show More
@@ -1403,7 +1403,7 b' h6:hover .anchor-link {' | |||
|
1403 | 1403 | .widget-text { |
|
1404 | 1404 | /* String Textbox - used for TextBoxView and TextAreaView */ |
|
1405 | 1405 | width: 350px; |
|
1406 |
margin: 0px |
|
|
1406 | margin: 0px; | |
|
1407 | 1407 | } |
|
1408 | 1408 | .widget-listbox { |
|
1409 | 1409 | /* Listbox */ |
@@ -1413,7 +1413,7 b' h6:hover .anchor-link {' | |||
|
1413 | 1413 | .widget-numeric-text { |
|
1414 | 1414 | /* Single Line Textbox - used for IntTextView and FloatTextView */ |
|
1415 | 1415 | width: 150px; |
|
1416 |
margin: 0px |
|
|
1416 | margin: 0px; | |
|
1417 | 1417 | } |
|
1418 | 1418 | .widget-progress { |
|
1419 | 1419 | /* Progress Bar */ |
@@ -1451,10 +1451,6 b' h6:hover .anchor-link {' | |||
|
1451 | 1451 | display: flex; |
|
1452 | 1452 | flex-direction: row; |
|
1453 | 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 | 1455 | .widget-hbox input[type="checkbox"] { |
|
1460 | 1456 | margin-top: 9px; |
@@ -9266,7 +9266,7 b' h6:hover .anchor-link {' | |||
|
9266 | 9266 | .widget-text { |
|
9267 | 9267 | /* String Textbox - used for TextBoxView and TextAreaView */ |
|
9268 | 9268 | width: 350px; |
|
9269 |
margin: 0px |
|
|
9269 | margin: 0px; | |
|
9270 | 9270 | } |
|
9271 | 9271 | .widget-listbox { |
|
9272 | 9272 | /* Listbox */ |
@@ -9276,7 +9276,7 b' h6:hover .anchor-link {' | |||
|
9276 | 9276 | .widget-numeric-text { |
|
9277 | 9277 | /* Single Line Textbox - used for IntTextView and FloatTextView */ |
|
9278 | 9278 | width: 150px; |
|
9279 |
margin: 0px |
|
|
9279 | margin: 0px; | |
|
9280 | 9280 | } |
|
9281 | 9281 | .widget-progress { |
|
9282 | 9282 | /* Progress Bar */ |
@@ -9314,10 +9314,6 b' h6:hover .anchor-link {' | |||
|
9314 | 9314 | display: flex; |
|
9315 | 9315 | flex-direction: row; |
|
9316 | 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 | 9318 | .widget-hbox input[type="checkbox"] { |
|
9323 | 9319 | margin-top: 9px; |
@@ -30,7 +30,11 b' define([' | |||
|
30 | 30 | /** |
|
31 | 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 | 40 | handle_click: function() { |
@@ -57,6 +57,8 b' define([' | |||
|
57 | 57 | this.$slider_container.css(name, value); |
|
58 | 58 | } else if (name == 'width' || name == 'height' || name == 'background') { |
|
59 | 59 | this.$slider_container.css(name, value); |
|
60 | } else if (name == 'padding' || name == 'margin') { | |
|
61 | this.$el.css(name, value); | |
|
60 | 62 | } else { |
|
61 | 63 | this.$slider.css(name, value); |
|
62 | 64 | } |
@@ -333,7 +335,11 b' define([' | |||
|
333 | 335 | /** |
|
334 | 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 | 345 | events: { |
@@ -468,6 +474,8 b' define([' | |||
|
468 | 474 | this.$progress.css(name, value); |
|
469 | 475 | } else if (name == 'color') { |
|
470 | 476 | this.$bar.css('background', value); |
|
477 | } else if (name == 'padding' || name == 'margin') { | |
|
478 | this.$el.css(name, value); | |
|
471 | 479 | } else { |
|
472 | 480 | this.$bar.css(name, value); |
|
473 | 481 | } |
@@ -135,6 +135,8 b' define([' | |||
|
135 | 135 | } else if (name == 'height') { |
|
136 | 136 | this.$droplabel.css(name, value); |
|
137 | 137 | this.$dropbutton.css(name, value); |
|
138 | } else if (name == 'padding' || name == 'margin') { | |
|
139 | this.$el.css(name, value); | |
|
138 | 140 | } else { |
|
139 | 141 | this.$droplist.css(name, value); |
|
140 | 142 | this.$droplabel.css(name, value); |
@@ -241,7 +243,11 b' define([' | |||
|
241 | 243 | /** |
|
242 | 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 | 253 | handle_click: function (e) { |
@@ -356,8 +362,12 b' define([' | |||
|
356 | 362 | /** |
|
357 | 363 | * Set a css attr of the widget view. |
|
358 | 364 | */ |
|
359 | this._css_state[name] = value; | |
|
360 | this.update_style_traits(); | |
|
365 | if (name == 'padding' || name == 'margin') { | |
|
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 | 373 | update_style_traits: function(button) { |
@@ -478,7 +488,11 b' define([' | |||
|
478 | 488 | /** |
|
479 | 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 | 498 | handle_click: function (e) { |
@@ -184,7 +184,11 b' define([' | |||
|
184 | 184 | /** |
|
185 | 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 | 194 | remove_child_view: function(view) { |
@@ -125,7 +125,11 b' define([' | |||
|
125 | 125 | /** |
|
126 | 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 | 135 | events: { |
@@ -208,7 +212,11 b' define([' | |||
|
208 | 212 | /** |
|
209 | 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 | 222 | events: { |
@@ -145,8 +145,8 b'' | |||
|
145 | 145 | |
|
146 | 146 | .widget-text { |
|
147 | 147 | /* String Textbox - used for TextBoxView and TextAreaView */ |
|
148 |
width |
|
|
149 |
margin : 0px |
|
|
148 | width : 350px; | |
|
149 | margin : 0px; | |
|
150 | 150 | } |
|
151 | 151 | |
|
152 | 152 | .widget-listbox { |
@@ -158,7 +158,7 b'' | |||
|
158 | 158 | .widget-numeric-text { |
|
159 | 159 | /* Single Line Textbox - used for IntTextView and FloatTextView */ |
|
160 | 160 | width : 150px; |
|
161 |
margin : 0px |
|
|
161 | margin : 0px; | |
|
162 | 162 | } |
|
163 | 163 | |
|
164 | 164 | .widget-progress { |
@@ -188,10 +188,6 b'' | |||
|
188 | 188 | .widget-hbox { |
|
189 | 189 | /* Horizontal widgets */ |
|
190 | 190 | .hbox(); |
|
191 | margin-top: 0px !important; | |
|
192 | margin-bottom: 0px !important; | |
|
193 | margin-right: 5px; | |
|
194 | margin-left: 5px; | |
|
195 | 191 | |
|
196 | 192 | input[type="checkbox"] { |
|
197 | 193 | margin-top: 9px; |
@@ -434,7 +434,8 b' class DOMWidget(Widget):' | |||
|
434 | 434 | |
|
435 | 435 | width = CUnicode(sync=True) |
|
436 | 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 | 439 | margin = CUnicode(sync=True) |
|
439 | 440 | |
|
440 | 441 | color = Unicode(sync=True) |
General Comments 0
You need to be logged in to leave comments.
Login now