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

Font size too small on 4k monitor on Linux #52

Open
misev opened this issue Nov 4, 2020 · 2 comments
Open

Font size too small on 4k monitor on Linux #52

misev opened this issue Nov 4, 2020 · 2 comments

Comments

@misev
Copy link

misev commented Nov 4, 2020

Screenshot to illustrate the issue:

Screenshot_20201104_111441

I had the font sizes in the Summary boxes increased in the code, but have somehow managed to lose it with the latest git pull.

For the tab selector I increased it in the code with

diff --git a/rkt/widgets/tab-selector.rkt b/rkt/widgets/tab-selector.rkt
index 980853f..fbf0960 100644
--- a/rkt/widgets/tab-selector.rkt
+++ b/rkt/widgets/tab-selector.rkt
@@ -50,7 +50,7 @@
     (super-new)

     ;; Font used to draw the labels
-    (define font (send the-font-list find-or-create-font 9 'default 'normal 'normal
+    (define font (send the-font-list find-or-create-font 14 'default 'normal 'normal
                        #f 'smoothed))

The axis labels and legends in the graphs are similarly a bit small.

I think font size could be made dependent on screen resolution, but I'm not sure how difficult it would be. Clearly some parts of the application already adapt well automatically, could be a widget issue.

@alex-hhh
Copy link
Owner

alex-hhh commented Nov 4, 2020

The axis labels and legends in the graphs are similarly a bit small.

plot-font-size will set the font size used for labels (there are also parameters for the font family and other things. I am not sure where best to place it, but this will work for a quick fix:

diff --git a/rkt/main.rkt b/rkt/main.rkt
index 6215e0e..e7dadf8 100644
--- a/rkt/main.rkt
+++ b/rkt/main.rkt
@@ -19,11 +19,13 @@
          "dbutil.rkt"
          "dialogs/first-run.rkt"
          "toplevel.rkt"
-         "utilities.rkt")
+         "utilities.rkt"
+         (only-in plot plot-font-size))
 
 (provide main)
 
 (define dbfile-key 'activity-log:database-file)
+(plot-font-size 24)
 
 (define (main)
   (dbglog "main started, version ~a, ~a, ~a"

This however will not update some of the hover labels that show up on plots, for those, some changes in dependent packages are needed.


I think font size could be made dependent on screen resolution

This is the bit that I am confused about. On Windows, I have a 2K monitor (1.5 scale) and a Full HD one (1K?). The fonts are automatically scaled as needed. For example, I can start the application on the 2K screen and, if I move it to the 1K screen the fonts are re-scaled so that the text is approximately the same size. The scaling happens at runtime by simply dragging the window between the two monitors. You can even see when the scaling happens, as if the window is more than 50% on the 2K screen, the part that is on the Full HD screen is actually bigger.

@misev
Copy link
Author

misev commented Nov 8, 2020

Yes in general the scaling works well, only some widgets seem to have trouble:

  • tab selector
  • Session overview boxes (which I'm not very concerned about as the same information is on the Activities tab)
  • plot labels, which got very well fixed with your suggestion above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants