Closed P3rcy-8685 closed 1 year ago
Basically, when in the below code, I click on the colors title bar while my drop down is closed, it opens the menu without changing the icon. This leads to the icons getting flipped (i.e. closed icon corresponding to an open menu, and vice versa)
from fury import ui, window, actor import numpy as np from fury.data import fetch_viz_icons fetch_viz_icons() colors = { "Violet": (0.6, 0, 0.8), "Indigo": (0.3, 0, 0.5), "Blue": (0, 0, 1), "Green": (0, 1, 0), "Yellow": (1, 1, 0), "Orange": (1, 0.5, 0), "Red": (1, 0, 0) } tab_ui = ui.TabUI(position=(49, 94), size=(300, 300), nb_tabs=1 , draggable=True) color_combobox = ui.ComboBox2D(items=list(colors.keys()), placeholder="Choose Text Color", size=(250, 150), draggable=True) tab_ui.add_element(0, color_combobox, (0.1, 0.3)) label = ui.TextBlock2D( position=(600, 300), font_size=40, color=(1, 0.5, 0), justification="center", vertical_justification="top", text="FURY rocks!!!") def change_color(combobox): label.color = colors[combobox.selected_text] tab_ui.tabs[0].title = "Colors" color_combobox.on_change = change_color sm = window.ShowManager(size=(800, 500), title="Viz Tab") sm.scene.add(tab_ui,label) interactive = True if interactive: sm.start()
{'fury_version': '0.8.0.post1454+g3771685a', 'pkg_path': '/home/percy/fury/fury', 'commit_hash': '3771685aa1f84f71ef9568b4731295dfaf707de4', 'sys_version': '3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]', 'sys_executable': '/usr/bin/python3', 'sys_platform': 'linux', 'numpy_version': '1.24.1', 'scipy_version': '1.10.0', 'vtk_version': '9.2.5', 'matplotlib_version': '3.6.3'}
I'll take up this issue, if it's fine...
duplicate of #562
PR open to check: https://github.com/fury-gl/fury/pull/576
Description
Basically, when in the below code, I click on the colors title bar while my drop down is closed, it opens the menu without changing the icon. This leads to the icons getting flipped (i.e. closed icon corresponding to an open menu, and vice versa)
Way to reproduce
{'fury_version': '0.8.0.post1454+g3771685a', 'pkg_path': '/home/percy/fury/fury', 'commit_hash': '3771685aa1f84f71ef9568b4731295dfaf707de4', 'sys_version': '3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]', 'sys_executable': '/usr/bin/python3', 'sys_platform': 'linux', 'numpy_version': '1.24.1', 'scipy_version': '1.10.0', 'vtk_version': '9.2.5', 'matplotlib_version': '3.6.3'}