jothepro / doxygen-awesome-css

Custom CSS theme for doxygen html-documentation with lots of customization parameters.
https://jothepro.github.io/doxygen-awesome-css/
MIT License
1.04k stars 118 forks source link

Possible to always show the foldout triangle in side bar? #24

Closed justin-pierce closed 3 years ago

justin-pierce commented 3 years ago

Unlike the default Doxygen theme, Awesome only shows the foldout triangles if you hover over that particular element. Is there a quick way to change that behavior to always show?

Thanks,

r0ckarong commented 3 years ago

This is one of the first things I wanted to fix with my theme.

You need to create an override for the opacity of the ".arrow" class (which is the triangle).

Like this:

#nav-tree .arrow {
  opacity: 1;
}

Normally this is set to 0 when you're not hovering over it. If you force the entire class to be opaque all the time that gets solved.

I did this in a second CSS file that contains all my extra styles that deviate from the base theme from here. I think you can just change/add this in the doxygen-awesome.css file but this isn't update proof.

I would suggest creating a my-style.css (or whatever name) and just adding this to the line in the doxyfile. This will load your extra configurations after the doxygen base CSS and after the "awesome" CSS.

@jothepro I think this actually should be a theme option mentioned in the readme, "do you want to have the navtree icons shown permanently or not". (I personally have no idea why you would hide them tbh).

jothepro commented 3 years ago

This is definitely one of the more controversial design decisions I made. I decided to hide them by default to give the navigation a cleaner look similar to vuepress, which was my design inspiration. I agree that it makes sense to make this a parameter so you don't have to override the CSS style manually. 👍

jpgarza93 commented 3 years ago

I also added some CSS to change the nav arrows. I liked being able to see the arrows at all times, but I didn't want them to grab a lot of attention. Therefore, I made them smaller and kept a small opacity value:

/--- NAV TREE ---/

.arrow:hover { opacity: 1 !important; }

.arrow { opacity: 0.25 !important; color: inherit; cursor: pointer; font-size: 45%; vertical-align: middle; margin-right: 3.5px; }

See my documentation here: https://rapidcode.roboticsys.com/

justin-pierce commented 3 years ago

Thanks for all the responses! Worked like a charm!

jothepro commented 3 years ago

FYI: I have added the new variables --side-nav-arrow-opacity & --side-nav-arrow-hover-opacity that make the arrow opacity in the sidebar configurable and I adopted the beautiful arrow style by @jpgarza93 in this commit: https://github.com/jothepro/doxygen-awesome-css/commit/20d9586642ff3aba0b7814f26c8f2012fbfc4373

Pls let me know if that helps you to reduce your manual overrides. This will be included in a new release in the next days. :)