Update: Re: Printing of Shortcuts

Andreas Hartmetz ahartmetz at gmail.com
Wed Mar 26 09:08:45 GMT 2008

Am Sonntag 23 März 2008 23:56:10 schrieb Daniel Laidig:
> 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?
I like it slightly better than the previous iteration.

> 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:
This is the one thing that could be improved a lot: there is too much 
whitespace. The last column should be wider but not so wide that the shortcut 
columns would then take several lines, again wasting vertical space if there 
is no description. Therefore the layout below seems to make the most sense.

> Action Name | Shortcuts                      | Description
> ____________|________________________________|_____________________________
>___ Paste       | Main Shortcut: Strg+V          | Paste previously copied
> or cut
>             | Alternate Shortcut: Shift+Ins  | clipboard contents.

More information about the kde-core-devel mailing list