Skip to content

Commit e5a01f8

Browse files
committed
Make display --scaling an optional argument
1 parent 6dd5b83 commit e5a01f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

slip39/gui/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
log = logging.getLogger( __package__ )
2626

2727

28-
disp_scaling = None if sys.platform == 'darwin' else 0.5
2928
disp_points = 14 # if sys.platform == 'darwin' else 9
3029
font = ('Courier', disp_points+0)
3130
font_small = ('Courier', disp_points-4)
@@ -1056,6 +1055,9 @@ def main( argv=None ):
10561055
ap.add_argument( '--passphrase',
10571056
default=None,
10581057
help="Encrypt the master secret w/ this passphrase, '-' reads it from stdin (default: None/'')" )
1058+
ap.add_argument( '-s', '--scaling',
1059+
default=None, type=float,
1060+
help="Scaling for display (eg. 1.5, 0.5 for high-resolution displays), if not automatically detected")
10591061
ap.add_argument( 'names', nargs="*",
10601062
help="Account names to produce")
10611063
args = ap.parse_args( argv )
@@ -1075,7 +1077,7 @@ def main( argv=None ):
10751077
cryptocurrency = args.cryptocurrency,
10761078
edit = args.path,
10771079
passphrase = args.passphrase,
1078-
scaling = disp_scaling,
1080+
scaling = args.scaling,
10791081
)
10801082
except Exception as exc:
10811083
log.exception( f"Failed running App: {exc}" )

0 commit comments

Comments
 (0)