Browse Source

Make brand list case sensitive.

tags/v1.1.0
Andrew Belt 5 years ago
parent
commit
c09191565d
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/app/ModuleBrowser.cpp

+ 7
- 2
src/app/ModuleBrowser.cpp View File

@@ -340,27 +340,31 @@ struct BrowserSidebar : widget::Widget {
ui::ScrollWidget *tagScroll; ui::ScrollWidget *tagScroll;


BrowserSidebar() { BrowserSidebar() {
// Search
searchField = new BrowserSearchField; searchField = new BrowserSearchField;
addChild(searchField); addChild(searchField);


// Clear filters
clearButton = new ClearButton; clearButton = new ClearButton;
clearButton->text = "Reset filters"; clearButton->text = "Reset filters";
addChild(clearButton); addChild(clearButton);


// Bbrand label
brandLabel = new ui::Label; brandLabel = new ui::Label;
// brandLabel->fontSize = 16; // brandLabel->fontSize = 16;
brandLabel->color = nvgRGB(0x80, 0x80, 0x80); brandLabel->color = nvgRGB(0x80, 0x80, 0x80);
brandLabel->text = "Brands"; brandLabel->text = "Brands";
addChild(brandLabel); addChild(brandLabel);


// Plugin list
// Brand list
brandScroll = new ui::ScrollWidget; brandScroll = new ui::ScrollWidget;
addChild(brandScroll); addChild(brandScroll);


brandList = new ui::List; brandList = new ui::List;
brandScroll->container->addChild(brandList); brandScroll->container->addChild(brandList);


std::set<std::string, string::CaseInsensitiveCompare> brands;
// Collect brands from all plugins
std::set<std::string> brands;
for (plugin::Plugin *plugin : plugin::plugins) { for (plugin::Plugin *plugin : plugin::plugins) {
brands.insert(plugin->brand); brands.insert(plugin->brand);
} }
@@ -371,6 +375,7 @@ struct BrowserSidebar : widget::Widget {
brandList->addChild(item); brandList->addChild(item);
} }


// Tag label
tagLabel = new ui::Label; tagLabel = new ui::Label;
// tagLabel->fontSize = 16; // tagLabel->fontSize = 16;
tagLabel->color = nvgRGB(0x80, 0x80, 0x80); tagLabel->color = nvgRGB(0x80, 0x80, 0x80);


Loading…
Cancel
Save