Merge lp:~nikwen/ubuntu-terminal-app/font-size-fix into lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot

Proposed by Niklas Wenzel
Status: Merged
Approved by: Niklas Wenzel
Approved revision: 165
Merged at revision: 165
Proposed branch: lp:~nikwen/ubuntu-terminal-app/font-size-fix
Merge into: lp:~ubuntu-terminal-dev/ubuntu-terminal-app/reboot
Diff against target: 28 lines (+4/-4)
2 files modified
src/app/qml/TerminalComponent.qml (+1/-1)
src/app/qml/TerminalSettings.qml (+3/-3)
To merge this branch: bzr merge lp:~nikwen/ubuntu-terminal-app/font-size-fix
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Stefano Verzegnassi Approve
Review via email: mp+285272@code.launchpad.net

Commit message

Make font size relative to "medium" fontSize for Labels

Default font size is set to be the same as that of gnome-terminal on a Unity 7 desktop

Description of the change

Make font size relative to "medium" fontSize for Labels

Default font size is set to be the same as that of gnome-terminal on a Unity 7 desktop

To post a comment you must log in.
Revision history for this message
Niklas Wenzel (nikwen) wrote :
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

The MP looks good, although I'm not sure on the default and the maximum size for the font.
I've left two inline comments.

Also, it might be nice to handle the font size in terms of 100th in the settings page (i.e. from 4% to 500% - assuming the current range is ok).

review: Needs Information
Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thank you for the review! :)

Here is a comparison of the font sizes with the current default: https://launchpadlibrarian.net/236776246/comparison.png

This shows that the values from the documentation are probably incorrect. However, you're right that it looks better on the phone with a ration of 1.0. In other words: perfect. So 10 might be better as the default.

For the range, have a look at this screenshot with maximum size: https://launchpadlibrarian.net/236776437/max-size.png
That's probably due to the incorrect desktop scaling again, though. On the phone, 50 is clearly too big.

We have to keep in mind to also consider cases where people want to present something using a projector. That's why we need a maximum that isn't too low.

Revision history for this message
Niklas Wenzel (nikwen) wrote :

I have to say that I am against the 100th, though. In general I tend to change appearance settings in applications once and afterwards often want to go back to the default. This is doable with the current 10th but it would be a hassle to hit exactly 1.0 when we use 100.
Furthermore, I guess that the activity of changing the font size is much more fulfilling when you do not have to ask yourself if it would look better with 1% more or less (assuming you're a perfectionist).

That's why I would vote for the current range but changing the default to 1.0 as the majority of our users are currently phone users.

Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

>Here is a comparison of the font sizes with the current default: >https://launchpadlibrarian.net/236776246/comparison.png
>
>This shows that the values from the documentation are probably incorrect. However, you're right that it looks better on the phone with a ration of 1.0. In other words: perfect. So 10 might be better as the default.

Strange, I gave a "console.log(FontUtils.sizeToPixels("medium"))" on my PC and returns 14px. :/
Anyway, as long as we both believe that using 1.0x factor returns a better result on phones, we don't need to discuss about it :D

>We have to keep in mind to also consider cases where people want to present something using a projector. That's why we need a maximum that isn't too low.

Good point! Since on my 22" screen I was able to fit 40 chars, it's still a good value for the scenario you described.

>I have to say that I am against the 100th, though. In general I tend to change appearance settings in applications once and afterwards often want to go back to the default. This is doable with the current 10th but it would be a hassle to hit exactly 1.0 when we use 100.

Legit! I was thinking about a smaller range [50%, 250%] and percentage would have probably worked better.
Since we'll stay with the proposed range, it's okay to me not to change this (although I feel it a bit strange).

Let's approve it then!

review: Approve
164. By Niklas Wenzel

Change default font size to 10

165. By Niklas Wenzel

Revert po/ folder to fix merge conflict

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thank you for the quick review again! :)

I changed the default back to 10 and tested it on my phone again. I'll top-level approve this now to get it merged.

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/TerminalComponent.qml'
2--- src/app/qml/TerminalComponent.qml 2016-01-09 01:47:56 +0000
3+++ src/app/qml/TerminalComponent.qml 2016-02-06 18:10:29 +0000
4@@ -12,7 +12,7 @@
5
6 colorScheme: settings.colorScheme
7 font.family: settings.fontStyle
8- font.pointSize: settings.fontSize
9+ font.pixelSize: FontUtils.sizeToPixels("medium") * settings.fontSize / 10
10
11 signal sessionFinished(var session);
12
13
14=== modified file 'src/app/qml/TerminalSettings.qml'
15--- src/app/qml/TerminalSettings.qml 2015-12-19 05:14:39 +0000
16+++ src/app/qml/TerminalSettings.qml 2016-02-06 18:10:29 +0000
17@@ -11,9 +11,9 @@
18 property alias showKeyboardBar: innerSettings.showKeyboardBar
19 property alias showKeyboardButton: innerSettings.showKeyboardButton
20
21- readonly property int defaultFontSize: units.gu(0.4)
22- readonly property int minFontSize: 2
23- readonly property int maxFontSize: 32
24+ readonly property int defaultFontSize: 10
25+ readonly property int minFontSize: 4
26+ readonly property int maxFontSize: 50
27
28 property alias jsonVisibleProfiles: innerSettings.jsonVisibleProfiles
29

Subscribers

People subscribed via source and target branches