Flix01 / imgui

Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
https://github.com/Flix01/imgui/wiki/ImGui-Addons-Branch-Home
MIT License
395 stars 34 forks source link

Tab size #49

Closed tom-seddon closed 5 years ago

tom-seddon commented 5 years ago

What's the official tab width and indent size for the source code?

I'm looking at imguidock.cpp. After trying various settings, I've failed to make it look 100% right.

Tab=8 and indent=4 seems to be mostly right, but there's still a few dodgy bits.

Thanks,

--Tom

Flix01 commented 5 years ago

You're right...

Basically I use Qt Creator as my main editor.

The settings are set to Tab Size=8 and Indent Size=4, but, as you've just discovered, they are not consistent in every code file (expecially in imguidock.cpp, that is deeply based on Lumix Engine's code).

I know it's not very "professional". I'm not sure if there's some way in Qt Creator to auto-format all source files (I usually format specific code chunks manually using CTRL+I). [*]

In any case I accept pull-request in any format (if this is the reason of your post...).

[*] I'll check this link: https://doc.qt.io/qtcreator/creator-beautifier.html and see it if works for future commits.

Thank you.

Flix01 commented 5 years ago

After a bit of experiments using clang-format, I've decided not to use it.

The reason is that ideally I'd like auto-formatters to only fix tab and indent sizes, and not everything else. Please see also this link: https://stackoverflow.com/questions/33656800/clang-format-line-breaks

Closing this for now.