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

TypeRig panel screws up appearance of some FLVI UI controls #17

Closed
twardoch opened this issue Aug 25, 2019 · 8 comments
Closed

TypeRig panel screws up appearance of some FLVI UI controls #17

twardoch opened this issue Aug 25, 2019 · 8 comments
Assignees
Labels
Bug Something isn't working

Comments

@twardoch
Copy link
Collaborator

Hello Vassil,

I don’t know where this problem exists (wheter it’s PythonQt or TypeRig or something else), but before I run TypeRig panel on macOS, my panel menus look like this:

scr- 2019-08-26 at 00 34 05

But when I run TypeRig panel, they change to:

scr- 2019-08-26 at 00 35 17

Is it possible that you do something in TypeRig that sets some styling of the TypeRig panel? (Which could then also influence the styling of some UI elements within FL). Because if you don’t customize anything, then it’ll be problem on some other end.

Thanks!

@twardoch twardoch added the Bug Something isn't working label Aug 25, 2019
@twardoch
Copy link
Collaborator Author

BTW, When I start one of the small Standalone TypeRig scripts with a simple dialog, the problem (which also affects context menus) does not occur but when I start one of the big panels, it happens:

scr- 2019-08-26 at 00 45 35

scr- 2019-08-26 at 00 45 51

What’s the principal difference between how you launch the "small" and the "big" panels?

@twardoch
Copy link
Collaborator Author

twardoch commented Aug 25, 2019

I see that this problem is due to the style override that Vassil does. With the style override, the TR panel is 890 px tall, and it just-so fits vertically onto a MacBook screen — but this changes UI elements in the app itself as well.

Without the style override (i.e. when the Qt macintosh style is used), it’s 1180 px tall and gets cut off around the "Stats" tab.

scr- 2019-08-26 at 01 01 22

scr- 2019-08-26 at 01 00 52

This is rather unfortunate, of course — but it’s a consequence of a design decision of the TypeRig panel (the fact that it requires lots of vertical space).

@twardoch
Copy link
Collaborator Author

twardoch commented Aug 25, 2019

On Windows, I guess these problems don’t appear that much because Windows generally produces smaller dialog boxes. But in macOS, dialogs are larger by design.

@kateliev I see that FontLab doesn’t even use any custom style — it just is macintosh (if I change this line to QtGui.QApplication.setStyle(QtGui.QStyleFactory.create('macintosh')), I get the original appearance.

So, this is not something that FontLab can do anything about, I guess.

@twardoch
Copy link
Collaborator Author

OK, I just did a bit of checking. My suggestion would be that you:

  1. Make your own class based on QtGui.QGridLayout where for Darwin you do:
self.setVerticalSpacing(5)
self.setHorizontalSpacing(7) #optional

and you subclass all your layouts from that custom class rather than from QtGui.QGridLayout directly.

  1. For the entire panel on Darwin, setStyleSheet to """font-size: 12px;""".

That will solve 99% of the problems without the necessity to hack.

@twardoch
Copy link
Collaborator Author

even setVerticalSpacing(3) could do. This is Anchors:

scr- 2019-08-26 at 02 39 51

@twardoch
Copy link
Collaborator Author

This is original Nodes (the visible part that I can get onto my screen — the rest is cut off):

scr- 2019-08-26 at 02 46 47

And this is with font-size: 12px and with verticalSpacing 3:

scr- 2019-08-26 at 03 03 14

There are still some gaps, not sure what they’re coming from — you understand your widgets much better than I do.

@twardoch
Copy link
Collaborator Author

@kateliev I’ve created a simple solution that could be improved, but it’s better than the current Mac hack :) #18

@kateliev
Copy link
Owner

kateliev commented Sep 3, 2019

Fixed by @twardoch! Merged!

@kateliev kateliev closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants