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

List:       kwrite-devel
Subject:    Re: Review Request 118837: Marks: Use 'yellow' for warnings
From:       "Milian Wolff" <mail () milianw ! de>
Date:       2014-06-19 12:34:55
Message-ID: 20140619123455.5729.63270 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


Yep, I think it would be much better to use the color scheme directly, where \
possible. for the warning and error case, its simply to do so. I.e.:

QColor mark(int mark)
{
  if (mark == Warning) {
    return m_view.background(KColorScheme::NeutralBackground);
  } else if (mark == Error) {
    return m_view.background(KColorScheme::NegativeBackground);
  } else if (mark >= 0 && mark <= Execution {
    static const QColor colors[Execution + 1] = {
      Qt::blue,
      Qt::red,
      Qt::yellow,
      Qt::magenta,
      Qt::gray,
    };
    return adaptToScheme(colors[mark], BackgroundColor);
  }
  }
}

- Milian Wolff


On June 19, 2014, 12:05 p.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118837/
> -----------------------------------------------------------
> 
> (Updated June 19, 2014, 12:05 p.m.)
> 
> 
> Review request for Kate.
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> Marks: Use 'yellow' for warnings
> 
> Please see the screenshots, I'm trying to fix the default appearance for warnings \
> in Kate/KDevelop. This changes actually just changes the background of the mark. 
> Any reason why 'green' was being used here?
> 
> 
> Diffs
> -----
> 
> part/utils/katedefaultcolors.cpp 0a173e17e4b1ce266271159d4af2a9e648989339 
> 
> Diff: https://git.reviewboard.kde.org/r/118837/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> Warning background (before)
> https://git.reviewboard.kde.org/media/uploaded/files/2014/06/19/9d1aca40-9aec-4d8b-8e6d-d13752255fab__kdevelop-problems-colorissue1.png
>  Warning background (after)
> https://git.reviewboard.kde.org/media/uploaded/files/2014/06/19/59bed4c8-29f4-4cf8-ba44-5cfb669dfa2a__kdevelop-problems-colorissue-fixed.png
>  
> 
> Thanks,
> 
> Kevin Funk
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/118837/">https://git.reviewboard.kde.org/r/118837/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yep, I think it would be \
much better to use the color scheme directly, where possible. for the warning and \
error case, its simply to do so. I.e.:

QColor mark(int mark)
{
  if (mark == Warning) {
    return m_view.background(KColorScheme::NeutralBackground);
  } else if (mark == Error) {
    return m_view.background(KColorScheme::NegativeBackground);
  } else if (mark &gt;= 0 &amp;&amp; mark &lt;= Execution {
    static const QColor colors[Execution + 1] = {
      Qt::blue,
      Qt::red,
      Qt::yellow,
      Qt::magenta,
      Qt::gray,
    };
    return adaptToScheme(colors[mark], BackgroundColor);
  }
  }
}</pre>
 <br />









<p>- Milian Wolff</p>


<br />
<p>On June 19th, 2014, 12:05 p.m. UTC, Kevin Funk wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Kate.</div>
<div>By Kevin Funk.</div>


<p style="color: grey;"><i>Updated June 19, 2014, 12:05 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Marks: Use &#39;yellow&#39; for warnings

Please see the screenshots, I&#39;m trying to fix the default appearance for warnings \
in Kate/KDevelop. This changes actually just changes the background of the mark.

Any reason why &#39;green&#39; was being used here?</pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>part/utils/katedefaultcolors.cpp <span style="color: \
grey">(0a173e17e4b1ce266271159d4af2a9e648989339)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118837/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>

<ul>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/19/9d1aca40-9aec-4d8b-8e6d-d13752255fab__kdevelop-problems-colorissue1.png">Warning \
background (before)</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/19/59bed4c8-29f4-4cf8-ba44-5cfb669dfa2a__kdevelop-problems-colorissue-fixed.png">Warning \
background (after)</a></li>

</ul>





  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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