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

Qt: Overhaul menubar #5794

Merged
merged 1 commit into from Aug 4, 2017
Merged

Qt: Overhaul menubar #5794

merged 1 commit into from Aug 4, 2017

Conversation

spycrab
Copy link
Contributor

@spycrab spycrab commented Jul 16, 2017

Improves the menubar in several ways:

  • Add ... to items when appropriate
  • Add missing keyboard shortcuts (mainly for Open... and Exit)

@spycrab
Copy link
Contributor Author

spycrab commented Jul 16, 2017

@ligfx @MayImilae @Starsam80

@MayImilae
Copy link
Contributor

Adds icons to entries?

@spycrab
Copy link
Contributor Author

spycrab commented Jul 16, 2017

@MayImilae
e.g. a little file icon next to Open...

@MayImilae
Copy link
Contributor

MayImilae commented Jul 16, 2017

That seems a bit unnecessary, imo. The menu bar isn't really conducive to icons, because of how small it is. (It's designed around text)

To be clear, there's nothing wrong with it, just, it's not a good space for icons, and it's more icons that have to be made!

@Starsam80
Copy link
Contributor

The icons don't seem to appear on windows:
image

Also, while you are at it, can you also add separators to the Emulation menu? This is what WX looks like:
image

and Qt looks like this:
image

Copy link
Contributor

@ligfx ligfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyboard shortcuts are good!

On the topic of icons: they don't work on macOS (possibly intentional by Qt, possibly because the icons don't exist), which is good because the HIG discourages it. Do they show up on Windows?

m_perform_online_update_menu = tools_menu->addMenu(tr("Perform Online System Update"));
m_perform_online_update_menu =
tools_menu->addMenu(QIcon::fromTheme(QStringLiteral("system-software-update")),
tr("Perform Online System Update..."));

This comment was marked as off-topic.

@ligfx
Copy link
Contributor

ligfx commented Jul 16, 2017

@Starsam80 you answered my question before I asked it! If the icons only work on Linux, I'd say it's probably not worth the extra code.

@Starsam80
Copy link
Contributor

@ligfx No, they do not appear on windows. Quoting the Qt docs:

https://doc.qt.io/qt-5/qicon.html#fromTheme

Note: By default, only X11 will support themed icons. In order to use themed icons on Mac and Windows, you will have to bundle a compliant theme in one of your themeSearchPaths() and set the appropriate themeName().

I don't think the icons are worth it

@spycrab
Copy link
Contributor Author

spycrab commented Jul 16, 2017

@Starsam80 Done.

Now using Dolphin's icons only. Also reduced the amount of icons used due to the fact that our iconset is rather limited.

@ligfx
Copy link
Contributor

ligfx commented Jul 16, 2017

Ah, sorry, I wasn't clear before: menu icons should not be displayed on macOS.

Copy link
Contributor

@ligfx ligfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think the icons shouldn't be shown on Windows, either. I poked around a Windows 10 install, and I couldn't find any applications that used icons in their menus. First-party apps and large third-party applications like Spotify and Atom don't use them. Dolphin should be consistent.

Also, the fullscreen icon metaphor isn't understandable at such a small size, and it's unclear to me whether the screenshot one is. We all know it's a camera, but, with the loss of higher-definition details, would a new user recognize what a rectangle with a ring in the middle and a dot in one corner means?

screen shot 2017-07-16 at 9 54 17 am

@@ -9,6 +9,8 @@
#include <QMessageBox>
#include <QUrl>

#include <iostream>

This comment was marked as off-topic.

@MayImilae
Copy link
Contributor

Are the icons still in the menu bar on the current version of this?

@spycrab
Copy link
Contributor Author

spycrab commented Jul 19, 2017

@MayImilae No, I removed all icons.

Copy link
Contributor

@MayImilae MayImilae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, everything's good for me!

@@ -17,6 +17,7 @@
#include "DolphinQt2/AboutDialog.h"
#include "DolphinQt2/GameList/GameFile.h"
#include "DolphinQt2/MenuBar.h"
#include "DolphinQt2/Resources.h"

This comment was marked as off-topic.

@spycrab spycrab force-pushed the qt_menubar branch 2 times, most recently from fc81610 to 886b327 Compare July 23, 2017 08:40
m_open_action = file_menu->addAction(tr("Open"), this, SIGNAL(Open()));
m_exit_action = file_menu->addAction(tr("Exit"), this, SIGNAL(Exit()));
m_open_action = file_menu->addAction(tr("Open..."), this, SIGNAL(Open()),
QKeySequence(QStringLiteral("Ctrl+O")));

This comment was marked as off-topic.

m_state_save_menu->addAction(tr("Save State to Oldest Slot"), this, &MenuBar::StateSaveOldest);
m_state_save_menu->addAction(tr("Save State to File..."), this, SIGNAL(StateSave()));
m_state_save_menu->addAction(tr("Save State to Selected Slot"), this, SIGNAL(StateSaveSlot()));
m_state_save_menu->addAction(tr("Save State to Oldest Slot"), this, SIGNAL(StateSaveOldest()));

This comment was marked as off-topic.

@spycrab spycrab force-pushed the qt_menubar branch 4 times, most recently from 43d3df4 to 6ddb8b9 Compare July 29, 2017 18:35
@leoetlino leoetlino merged commit 9bab7ff into dolphin-emu:master Aug 4, 2017
@leoetlino leoetlino modified the milestone: Qt Sep 13, 2017
@spycrab spycrab deleted the qt_menubar branch April 14, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants