Browse Source

JuceDemo: make Tables in WidgetDemo look nicer by adding zebra striping

tags/2021-05-28
Timur Doumler 11 years ago
parent
commit
f04e0f0462
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      examples/Demo/Source/Demos/WidgetsDemo.cpp

+ 4
- 1
examples/Demo/Source/Demos/WidgetsDemo.cpp View File

@@ -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


Loading…
Cancel
Save