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

Regarding a custom theme I already have #57

Open
ghost opened this issue Sep 24, 2020 · 3 comments
Open

Regarding a custom theme I already have #57

ghost opened this issue Sep 24, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 24, 2020

Dear team,
Up until now, I was using https://github.com/svenevs/nanogui-customization-demo and I had my own custom colors and fonts which I created with https://github.com/svenevs/nanogui-customization-demo/blob/master/python/custom_theme.py

Now, I cant seem to find where exactly do I make these changes in this repository. For instance changing these colors (from the repo I referenced) and the fonts used:

using nanogui::Color;
        mDropShadow                       = Color(0.0f, 0.0f, 0.0f, 0.501960813999176f);
        mTransparent                      = Color(0.0f, 0.0f, 0.0f, 0.0f);
        mBorderDark                       = Color(0.5084147453308105f, 0.5084147453308105f, 0.5084147453308105f, 1.0f);

Many thanks,

@ghost
Copy link
Author

ghost commented Sep 24, 2020

OO, so I need to uses bin2c? is that the correct way?
m_font_sans_regular_001 = nvgCreateFontMem(ctx, "sans001", (uint8_t *) spectralsc_regular_ttf, roboto_regular_ttf_size, 0);

Thanks,

@svenevs
Copy link
Collaborator

svenevs commented Sep 24, 2020

Hey sorry things are really hectic I missed the other issue. That repository was a prototype that had too many not well thought out changes required, I won't be able to do this for this fork anytime soon (part of it as you see deals with build system changes which aren't the right direction at this point).

AKA it only works with the fork I have as a submodule, off wjakob/nanogui. Will revisit theme customization at some point but it's not going to happen anytime soon.

For this repo, you can edit the member fields of the theme instance of your widget directly if you want to change colors or font size. Custom fonts, and misc bugs of certain widgets will need to wait. Sorry :(

@ghost
Copy link
Author

ghost commented Sep 24, 2020

OK thanks,
Meanwhile, I integrated your version with Libtorch. I really hope you are not going to make too many changes ... :)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant