Update: Re: Printing of Shortcuts

Daniel Laidig d.laidig at gmx.de
Sun Mar 23 22:56:10 GMT 2008


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. :)

Changes in my patch:

- You calculate font sizes by adding absolute point values to the default
  point size. I don't know much about fonts, but this doesn't seem to be "the
  right approach". It would be better to scale the font size using a factor.

  To do this, the FontSizeAdjustment property exists, however it isn't
  documented properly. Fortunately Thomas Zander will look into this in a few
  days, but he thinks it should be ok to use. :)

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

On Thursday 20 March 2008 23:50:49 Andreas Pakulat wrote:
> - formatting, the table header is bold and larger than the text, same
>   goes for the component names

- I use the default size for the table header since I think bold is enough.

> - I'm using KGlobalSettings::generalFont() to get a base fontsize and
>   I'm not sure thats the right thing to do - any better ideas?

- I don't know if it's the right approach, but if it, why not use the font
  completely and not just the size? My patch just passes it to
  QTextDocument::setDefaultFont().

> - formatting, I'm not quite 100% satisfied (though I'd check this in as
>   is), would be nice if somebody with some more knowledge about good
>   text layout could give me some hints

- I don't count myself to that group, but I tried anyway. :)
  IMHO underlined headings don't look very professional and clean, so I used
  bold text with a larger fontsize, which I like better.

- Additionally I removed the colon at the end of the heading.

- Instead of the pseudo 3d border I tried to create a solid border.
  Unfortunately  Qt doesn't know anything like the CSS border-collapse, so
  inside the table there are two thin borders next to each other.

> 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.

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.

What do you think?

Daniel

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:

Action Name | Shortcuts                      | Description
____________|________________________________|________________________________
Paste       | Main Shortcut: Strg+V          | Paste previously copied or cut
            | Alternate Shortcut: Shift+Ins  | clipboard contents.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_shortcut_print_example.pdf
Type: application/pdf
Size: 55188 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080323/f625b122/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeui_shortcut_print.diff
Type: text/x-diff
Size: 7539 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080323/f625b122/attachment.diff>


More information about the kde-core-devel mailing list