Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#5646 closed enhancement (wontfix)

Allow button width to be specified

Reported by: Ryan J Ollos Owned by: Catalin BALAN
Priority: normal Component: MenusPlugin
Severity: normal Keywords:
Cc: Trac Release: 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:

Example from my Trac installation

See also ticket #5613 for the NavAddPlugin.

Attachments (1)

MainNav.png (7.3 KB) - added by Ryan J Ollos 15 years ago.
Example from my Trac installation

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by Ryan J Ollos

Attachment: MainNav.png added

Example from my Trac installation

comment:1 Changed 15 years ago by Ryan J Ollos

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

comment:2 Changed 15 years ago by Catalin BALAN

Status: newassigned

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.

Btw, MenusPlugin allows adding new items. Why do you need NavAddPlugin ?

Thank you, Catalin Balan

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

Resolution: wontfix
Status: assignedclosed

Replying to cbalan:

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,

Btw, MenusPlugin allows adding new items. Why do you need NavAddPlugin ?

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 Changed 15 years ago by Catalin BALAN

Hey rjollos,

MenusPlugin allows meta menu customization as well.

...
[menu-custom]
# this is the default value
managed_menus = mainnav,metanav
...
[metanav]
my_option = enabled
my_option.href = /
my_option.label = My Option
...

Thank you, Catalin Balan

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

Replying to cbalan:

MenusPlugin allows meta menu customization as well.

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 15 years ago by Ryan J Ollos

Replying to cbalan:

Btw, MenusPlugin allows adding new items. Why do you need NavAddPlugin ?

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 15 years ago by Ryan J Ollos

Replying to cbalan:

MenusPlugin allows meta menu customization as well.

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
Set your email in Preferences
Action
as closed The owner will remain Catalin BALAN.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.