Skip to content

ProgressBar widget is not scrolling within ScrollableVert #6174

@cansik

Description

@cansik

Checklist

Describe the issue

The ProgressBar widget is not scrolling inside a ScrollableVert. The y-subtraction is not implemented for this widget.

Steps to reproduce the bug

#include "open3d/Open3D.h"

using namespace open3d;
using namespace open3d::visualization;

class BasicGUI {
public:
    explicit BasicGUI() { gui::Application::GetInstance().Initialize(); }

    void Run() {
        auto window = std::make_shared<gui::Window>("Basic GUI", 200, 200);

        auto scrollableVert = std::make_shared<gui::ScrollableVert>(10);

        // add progress bar
        auto progressBar = std::make_shared<gui::ProgressBar>();
        progressBar->SetValue(0.5f);
        scrollableVert->AddChild(progressBar);

        for (auto i = 0; i < 20; i++) {
            auto label = std::make_shared<gui::Label>("Hello World");
            scrollableVert->AddChild(label);
        }

        window->AddChild(scrollableVert);

        gui::Application::GetInstance().AddWindow(window);
        gui::Application::GetInstance().Run();
    }
};

int main(int argc, char *argv[]) {
    auto gui = BasicGUI();
    gui.Run();
    return 0;
}

Error message

No error messsage.

Expected behavior

The ProgressBar scrolls with the other components.

Open3D, Python and System information

- Operating system: macOS 10.15 / Windows 10 64-bit
- Open3D version: 0.17.0
- System architecture: x86 / apple-silicon
- How did you install Open3D?: pip / build from source
- Compiler version (if built from source): clang 14.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot a build issue, this is likely a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions