Browse Source

remove debug

pull/2/head
Odilitime 5 years ago
parent
commit
0855daad68
  1. 10
      src/graphics/components/TabbedComponent.cpp

10
src/graphics/components/TabbedComponent.cpp

@ -355,11 +355,11 @@ void TabbedComponent::selectTab(std::shared_ptr<Tab> tab) { @@ -355,11 +355,11 @@ void TabbedComponent::selectTab(std::shared_ptr<Tab> tab) {
// we're not going to do a full set up uiContorl, we'll expect those to be set up and just adjust them
// but then, we can't just call this to place things where we want in the cstr... hrm..
void TabbedComponent::layoutTab(std::vector<std::shared_ptr<Tab>>::iterator tab) {
std::cout << "TabbedComponent::layoutTab - id: " << tab->get()->id << std::endl;
//std::cout << "TabbedComponent::layoutTab - id: " << tab->get()->id << std::endl;
// find text
TextComponent *textComponent = tab->get()->titleBox.get();
if (!textComponent) {
std::cout << "TabbedComponent::loadDomIntoTab - titleBox isn't a TextComponent" << std::endl;
std::cout << "TabbedComponent::layoutTab - titleBox isn't a TextComponent" << std::endl;
return;
}
@ -369,13 +369,13 @@ void TabbedComponent::layoutTab(std::vector<std::shared_ptr<Tab>>::iterator tab) @@ -369,13 +369,13 @@ void TabbedComponent::layoutTab(std::vector<std::shared_ptr<Tab>>::iterator tab)
//Tab *prev = it->get();
Tab *prev = tab->get()->previousTab.get();
if (prev == nullptr) {
std::cout << "relaying out first tab, no prev" << std::endl;
//std::cout << "TabbedComponent::layoutTab - relaying out first tab, no prev" << std::endl;
//prev = nullptr;
tab->get()->x = x + 32; // our start + 32px for new tab button
} else {
tab->get()->x = prev->x + static_cast<int>(prev->w);
}
std::cout << "placing tab at " << tab->get()->x << std::endl;
//std::cout << "TabbedComponent::layoutTab - placing tab at " << tab->get()->x << std::endl;
// get text size for it's current string
// we don't always need to adjust textWidth, only on text change
@ -417,7 +417,7 @@ void TabbedComponent::layoutTab(std::vector<std::shared_ptr<Tab>>::iterator tab) @@ -417,7 +417,7 @@ void TabbedComponent::layoutTab(std::vector<std::shared_ptr<Tab>>::iterator tab)
// maybe take in a starting tab? as tabs to left aren't affected
void TabbedComponent::layoutTabs(std::vector<std::shared_ptr<Tab>>::iterator startTab, int xAdj) {
std::cout << "TabbedComponent::layoutTabs - startId: " << startTab->get()->id << " xadj: " << xAdj << std::endl;
//std::cout << "TabbedComponent::layoutTabs - startId: " << startTab->get()->id << " xadj: " << xAdj << std::endl;
// luckily only one component at a time changes, we'll need to know how much x shifted
for(std::vector<std::shared_ptr<Tab>>::iterator it = startTab; it!=this->tabs.end(); ++it) {
//it->get()->x += xAdj; // adjust position

Loading…
Cancel
Save