linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.47k stars 732 forks source link

Menu continues to grow wide #2917

Closed derekdickerson closed 9 years ago

derekdickerson commented 10 years ago

I have noticed that the menu continues to grow wide is there any way to fix this?

http://imgur.com/Z7FUdLZ

thank you!

corbin-auriti commented 10 years ago

Looks like some items in your menu have long names, I experience this as well, I will see what I can do to fix it.

derekdickerson commented 10 years ago

Thank you so much I actually shortened the names and description thinking it was that and it actually got wider

http://imgur.com/kNhmyMk

ghost commented 10 years ago

Simple force to have a max-width on the style of applicationBox to be consider the max value that do not look bad.

Change this:

    _onApplicationButtonRealized: function(actor) {
        if (actor.get_width() > this._applicationsBoxWidth){
            this._applicationsBoxWidth = actor.get_width();
            this.applicationsBox.set_width(this._applicationsBoxWidth + 42); // The answer to life...
        }
    },

by this one

   _onApplicationButtonRealized: function(actor) {
        if ((actor.get_width() > this._applicationsBoxWidth)&&(actor.get_width() < MAX_APP_BOX_WIDTH)) {
            this._applicationsBoxWidth = actor.get_width();
            this.applicationsBox.set_width(this._applicationsBoxWidth + 42); // The answer to life...
        }
    },

Define MAX_APP_BOX_WIDTH relative to the the screen resolution, because can look different on differents resolutions...

@derekdickerson test this https://github.com/lestcape/Configurable-Menu/archive/master.zip, maybe this will be resolve your problem just for now...while it's found the best solution to the problem of the official cinnamon menu.

derekdickerson commented 10 years ago

@lestcape I saw Configurable menu I will try it and see how well it does. Can I change that code that you suggested if so what file? Thank you!

ghost commented 10 years ago

The code not work... The code it's only some incomplete idea... I only suggest where the change are needed and what can be done, but this example not work. The value of MAX_APP_BOX_WIDTH need to be numeric not a variable. I'm sure that the problem that you have can be fixed with this change, but i don't sure that this change have the best solution, and i not sure that this change can not affected another menu options, or cause another problems... If you don't have a problem with a windows menu you also can download this applet: http://cinnamon-spices.linuxmint.com/applets/view/168

ghost commented 10 years ago

I resolve the problem on the first applet that i send you, because allow to the user to set the value of maximun width of the application in the settings, on other words you can control the value of MAX_APP_BOX_WIDTH on settings, but i also was changed more things on this menu like you can see...

ghost commented 10 years ago

I think, that this was resolved on this commit of @clefebvre :

https://github.com/linuxmint/Cinnamon/commit/7387d0edd8cb8a4d4012de178c612659848f68d0

anandrkris commented 9 years ago

@derekdickerson > Could you please check if this issue still occurs in latest Cinnamon 2.2? Please close if this is fixed.

mtwebster commented 9 years ago

I think I may have accidentally fixed the original problem in this issue here: https://github.com/linuxmint/Cinnamon/commit/7a3d98c7146dd37bdc321ffeb2d8fdc2e2c34d3f

ghost commented 9 years ago

@mtwebster I don't know if the cause of the menu size growing when you change the theme will also be the recently buttons... But, there are some user that detected this problem... So could close the issues also if this are solved... like that https://github.com/linuxmint/Cinnamon/issues/3229

derekdickerson commented 9 years ago

This isn't resolved its based off application description I can make the entire menu without ever installing a theme stay the entire width of the screen. I was able to make it go long with editing LibreOffice Impress's description.

ghost commented 9 years ago

@derekdickerson yes you have rigth, this is not the solution for this problem... but could help in the another issues that i commented. You test this https://github.com/linuxmint/Cinnamon/commit/7387d0edd8cb8a4d4012de178c612659848f68d0 pull? This pull make a limit to the size of app description... You can change the max value in this line:

const MAX_BUTTON_WIDTH = "max-width: 20em;";

And then save and restar cinnamon... This change not resolve the problem?

mtwebster commented 9 years ago

I'm saying this is fixed in current development version, not stable.

ghost commented 9 years ago

@mtwebster the problem that he see it's not related with recently files, is relate with the description of the application. With your change, cinnamon menu now works similar to Configurable Menu(without realize event)... But you can not be able to determine and cut in the size of user want, because all user want a different size...

Edit: is related with the description of the application is related with the size of the name of applications (some name are really long)

mtwebster commented 9 years ago

I can make the description as long as I want, and the menu does not grow.. I didn't fix that particular problem, someone did it a while back. What I did fix is the menu gradually growing over time due to reloads, apps installed, etc..

mtwebster commented 9 years ago

Could be it's not really 'fixed' I suppose, I'll look and see what is controlling that to make sure it's relatively intelligent, but I don't want to go overboard fixing widths and limiting stuff like this, you have to expect a certain amount of sanity from desktop files.

ghost commented 9 years ago

@mtwebster I agree with you... But the true is that if you cut a name, some user will say why the name is cut? and if not, then they want to say, why the menu it's to long.... And the middle case that some names are cut, they can say why the name are cut and also the size of menu it's really big... There are not an standard size for application names, so not feel bad for this, have not solution.

ghost commented 9 years ago

@derekdickerson, @clefebvre introduced a MAX_BUTTON_WIDTH that could be adjusted to the the size that user want... The only problem will be that need to be edit directly in the applet file... I personally tested this, and it's working... So, i don't see that this issue need to be reopend... In all case a feature request to change this value in the menu settings...

ghost commented 9 years ago

@mtwebster: "What I did fix is the menu gradually growing over time due to reloads, apps installed, etc" I know, this is why you can close this: https://github.com/linuxmint/Cinnamon/issues/3229

See where this was detected: https://plus.google.com/104912934147790631255/posts/W7dbRoLcGiG https://plus.google.com/104912934147790631255/posts/j6H7ZomGkya

See recently for other users: http://forums.linuxmint.com/viewtopic.php?f=208&t=179419

derekdickerson commented 9 years ago

http://i.imgur.com/egGrb9G.png

echozio commented 8 years ago

https://d.maxfile.ro/icgfuinspw.png get on my level probably because i avoid restarting my computer or logging out at all costs