Coder Social home page Coder Social logo

Comments (8)

twardoch avatar twardoch commented on August 16, 2024

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?

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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).

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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.

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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.

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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

scr- 2019-08-26 at 02 39 51

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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.

from typerig.

twardoch avatar twardoch commented on August 16, 2024

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

from typerig.

kateliev avatar kateliev commented on August 16, 2024

Fixed by @twardoch! Merged!

from typerig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.