Skip to content
Permalink
Browse files

qtermwidget: fix misleading indention warnings

  • Loading branch information
jef-n committed Dec 6, 2016
1 parent b0126d0 commit 2ad08765ad644047f26ecfe4f048c4ddb3152009
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/plugins/grass/qtermwidget/CharacterColor.h
@@ -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);

0 comments on commit 2ad0876

Please sign in to comment.
You can’t perform that action at this time.