Skip to content

Commit

Permalink
qtermwidget: fix misleading indention warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Dec 6, 2016
1 parent b0126d0 commit 2ad0876
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/plugins/grass/qtermwidget/CharacterColor.h
Expand Up @@ -256,13 +256,20 @@ inline bool operator != (const CharacterColor& a, const CharacterColor& b)
inline const QColor color256(quint8 u, const ColorEntry* base)
{
// 0.. 16: system colors
if (u < 8) return base[u+2 ].color; u -= 8;
if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8;
if (u < 8) return base[u+2 ].color;

u -= 8;

if (u < 8) return base[u+2+BASE_COLORS].color;

u -= 8;

// 16..231: 6x6x6 rgb color cube
if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); u -= 216;
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0);

u -= 216;

// 232..255: gray, leaving out black and white
int gray = u*10+8; return QColor(gray,gray,gray);
Expand Down

0 comments on commit 2ad0876

Please sign in to comment.