isl-org / isl-org/Open3D

How to adjust background height for widgets

Open
#6,594 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### My Question

Please see the attachment:
![image](https://github.com/isl-org/Open3D/assets/8307900/5a5b43ff-2f07-41b0-9a41-62614dcbe1f9)

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++:
```c++
open3d::visualization::visualizer::O3DVisualizer* window;
//... start the window
for(int h = 35; h >=20; h--)
{
auto bt = std::make_shared(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);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.