From f04e0f04625de1270eb4785ad4532eb9595cbfa9 Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Mon, 20 Apr 2015 16:45:21 +0100 Subject: [PATCH] JuceDemo: make Tables in WidgetDemo look nicer by adding zebra striping --- examples/Demo/Source/Demos/WidgetsDemo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/Demo/Source/Demos/WidgetsDemo.cpp b/examples/Demo/Source/Demos/WidgetsDemo.cpp index d8b89dacc0..f3f4210b7b 100644 --- a/examples/Demo/Source/Demos/WidgetsDemo.cpp +++ b/examples/Demo/Source/Demos/WidgetsDemo.cpp @@ -741,10 +741,13 @@ public: } // This is overloaded from TableListBoxModel, and should fill in the background of the whole row - void paintRowBackground (Graphics& g, int /*rowNumber*/, int /*width*/, int /*height*/, bool rowIsSelected) override + void paintRowBackground (Graphics& g, int rowNumber, int /*width*/, int /*height*/, bool rowIsSelected) override { if (rowIsSelected) g.fillAll (Colours::lightblue); + + else if (rowNumber % 2) + g.fillAll (Colour (0xffeeeeee)); } // This is overloaded from TableListBoxModel, and must paint any cells that aren't using custom