Open3D
Open3D copied to clipboard
How to adjust background height for widgets
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
mainbranch).
My Question
Please see the attachment:
Numbers within the button is the height designated to that button. Despite proper resizing of numbers and button borders, the background doesn't seems to follow the setting below 32 pixels. I've been tracing the code for a while, nothing came through. Anyone has any ideas or have any pointers to where I should be looking at? Thanks
Sample code in c++:
open3d::visualization::visualizer::O3DVisualizer* window;
//... start the window
for(int h = 35; h >=20; h--)
{
auto bt = std::make_shared<o3d_gui::Button>(std::to_string(h).c_str());
bt->SetFrame({10+(50-h)*35, 120, 30, h}); // x y w h
bt->SetBackgroundColor({0.4f, 0.1f, 0.0f, 1.0f}); // dark red so it's more visible
window->AddChild(bt);
}