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

List:       kde-devel
Subject:    Re: okteta text color
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2008-07-10 17:58:21
Message-ID: g55ijv$q45$1 () ger ! gmane ! org
[Download RAW message or body]

Friedrich W. H. Kossebau wrote:
> Am Mittwoch, 30. April 2008, um 03:46 Uhr, schrieb Matthew Woehlke:
>> Maybe I need to try to make this more explicit in the documentation?
> 
> No, I don't think so, at least I got the intentions, well done. Plus, for 
> consistency I would even make a name semantics matching usage a requirement, 
> where it is possible. Because if I set NegativeText to red I want to also see 
> red for all texts with negative meanings, not green or yellow.

Oh, of course :-). Use of PositiveText for errors should be considered a 
bug (unless there is some legitimate reason for it). When a role clearly 
matches the use case, that's the role that should be used; I was mainly 
discussing what to do when the role names don't apply directly to use.

On that note, Link is certainly good to associate with bookmarks, 
navigation, etc., and I also favor Visited for "history". I should 
probably add those notes if they aren't there already. /me making note 
to do that.

> But what might help me and others would be some example code snippets in the 
> apidox how the class is intended to be used. To find out how to use it was 
> what needed me the most time

Sounds reasonable. Feel free to bug me if I haven't gotten to it in, 
say, a week or so :-).

> Thanks for the proposal. I for now went with this:
> 
> static inline KColorScheme::ForegroundRole foregroundRoleForChar( const 
> KHECore::KChar byteChar )
> {
>   return byteChar.isUndefined() ? KColorScheme::NegativeText :
>          byteChar.isPunct() ?     KColorScheme::InactiveText :
>          byteChar.isPrint() ?     KColorScheme::NormalText :
>          /*others, like <32*/     KColorScheme::ActiveText;
> }
> 
> And to highlight bookmarks I use
> colorScheme.background(KColorScheme::LinkBackground)
> 
> Any suggestions for improvements? :)

Not offhand, that looks good to me :-).

-- 
Matthew
FOSS: Giving people the cage and it's blueprints, gratis. The "L" matters.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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