-
Notifications
You must be signed in to change notification settings - Fork 280
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
[RFC] new UI #571
[RFC] new UI #571
Conversation
The behavior of the old UI with regard to focusing back the previous window has been kept when a dialog was triggered through a translation command (for lookup, add translation, and configure), but I really think it should be possible to disable it. IMHO it's not needed on Linux; as any good window manager already does what's right, and our code as some annoying side effects (like raising the previous window when focusing it back, which can result in some previous visible windows getting hidden), how about a new interface setting? Similarly, remembering window positions/sizes can be annoying when you want to use your window manager facilities to automatically layout Plover's windows in a set way. |
I noticed today that I can't write emoji into the Add Translation dialog box on Mac with Plover, but I can paste them in. Can you reproduce this on Windows or Linux? |
It works fine on Linux with |
New release: ui_preview_2: include a fixed pyobjc-core version so emojis work on OS X. |
So "¯_(ツ)_/¯" works on OS X, but the emoji don't register at all. Also of This makes me think that maybe QT is missing a flag or something to allow On Mon, Aug 8, 2016 at 11:39 AM, Benoit Pierre notifications@github.com
|
How about when running from source? |
The behavior is the same when running from source. |
OK, so the build is not missing a library. |
This is ancient: https://bugreports.qt.io/browse/QTBUG-8979 |
Maybe we can also get @gcr to make some visually simpler tray icons, like a simplified steno layout so that it isn't as cramped as the full layout in the tray. I did this once before for a simplified hardware button on the open steno site: http://www.openstenoproject.org/images/icon-hardware-2x.png Ideally the icons would be square as well but I acknowledge that that's a lot to ask 😁 |
Yeah, I also wonder how they look on a white background: needs some border on all elements. |
In the machine configuration, the machine options are under an "options" On Mon, Aug 8, 2016 at 11:59 AM, Timothy Aveni notifications@github.com
|
I can get the character viewer to work on Mac by including an empty "Edit" menu entry next to File, Dictionaries, and Tools. This is discussed in this QT issue: https://bugreports.qt.io/browse/QTBUG-40514?jql=text%20~%20%22character%20viewer%22%20ORDER%20BY%20created%20DESC Unfortunately I still can't write emoji with Plover into the application, but at least I can bring up the character selector to select them. There are also many good human interface guidelines that I'll probably have to peruse in order to improve Plover's behavior according to Mac standards. |
It's also strange to me how the output check box is just hanging out in the center of the window. I'm not quite sure what the solution is…but because the UI is somewhat malleable you can get into a weird state like: I'm downloading the QT creator so I'll have a chance to play with some of this stuff. |
I dislike the gradient given to the toolbar all over the place. I've implemented a workaround.
Next, for the toolbar: diff --git a/plover/gui_qt/utils.py b/plover/gui_qt/utils.py
index b36273b..e68a0c0 100644
--- a/plover/gui_qt/utils.py
+++ b/plover/gui_qt/utils.py
@@ -1,12 +1,15 @@
-from PyQt5.QtCore import QSettings
+from PyQt5.QtCore import QSettings, QSize
from PyQt5.QtWidgets import (
QMainWindow,
QMenu,
QToolBar,
QToolButton,
+ QStyleFactory,
)
+import sys
+
def ToolButton(action):
button = QToolButton()
@@ -18,6 +21,9 @@ def ToolBar(*action_list):
toolbar = QToolBar()
for action in action_list:
toolbar.addWidget(ToolButton(action))
+ if sys.platform.startswith('darwin'):
+ toolbar.setStyle(QStyleFactory.create('windows'))
+ toolbar.setIconSize(QSize(23, 16))
return toolbar |
I've made some changes for OS X, all of them bundled into this commit: morinted@933784e Icons
To do that required a loader, which renders the icons at 2x the resolution required (Mac need 2x for retina, which is activated for Pixmaps with Tray Icon MaskThe tray icon in QT can mask to black or white depending on the user's menu bar coloring if we use PaddingThe padding has been adjusted for what I think looks good on Mac. The commit is really messy. Just let me know what you think before we continue. EDIT: I removed the add translation button from the dictionary manager because it's confusing out of context (it's on the main window and available through many windows anyway) |
That new icon pack is a huge improvement!!! It looks really, really nice. On Aug 8, 2016 11:23 PM, "Ted Morin" notifications@github.com wrote:
|
I was thinking, too, that the icon color could be configurable for users who have dark themes. Not sure if we can decouple the icon color in menus from the one in the UI but that would also be useful on macOS |
The icons above are no good because they don't work well on light/dark themes. I really like icons8, but they are non-free and so even though they "support" open source projects, I don't see how we can release them with a GPL-licensed Plover. Therefore, I'm going to try and use their MIT-licensed icons instead, and create new icons based off of those: https://github.com/icons8/flat-color-icons It will take a couple days for me to get them to a point that I'm happy. In the meanwhile, here are a couple of them in use (I'm going to be adjusting some of them and swapping out others…) |
No, the machine options are one widget. Changing that would break the whole "programatically create/layout the configuration dialog".
Fixed. |
New preview: ui_preview_3 |
Tray icon attempts: I've completed my icon set: I was brain storming as to what we could do with the main window, if we decide to drop the minimalist interface in favor of the tray icon's menu: please excuse poor proportions and penmanship
|
Make it work when engine commands are consumed in another threads.
Actually pass a stroke object instead of a list of steno keys. This in turn make it possible to remove the dependency on the system module when logging a stroke.
- allow calling `set_suppression` before `start_capture` - automatically update suppression on keymap change
fec66cd
to
c77713f
Compare
New preview: ui_preview_7 |
Closing this, a new PR will be prepared for merging to master. |
The goal of this PR is get feedback on the new UI rewrite.
Test builds
Note: the new UI is available for the Python 3 builds on Windows and OS X.
For Linux, the Debian package still uses Python 2, and provide both the (old) WX UI and the new PyQt5 based UI, launch Plover withThe Debian package now uses Python 3 too, and the new UI is automatically selected.plover -g qt
to select the new UI (and of course Python 3 is supported if you run from source).Major differences
LANGUAGE
environment variable can be set to override the locale detection. Note that part of some dialogs will already be automatically localized thanks to Qt own localizations (e.g. standard OK/Cancel buttons labels), or by the OS (e.g. on Windows a native file browser is used).Known issues
[OS X] there's no differentiation between a right and left click on the tray icon.[OS X] on quitting with Ctrl+Q, the warning about closing the main window is shown.Main window
Menu layout:
Tray icon
The tray icon is automatically enabled when supported.
3 different state icons (reused from #263, as I'm not much of an artist, I hope it's all right @gcr) are used:
Context menu layout:
Configuration
Dictionaries Manager
Note:
Dictionary Editor
Add Translation
Lookup
Paper Tape
Suggestions
About