Commit Graph

9 Commits

Author SHA1 Message Date
Bartosz Taudul
63d074c5d8
Fix zone size calculation wrt text fitting.
Previously the zone size calculation hasn't took into account the possibility
of the zone going out of the screen. This is now fixed.
2022-08-15 19:38:40 +02:00
Bartosz Taudul
112406472a
Do not normalize non-ghost zone names.
These do not have unwanted decorations, but may include useful user
annotations (e.g. "Open file (/etc/passwd)"), which we would not want to
remove.
2022-08-15 17:03:45 +02:00
Bartosz Taudul
d27cb4a094
Normalize names in ghost zone tooltips. 2022-08-15 16:54:12 +02:00
Bartosz Taudul
8531ef6591
Extract ShortenZoneName() function to a separate file. 2022-08-15 16:34:37 +02:00
Bartosz Taudul
07a1383304
Expose zone name normalization as a separate setting. 2022-08-15 16:24:44 +02:00
Bartosz Taudul
47a2512957
Change namespace shortening to zone name shortening.
Namespace shortening was kinda ok for function names produced by MSVC, which
are generally clean looking. However, gcc/clang like to produce function names
which include template arguments, function parameters, return values, etc. In
such cases the old algorithm simply didn't work, because removal of everything
before the last :: could as well happen in midst of function parameters list.
The result was certainly not an usable function name.

With this new approach namespaces are no longer explicitly mentioned and this
functionality is simply called zone name shortening.

The user-selectable options were changed to make the shortening always
enabled, disabled, or to apply as needed. Note that the "as needed" approach
will be dynamic, trying to gradually remove more and more from the name, until
it fits in the requested area.

Current implementation is only the first step into making this work. In this
first step the function parameters are reduced to () and the template
arguments are reduced to <>. This alone greatly improves readability of the
zone names.

The option to reduce namespaces to one letter (i.e. std::tr1::hash would
become s:t:hash) will no longer be present, now or in the future.
2022-08-15 14:19:57 +02:00
Bartosz Taudul
d12fa11762
Change magic value enums to constexprs. 2022-08-14 18:16:30 +02:00
Bartosz Taudul
2331ee04d2
Cleanup TracyView includes. 2022-07-02 17:00:08 +02:00
Bartosz Taudul
e3b11821c3
Extract zone timeline rendering from View. 2022-07-02 15:36:36 +02:00