Review Request 123279: Add color tab feature

Andreas Pakulat apaku at gmx.de
Mon Apr 6 23:57:24 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123279/#review78582
-----------------------------------------------------------


As a bystander what I'm missing from the review request are the bugreports asking for this - to get an idea of the usecases and a screenshot demonstrating the thing.

As far as the implementation goes: Why are the colors hardcoded? They need to blend with the color scheme of the user so hardcoding looks like a really bad idea.

Why 12, why not 5 or 7 or 20 as the 'maximum'?


sublime/container.cpp (line 497)
<https://git.reviewboard.kde.org/r/123279/#comment53759>

    What if my color scheme's text color isn't black? This should retrieve the existing tab text color and return that IMO.



sublime/container.cpp (line 499)
<https://git.reviewboard.kde.org/r/123279/#comment53762>

    Hm, isn't there a way to make the shell do the determination and then tell sublime ui via a (new?) public API that a certain tab should have certain text color?
    
    This 'through the back' lookup of project files based on directory hierarchy looks fishy and may not even work for cases where the project file is not placed in the top source folder - iirc the cmake manager supports such setups.



sublime/container.cpp (line 504)
<https://git.reviewboard.kde.org/r/123279/#comment53758>

    This is a bad idea, first of all entryList already allows you to filter so you can easily get a single-entry result by passing "*.kdev4". Second you're re-fetching the list of entries on each iteration just to get one out, thats going to hit the FS as many times as there are files in the directory in worst case. Not a good idea either.



sublime/container.cpp (line 508)
<https://git.reviewboard.kde.org/r/123279/#comment53761>

    hardcoded color here.



sublime/container.cpp (line 533)
<https://git.reviewboard.kde.org/r/123279/#comment53760>

    Another hardcoded 'black' color, should ask the color scheme or the tabbar for its default color.


- Andreas Pakulat


On April 6, 2015, 6:34 p.m., Sebastien Speierer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123279/
> -----------------------------------------------------------
> 
> (Updated April 6, 2015, 6:34 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This patch adds a checkbox in the KDevelop setting that allows KDevelop to color the tabs (of the open files) depending of their project.
> This feature was asked by several users on the KDE bugtracking system.
> 
> 
> Diffs
> -----
> 
>   shell/settings/uiconfig.kcfg b168294d6e82049d25864f5153f362d568acf36b 
>   shell/settings/uiconfig.ui a0d76de6d7094d402dc10d836257f42f0a72d07a 
>   sublime/container.h 9049f558a7af172411539508a3db9bd708db6ace 
>   sublime/container.cpp 4444077efe28570f04c09605226327112034854b 
>   sublime/mainwindow.cpp 32ef797eec0a6d54b868615fddfb9be5ec4574ce 
>   sublime/urldocument.h 4a02d898e9ebb3d11a0efd43142d22e2bdea1a9d 
> 
> Diff: https://git.reviewboard.kde.org/r/123279/diff/
> 
> 
> Testing
> -------
> 
> I tested the feature (open file before/after enable the coloring, tried to open files from several different projects,...), the implementation seems robust.
> 
> 
> Thanks,
> 
> Sebastien Speierer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150406/f65ef3b1/attachment.html>


More information about the KDevelop-devel mailing list