Commit 80090365 authored by claes's avatar claes

Option ZeroIfHeaderIs0 added

parent dd0240c3
...@@ -558,6 +558,13 @@ void GrowTable::draw( GlowTransform *t, int highlight, int hot, void *node, void ...@@ -558,6 +558,13 @@ void GrowTable::draw( GlowTransform *t, int highlight, int hot, void *node, void
if ( strcmp( cell_value + j * column_size[0], "") == 0) if ( strcmp( cell_value + j * column_size[0], "") == 0)
continue; continue;
} }
if ( options & glow_mTableOptions_ZeroIfHeaderIs0) {
// Don't draw the row if the value in the first column is zero
char *s;
for ( s = cell_value + j * column_size[0]; *s && *s == ' '; s++) ;
if ( strcmp( s, "0") == 0)
continue;
}
if ( y > ll_y) { if ( y > ll_y) {
offs = column_offs + column_size[i] * j; offs = column_offs + column_size[i] * j;
......
...@@ -14,7 +14,8 @@ class GrowScrollBar; ...@@ -14,7 +14,8 @@ class GrowScrollBar;
typedef enum { typedef enum {
glow_mTableOptions_No = 0, glow_mTableOptions_No = 0,
glow_mTableOptions_ZeroIfHeader = 1 << 0 glow_mTableOptions_ZeroIfHeader = 1 << 0,
glow_mTableOptions_ZeroIfHeaderIs0 = 1 << 1
} glow_mTableOptions; } glow_mTableOptions;
//! Class for drawing a bar object. //! Class for drawing a bar object.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment