Opened 8 years ago

Closed 8 years ago

Allow button width to be specified

Reported by: Owned by: Ryan J Ollos Catalin BALAN normal MenusPlugin normal 0.11

Description

It would be nice to have the option to specify the maximum, minimum, exact, and/or preferred width of a button created using the NavAddPlugin. It appears that the current behavior is that the width is determined by the width of the label.

Here is an example from my Trac installation where I would like to control the width of the buttons:

Changed 8 years ago by Ryan J Ollos

Example from my Trac installation

comment:1 Changed 8 years ago by Ryan J Ollos

Summary: Option to specify min, max, exact, and/or preferred width → Allow button width to be specified

comment:2 follow-ups:  3  6 Changed 8 years ago by Catalin BALAN

Status: new → assigned

Hey rjolls,

In your screen shoot I'm seeing that you are using a custom trac theme. If this is so, why don't u just customize your theme.html template to add css classes to your menu items, and then style them in your css file ?

I don't think that label size should be an ini option because this is strictly related to current trac theme. ini options should work with any theme.

Thank you, Catalin Balan

comment:3 in reply to:  2 Changed 8 years ago by Ryan J Ollos

Resolution: → wontfix assigned → closed

In your screen shoot I'm seeing that you are using a custom trac theme. If this is so, why don't u just customize your theme.html template to add css classes to your menu items, and then style them in your css file ?

That sounds like a good option. I will give that a try,

You are right, the NavAddPlugin is not necessary. Sometime after installing the MenuPlugin I realized this and changed my configuration to use only the MenuPlugin for items on the main navigation bar. I still use the NavAddPlugin to add items to the meta navigation bar.

comment:4 follow-ups:  5  7 Changed 8 years ago by Catalin BALAN

Hey rjollos,

...
# this is the default value
...
[metanav]
my_option = enabled
my_option.href = /
my_option.label = My Option
...


Thank you, Catalin Balan

comment:5 in reply to:  4 Changed 8 years ago by Ryan J Ollos

Thanks for the tip. I hadn't looked at it in some time, but maybe I'll do some reconfiguring to get rid of the NavAdd plugin. Since your plugin already working with 0.12, that is a big plus.

I don't recall if I ever asked this question regarding the MenusPlugin ... Would it be readily possible to have an option that forces a link to open in a new tab? I have a few MenusPlugin entries that point to external resources.

Thanks,

• Ryan

comment:6 in reply to:  2 Changed 8 years ago by Ryan J Ollos

It would be interesting if the TracTabPlugin functionality could be merged into the MenusPlugin. They work together, but the configuration is not as clean as it could be.

comment:7 in reply to:  4 Changed 8 years ago by Ryan J Ollos

I think the reason I missed this is because there is no discussion of the [metanav] configuration on the wiki page. However, it seems that the [metanav] configuration is the same as the [mainnav] configuration, so I made a minor change to the wiki page to make this clear with this change. Please correct me if I am incorrect about this.

Modify Ticket

Change Properties