nanogui icon indicating copy to clipboard operation
nanogui copied to clipboard

Regarding a custom theme I already have

Open ghost opened this issue 5 years ago • 3 comments

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 avatar Sep 24 '20 07:09 ghost

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,

ghost avatar Sep 24 '20 07:09 ghost

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 :(

svenevs avatar Sep 24 '20 17:09 svenevs

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

image

ghost avatar Sep 24 '20 20:09 ghost