Update: Re: Printing of Shortcuts

Andreas Pakulat apaku at gmx.de
Wed Mar 26 23:37:35 GMT 2008


On 23.03.08 23:56:10, Daniel Laidig wrote:
> Hi,
> 
> I played a bit with the code and implemented a few changes that IMHO improve 
> the output. However, this is probably a matter of taste, so I'll just throw 
> my modified patch in and see what other people think. :)

Thanks for that, quite a few nice changes in there.

> - Some items in the last column contain "<br/>" for page breaks which are now
>   replaced with \n.

I've added an insertHtml() instead which also takes care of any other
html-stuff that might be in whatsthis (bold fonts, italic, lists...)

> > Also if somebody has a hint how to remove the Component table header
> > without shrinking that particular column it would be nice. The reason
> > for that is that IMHO its a bit unneeded to have that there as the
> > component is always on an own line in the table with the full row merged
> > and the first column is always empty in all other table rows.
> 
> - IMHO this column isn't needed at all. As it groups the shortcuts into
>   different parts the Component is more like a heading and not a column.
>   This also results in more vertical space.
>
> Problems:
> - If you have bad luck, there will be a page break right after the heading. I
>   didn't find an easy solution for that, there is a PageBreakPolicy, but it
>   only allows to enforce a page break and not to prevent one.

I'd call that simply bad luck and I don't see a way to fix that, unless
we implement the page-breaking ourselves (i.e. completely copy
QTextDocument's print() function and adjust it as needed). 

> One other thing I noticed (but didn't change in the patch) is that the print 
> button looks a bit misplaced after the search line. Maybe placing it at the 
> bottom after "Defaults" and adding a printer icon will be better.

I've now moved it below the shortcut widget. Adding it besides the
default/ok/cancel buttons is IMHO not an option as that part belongs to
the dialog and thus printing wouldn't be available when just the editor
is used (think about the shortcut kcm).

> What do you think?

As you can see I've integrated your whole patch and also did the
following:

> P.S.: One other idea I just had how to get more space for the long description 
> is to merge "Main Shortcut", "Alternate Shortcut" and "Global Shortcut" into 
> one column. Most of the time not all of them are used, so this could save a 
> lot of whitespace:

Now the description has quite a lot of room. I'm going to commit this
until friday unless I hear strong objections.

Nice to have features (which I'm not sure I can do before may due to
more important things):

- adjust the general page borders, IMHO they're too wide

- add a custom printer options page that allows to filter out all
  actions that don't have a shortcut set to reduce this list. IMHO this
  should be optional as people might want to simply print all and  when
  they find a new action that they assign a shortcut they can simply use
  a pen to fill out the empty space

- find a way to align the Main/Alternate/Global entries in the shortcuts
  column without adding borders. I first did this without a nested table
  but instead simply added 3 rows and merged the 3 cells in the Action
  name and description column, but unfortunately I didn't find a way to
  remove the borders between the 6 shortcut cells.

Again the patch is attached. I've put the pdf online here (to avoid the
moderation problem):
http://www.apaku.de/vardata/kdeui_shortcuts_print_example.pdf

Andreas

-- 
You will be held hostage by a radical group.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_shortcut_print.diff
Type: text/x-diff
Size: 8218 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080327/c42a2a2c/attachment.diff>


More information about the kde-core-devel mailing list