[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Better default step size for KoUnitSpinBox
From:       Thomas Zander <zander () kde ! org>
Date:       2008-03-13 18:16:52
Message-ID: 200803131916.55619.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 13. March 2008 17:25:05 Florian Merz wrote:
> Hi,
>
> the attached patch adds a method to KoUnit which returns a default step
> size for a unit
[]

> P.S: The patch is just a proof of concept. I know that the patch introduces 
> unwanted behavior in a few places, but I just wanted to know your thoughts
> on this.

I think the idea is good, thanks for looking into it;
some comments on the patch.
you type the long point version of each type in the switch, what about typing
   MM_TO_POINT(5);
and similar statements instead in that switch().  I think that makes it more 
readable.

You use 
    d->stepInPoints = KoUnit::defaultStep(unit);
I think that should be 
   setLineStepPt( KoUnit::defaultStep(unit) );

Can you try if that fixes the problems you stated you saw?


I'm personally not convinced the placement of the static on KoUnit is the best 
thing, there currently is no place where this is needed as well so we would 
be able to add the functionality without any external API (just some code in 
the KoUnitDoubleSpinBox.cpp).
What about doing that and only when someone actually requires this feature 
move the code to have a new public method on KoUnit?

Let me know what you think!
-- 
Thomas Zander

["signature.asc" (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic