Comments (6)
Apply the theme after adding all the components to the folder. Individual components (folders, buttons, etc) do not store a reference to any applied themes like a gui does. This may change in the future but for now you'll have to apply the theme after constructing the folder.
from ofxdatgui.
Thanks for the reply :)
It still does not work after doing that. Here's my code and a screenshot of the rendered GUI.
ofxDatGui* gui = new ofxDatGui(ofxDatGuiAnchor::TOP_LEFT);
ofColor yellow = ofColor::fromHex(0xFFD00B);
ofxDatGuiFolder* f1 = gui->addFolder("DSP PARAMETERS", yellow);
f1->addSlider(" Slider", 0, 1);
f1->addButton(" Button");
f1->addBreak();
f1->expand();
ofColor green = ofColor::fromHex(0x1ED36F);
ofxDatGuiFolder* f2 = gui->addFolder("TEXT OUTPUT", green);
f2->addButton(" Copy");
f2->addButton(" Clear");
f2->expand();
gui->setTheme(new AppGuiTheme());
f1->onButtonEvent(this, &GUI::clickedButton);
f1->onSliderEvent(this, &GUI::changedSlider);
f2->onButtonEvent(this, &GUI::clickedButton);
f2->onSliderEvent(this, &GUI::changedSlider);
All of that is within the setup() method
from ofxdatgui.
Hi, I just copied and pasted your code into a new project, applied one of the stock themes and this is what I'm seeing.
ofxDatGui* gui = new ofxDatGui(ofxDatGuiAnchor::TOP_LEFT);
ofColor yellow = ofColor::fromHex(0xFFD00B);
ofxDatGuiFolder* f1 = gui->addFolder("DSP PARAMETERS", yellow);
f1->addSlider(" Slider", 0, 1);
f1->addButton(" Button");
f1->addBreak();
f1->expand();
ofColor green = ofColor::fromHex(0x1ED36F);
ofxDatGuiFolder* f2 = gui->addFolder("TEXT OUTPUT", green);
f2->addButton(" Copy");
f2->addButton(" Clear");
f2->expand();
gui->setTheme(new ofxDatGuiThemeCharcoal());
f1->onButtonEvent(this, &ofApp::clickedButton);
f1->onSliderEvent(this, &ofApp::changedSlider);
f2->onButtonEvent(this, &ofApp::clickedButton);
f2->onSliderEvent(this, &ofApp::changedSlider);
Are you using the latest on master?
from ofxdatgui.
Closing as I'm not able to reproduce the issue. Feel free to reopen if you can provide more information.
from ofxdatgui.
May I ask which theme you applied? I saw that all of them, except the default one hide the stripe, so the issue would not be visible. Also, note that I'm applying a custom theme.
Maybe this is a feature, not a bug. Let's see: When you are using the default theme, are the elements within a folder supposed to "inherit" the stripe color from the folder? If so, then this is a bug. If not, it's expected behavior.
To reproduce, create and apply a custom theme by inheriting and overriding some properties from the default theme (not the stripe color). The posted example is exactly what I'm describing.
from ofxdatgui.
Hi, sorry this is a bug. I didn't at first realize what you were describing but I see now what you mean. I just pushed up a patch that should resolve this. 64d7f79 Let me know if this resolves the issue.
from ofxdatgui.
Related Issues (20)
- how to freeze the plot graphs? HOT 1
- Gui resize and no Interactivity when moving app from external screen to retina display on macbook pro
- Button size HOT 1
- std namespace is assumed and causes compile error with latest release build: ofx 0.10.0 HOT 1
- scrollView move and remove clear entire scrollview HOT 1
- compile error with linux x oF0.10.0 HOT 2
- Disable interactivity of component HOT 1
- User Visual feedback for Matrix GUI without clicking onto it HOT 1
- ofVec2f support for slider HOT 3
- issue with OF 10 on Xcode 9.4 HOT 2
- No addScrollView for gui HOT 1
- Setout and interaction issues in OF_WINDOW mode on PC HOT 1
- EXC_BAD_ACCESS when adding anything to ofxDatGui
- ui displays incorrectly if ofSetRectMode(OF_RECT_MODE_CENTER) is set
- Pixelated GUI
- if (e.target == Exit) Not working
- ofxDatGuiDropdown on bottom HOT 1
- Linker error with onDropdownEvent - missing required architecture arm64
- Mouse event propagation with MousePressed and MouseReleased of event HOT 1
- ofxDatGuiTextInputField.h & ofxDatGuiTextInput.h HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ofxdatgui.