Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot style directory selector, cross-platform bug #1928

Closed
luisarandas opened this issue Oct 26, 2022 · 0 comments
Closed

Cannot style directory selector, cross-platform bug #1928

luisarandas opened this issue Oct 26, 2022 · 0 comments
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@luisarandas
Copy link

Hello.

I am trying to customise the color of the directory selector, which is a widget as I understand. It doesn't work in any distribution (Ubuntu 22.04, Windows 10 and MacOS 12.2). I attach an example here for the sake of simplicity.

If there is any workaround, even if silly, I would appreciate.

dearpygui version 1.7.3
operating system: MacOS Monterey v.12.2 (for reproducibility)

Expected behavior

file dialog bar not blue but black

Screenshots/Video

Screenshot 2022-10-26 at 18 55 00

Standalone, minimal, complete and verifiable example

import dearpygui.dearpygui as dpg

dpg.create_context()

def callback(sender, app_data):
    print('OK was clicked.')
    print("Sender: ", sender)
    print("App Data: ", app_data)

def cancel_callback(sender, app_data):
    print('Cancel was clicked.')
    print("Sender: ", sender)
    print("App Data: ", app_data)

dpg.add_file_dialog(
    directory_selector=True, show=False, callback=callback, tag="file_dialog_id",
    cancel_callback=cancel_callback)

with dpg.window(label="Tutorial", width=800, height=300):
    dpg.add_button(label="Directory Selector", callback=lambda: dpg.show_item("file_dialog_id"))

with dpg.theme() as global_theme:

    with dpg.theme_component(dpg.mvAll):

        dpg.add_theme_color(dpg.mvThemeCol_FrameBgActive, (0, 0, 0,  200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_TabActive, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_TitleBgActive, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_TitleBg, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_HeaderActive, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)

    with dpg.theme_component(dpg.mvFileDialog):
        dpg.add_theme_color(dpg.mvThemeCol_TitleBg, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_HeaderActive, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)
        dpg.add_theme_color(dpg.mvThemeCol_TitleBgActive, (0, 0, 0, 200), category=dpg.mvThemeCat_Core)

dpg.bind_theme(global_theme)

dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@luisarandas luisarandas added state: pending not addressed yet type: bug bug labels Oct 26, 2022
@hoffstadt hoffstadt added state: ready Fixed/Added and will be present in an upcoming release and removed state: pending not addressed yet labels Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

2 participants