~tkluck/ubuntu/precise/gnome-shell/lp883443

« back to all changes in this revision

Viewing changes to tests/interactive/scroll-view-sizing.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Martin Pitt
  • Date: 2011-09-22 08:50:45 UTC
  • mfrom: (1.1.31 upstream)
  • Revision ID: package-import@ubuntu.com-20110922085045-o8abj9mx33iljb42
Tags: 3.1.92-0ubuntu1
[ Jeremy Bicha ]
* New upstream release.
  - Adds browser plugin for installing, enabling, disabling, and
    uninstalling shell extensions. (Note that extensions.gnome.org
    isn't yet in operation.)
  - Lots of bugfixes
* debian/control.in:
  - Depend on caribou libraries
  - Recommend gnome-session-fallback, needed when graphics support
    test fails (LP: #852950)
  - Bump minimum gjs dependency to 1.29.18 and minimum mutter 
    to 3.1.92
* debian/patches/01_favorite_apps.patch: Updated
* debian/patches/04_build-without-caribou.patch: Dropped

[ Martin Pitt ]
* debian/control.in: Add libjson-glib-dev build dependency as per
  configure.ac.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
spacer = new St.Bin();
326
326
fadeBox.add(spacer, { expand: true });
327
327
 
 
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);
 
331
 
 
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);
 
335
 
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);
331
339
 
 
340
function togglePadding(button) {
 
341
    switch(button.label) {
 
342
    case 'No':
 
343
        button.label = 'Yes';
 
344
        break;
 
345
    case 'Yes':
 
346
        button.label = 'No';
 
347
        break;
 
348
    }
 
349
    if (scrollView.style == null)
 
350
        scrollView.style = (button.label == 'Yes' ? 'padding: 10px;' : 'padding: 0;');
 
351
    else
 
352
        scrollView.style += (button.label == 'Yes' ? 'padding: 10px;' : 'padding: 0;');
 
353
}
 
354
 
 
355
paddingButton.connect('clicked', function() { togglePadding(paddingButton); });
 
356
 
 
357
function toggleBorders(button) {
 
358
    switch(button.label) {
 
359
    case 'No':
 
360
        button.label = 'Yes';
 
361
        break;
 
362
    case 'Yes':
 
363
        button.label = 'No';
 
364
        break;
 
365
    }
 
366
    if (scrollView.style == null)
 
367
        scrollView.style = (button.label == 'Yes' ? 'border: 2px solid red;' : 'border: 0;');
 
368
    else
 
369
        scrollView.style += (button.label == 'Yes' ? 'border: 2px solid red;' : 'border: 0;');
 
370
}
 
371
 
 
372
borderButton.connect('clicked', function() { toggleBorders(borderButton); });
 
373
 
332
374
function toggleFade(button) {
333
375
    switch(button.label) {
334
376
    case 'No':