summaryrefslogtreecommitdiff
path: root/grc/gui/Constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Constants.py')
-rw-r--r--grc/gui/Constants.py10
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