sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Align tool for skencil 0.7


From: Valentin Ungureanu
Subject: Align tool for skencil 0.7
Date: Thu, 21 Jul 2005 20:02:56 +0300
User-agent: Mutt/1.4.1i

Hi all,

After creating a patch for the align panel I'm having second thoughts on
the workflow of align operations, so if the following changes sounds OK
to you I'd like to implement them (i.e. create and submit patches
instead of keeping it as user script).

I think the commands are more intuitive with the align operations
implemented as a tool and with the reference being the coord_rect of the
last selected object(s).

This enables a workflow in which if you want to align some objects to
the left side of a specific object you select those objects, select the
reference object and press a key or click on a handle - some sort of
"align these to that".

If you want to align to the highermost object, just select it last or if
you want to align to the left side of selection click on the leftmost
object.

Basically you can align to any object in the selection only by clicking
on it and then clicking on the corresponding handle (or pressing a key).

This eliminates the need for the align options (selection, lowermost,
highermost) present in skencil 0.6.

FWIW, the GNOME HIG (and Apple's too) recommends providing direct
manipulation instead of dialogs, but even without that I think the align
tool has chances of being more useable than a dialog.

So, I created an align tool as a user script, it works (here, at least)
with the current cvs version of skencil 0.7 and python 2.3.

To install:
Copy aligntool.py to ~/.devsketch/
Add the line:

import aligntool

to ~/.devsketch/userhooks.py (create userhooks.py if it doesn't exists)

How to use it:
Create some objects and select them. Press 'a' to activate the Align
tool or right-click the canvas and choose Tools -> Align from the menu.

Click on the various handles to align the objects.
Click on any selected object to make it the active reference.
Click on the page border to make the page the active reference.

The tool works similarly to the Selection tool: shift-click to add
objects to the selection, control-click to remove them.

Once the tool is active, the following keyboard shortcuts become
available:
    t, b, l, r: align to top, bottom, left, right respectively
    v, h - align centers vertically / horizontally
    c - align to center
    space - switch to the selection tool


Valentin

Attachment: aligntool.py
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]