Skip to content

Center menu on monitor if applet in center zone of horizontal panel#13604

Open
fredcw wants to merge 1 commit intolinuxmint:masterfrom
fredcw:centermenu
Open

Center menu on monitor if applet in center zone of horizontal panel#13604
fredcw wants to merge 1 commit intolinuxmint:masterfrom
fredcw:centermenu

Conversation

@fredcw
Copy link
Contributor

@fredcw fredcw commented Feb 26, 2026

@anaximeno
Copy link
Contributor

anaximeno commented Feb 26, 2026

Shouldn't it be centered over the applet in general, then, instead of the monitor? (seems to already be the behavior, probably better setting this as a settings option then imo)

@fredcw
Copy link
Contributor Author

fredcw commented Feb 26, 2026

Normally it's centered over the applet, yes. But with Cinnamenu, a few people requested that it be centered on the monitor when the applet is in the center zone of the panel and it's been this way in Cinnamenu for 4 years and nobody's complained yet so I don't think it needs to be an option. This also matches the windows 11 menu behaviour.

@anaximeno
Copy link
Contributor

anaximeno commented Feb 27, 2026

I see, sounds like a potential UX improvement for that case. I see it as being useful for users who rely on opening the menu mostly using the keyboard shortcut in cases when the menu is in the center area, since, unlike when you use the cursor, you don't have complete spatial awareness for the menu applet button (to figure were the menu will appear), but on the other side it can be a bit weird for those using the mouse cursor, I imagine. However, I don't have a strong position on this (I mean it being a settings option or just the default behavior in that); so I'm ok with whatever the Mint team arbitrates on that :-)

Just one last point here, you might want to update this.orientation in the on_orientation_changed method as well, to handle when the menu is moved from a horizontal panel to a vertical one.

I also found this issue (that was there before) while testing the point above. Also, add this.menu.setOrientation(orientation) in the on_orientation_changed as well, so the menu recognizes that in that case (otherwise it'll appear displaced on the screen when you move the panel from horizontal to vertical).

on_orientation_changed (orientation) {
    this.orientation = orientation;
    this.menu.setOrientation(orientation);
    this._updateIconAndLabel();
    this._size_dirty = true;
}
@JosephMcc
Copy link
Contributor

I don't really get why the menu should behave different from any other applet. Changing it to this makes no sense at all to me.

How Cinnamenu behave has not bearing on this. It's a 3rd party spice. If someone didn't like the behavior, they would simply disable it. People treat the built in applets much differently.

@fredcw
Copy link
Contributor Author

fredcw commented Feb 27, 2026

@anaximeno Nice catch, thanks. PR updated.

@fredcw
Copy link
Contributor Author

fredcw commented Feb 27, 2026

@JosephMcc

I don't really get why the menu should behave different from any other applet.

I think because it's a big applet (usually the biggest) and well, it's main menu. Small applets you'd expect to be centered on the applet but it just doesn't look as tidy if you have the big main menu slightly off center IMO. It also seems to be a relatively popular request: https://github.com/orgs/linuxmint/discussions/555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants