325
325
spacer = new St.Bin();
326
326
fadeBox.add(spacer, { expand: true });
328
fadeBox.add(new St.Label({ text: 'Padding: '}));
329
let paddingButton = new St.Button({ label: 'No', style: 'text-decoration: underline; color: #4444ff;padding-right:3px;' });
330
fadeBox.add(paddingButton);
332
fadeBox.add(new St.Label({ text: 'Borders: '}));
333
let borderButton = new St.Button({ label: 'No', style: 'text-decoration: underline; color: #4444ff;padding-right:3px;' });
334
fadeBox.add(borderButton);
328
336
fadeBox.add(new St.Label({ text: 'Vertical Fade: '}));
329
337
let vfade = new St.Button({ label: 'No', style: 'text-decoration: underline; color: #4444ff;' });
330
338
fadeBox.add(vfade);
340
function togglePadding(button) {
341
switch(button.label) {
343
button.label = 'Yes';
349
if (scrollView.style == null)
350
scrollView.style = (button.label == 'Yes' ? 'padding: 10px;' : 'padding: 0;');
352
scrollView.style += (button.label == 'Yes' ? 'padding: 10px;' : 'padding: 0;');
355
paddingButton.connect('clicked', function() { togglePadding(paddingButton); });
357
function toggleBorders(button) {
358
switch(button.label) {
360
button.label = 'Yes';
366
if (scrollView.style == null)
367
scrollView.style = (button.label == 'Yes' ? 'border: 2px solid red;' : 'border: 0;');
369
scrollView.style += (button.label == 'Yes' ? 'border: 2px solid red;' : 'border: 0;');
372
borderButton.connect('clicked', function() { toggleBorders(borderButton); });
332
374
function toggleFade(button) {
333
375
switch(button.label) {