Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compact main menu #179

Open
tkashkin opened this issue Jul 11, 2023 · 5 comments
Open

Compact main menu #179

tkashkin opened this issue Jul 11, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@tkashkin
Copy link
Owner

Figure out if it's possible to make the main Steam menu more Adwaita-like. Ideally it should be a single icon button.

@tkashkin tkashkin added the enhancement New feature or request label Jul 11, 2023
@tkashkin
Copy link
Owner Author

@Foldex any ideas?

Maybe we can expand the original menu on :hover or :focus.
We'll probably have to also somehow patch Steam's JS code to do anything more complicated.

It should be possible to do with CSS if there's a way to edit the menu to only have one submenu like the VGUI menu had.

@Foldex
Copy link
Contributor

Foldex commented Jul 11, 2023

I had played with it before, but there's some gotchas involved due to how headerbar menus are implemented. The popover menus spawned by clicking a nav/root menu are actually their own, separate windows.

.rootmenu_RootMenuBar_1Ky59.steamdesktop_RootMenuBar_3s0lk > .rootmenu_RootMenuButton_2UyOB:not(:first-child) {
	display: none !important;
}

.rootmenu_RootMenuBar_1Ky59.steamdesktop_RootMenuBar_3s0lk:hover > .rootmenu_RootMenuButton_2UyOB:not(:first-child) {
	display: block !important;
}

Will work, but when you :hover over the spawned menu, you go back to hiding the root menu.

It obviously looks strange having the menu drop down from an element that is no longer visible.

Neither :focus nor :focus-within seem to apply here either.

image
image
image

@tkashkin
Copy link
Owner Author

Some ideas to test later:

  • Can we make the buttons icon-only? (Probably yes).
  • Can we hide the less useful submenus? display: none vs visibility vs zero size. Will opening these submenus on hover break, will it open them, or will it only open the remaining menus?
  • Can we move the buttons outside the menu container, can each button be in a different part of the window? (Probably yes). What will happen in this case?

@tkashkin
Copy link
Owner Author

@Foldex I've tried a few more things in #176, here's the current status and observations:

  • It already looks like an Adwaita menu until you try to hover it.
  • Disappearing and changing menus are still weird.
  • We can't rely just on :hover, but at least we can keep the opened menu button visible using [class*="menu_MenuOpen_"]. The Steam menu is currently always visible, but we can also hide it if another menu is open.
  • We can hide less useful submenus and nothing seems to break.
  • It would be perfect if we can find a way to merge all useful menu items into a single Steam menu. We'd probably have to patch JS to do that.
    I've opened Steam client JS patch ideas #181 to discuss JS patching.

@tkashkin
Copy link
Owner Author

The menu seems to be built in steamui/sp.js and it should probably be possible to modify it if we can patch JS.
More details in #181 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants