diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-11-17 21:20:55 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-11-17 21:21:08 +0100 |
commit | 7f25c0120fc7bc6a6eeee87878cf387647d51614 (patch) | |
tree | ab510060a2c5625d00e7f19f4c7d699861b98cea /grc/gui/Constants.py | |
parent | e1acf2d27760d606cc7cba200aa380e885f2ffaf (diff) | |
parent | 1d50d70f0b990b909357a803881955623dea94d8 (diff) |
Merge remote-tracking branch 'upstream/next' into gtk3
Diffstat (limited to 'grc/gui/Constants.py')
-rw-r--r-- | grc/gui/Constants.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/grc/gui/Constants.py b/grc/gui/Constants.py index 0a555b37c9..01ea23ed3e 100644 --- a/grc/gui/Constants.py +++ b/grc/gui/Constants.py @@ -19,13 +19,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA from __future__ import absolute_import -from gi.repository import Gtk +from gi.repository import Gtk, Gdk from ..core.Constants import * # default path for the open/save dialogs -DEFAULT_FILE_PATH = os.getcwd() +DEFAULT_FILE_PATH = os.getcwd() if os.name != 'nt' else os.path.expanduser("~/Documents") FILE_EXTENSION = '.grc' # name for new/unsaved flow graphs @@ -101,6 +101,12 @@ Please consider contacting OOT module maintainer for any block in here \ and kindly ask to update their GRC Block Descriptions or Block Tree to include a module name.""" +# _SCREEN = Gdk.Screen.get_default() +# _SCREEN_RESOLUTION = _SCREEN.get_resolution() if _SCREEN else -1 +# DPI_SCALING = _SCREEN_RESOLUTION / 96.0 if _SCREEN_RESOLUTION > 0 else 1.0 +DPI_SCALING = 1.0 # todo: figure out the GTK3 way (maybe cairo does this for us + + def update_font_size(font_size): global PORT_SEPARATION, BLOCK_FONT, PORT_FONT, PARAM_FONT, FONT_SIZE |