Merge lp:~kill-animals/ubuntu-terminal-app/1349749workaround-select-font-added-to-preferences into lp:ubuntu-terminal-app
- 1349749workaround-select-font-added-to-preferences
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Alan Pope 🍺🐧🐱 🦄 | ||||||||
Approved revision: | 155 | ||||||||
Merged at revision: | 167 | ||||||||
Proposed branch: | lp:~kill-animals/ubuntu-terminal-app/1349749workaround-select-font-added-to-preferences | ||||||||
Merge into: | lp:ubuntu-terminal-app | ||||||||
Diff against target: |
296 lines (+81/-37) 4 files modified
po/com.ubuntu.terminal.pot (+22/-18) src/app/qml/Configs.qml (+35/-6) src/app/qml/Terminal.qml (+15/-13) src/app/qml/config/JsConfig.qml (+9/-0) |
||||||||
To merge this branch: | bzr merge lp:~kill-animals/ubuntu-terminal-app/1349749workaround-select-font-added-to-preferences | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Filippo Scognamiglio | Approve | ||
David Planella | Needs Fixing | ||
Review via email: mp+235621@code.launchpad.net |
Commit message
Configs.qml - Added a drop down list where you can choose from 5 fonts. I chose the fonts based on what I understand will be included in the default image. These will need to be tested though.
Terminal.qml - I actually unwittingly fixed a bug here, as Ubuntu Mono was not being initially registered. The changes i made were making sure the onConfigChanged registered new fonts, and that the font family being used is being grabbed from the database, which I added an entry.
JsConfig.qml - I added a DB entry for the fontStyle.
TerminalDis
TerminalDis
Description of the change
Configs.qml - Added a drop down list where you can choose from 5 fonts. I chose the fonts based on what I understand will be included in the default image. These will need to be tested though.
Terminal.qml - I actually unwittingly fixed a bug here, as Ubuntu Mono was not being initially registered. The changes i made were making sure the onConfigChanged registered new fonts, and that the font family being used is being grabbed from the database, which I added an entry.
JsConfig.qml - I added a DB entry for the fontStyle.
TerminalDis
TerminalDis
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
- 151. By Kill Animals
-
Removed a Debug Message.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:151
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Quick question: in the Ubuntu philosophy of making opionionated decisions
and having a default that works rather than overwhelming users with
multiple settings, would it not make sense to just set the font to Ubuntu
mono?
Cheers,
David.
On Tue, Sep 23, 2014 at 3:26 PM, Ubuntu Phone Apps Jenkins Bot <
<email address hidden>> wrote:
> Review: Approve continuous-
>
> PASSED: Continuous integration, rev:151
> http://
> Executed test runs:
> SUCCESS:
> http://
> deb:
> http://
> SUCCESS:
> http://
>
> Click here to trigger a rebuild:
> http://
>
> --
>
> https:/
> Your team Ubuntu Terminal Developers is requested to review the proposed
> merge of
> lp:~akiva/ubuntu-terminal-app/1349749workaround-select-font-added-to-preferences
> into lp:ubuntu-terminal-app.
>
Kill Animals (kill-animals) wrote : | # |
> Quick question: in the Ubuntu philosophy of making opionionated decisions
> and having a default that works rather than overwhelming users with
> multiple settings, would it not make sense to just set the font to Ubuntu
> mono?
>
> Cheers,
> David.
>
The immediate issue unfortunately is that Ubuntu Mono does not exactly *work* at this time, and neither does Monospace for that matter. Thus this work around was created.
For my part though on the question of design; When it comes to a Terminal Emulator, I think leaving features, and flexibility within it will be a driver for attracting super users away from android, and perhaps even IOS, to bask in the glory of a Terminal Emulator with kde-like flexibility. It is something that is perhaps the coolest thing you can demo on an ubuntu-touch right now, with the old terminal functionality, and I look forward to showing it off to my friends.
Otherwise though; if this were not a Terminal, I would be in agreement.
Filippo Scognamiglio (flscogna) wrote : | # |
Sorry for the intrusion but I'd like to share my two cents on this merge proposal.
First of all I agree with David that we should not overwhelm the users with settings but I also think that font selection might be worthy (on the desktop they are mandatory on the phone maybe not).
Anyway I really think the implementation might use some work. Before we were using a Q_PROPERTY to set the font. Why are you making setVTFont Q_INVOKABLE and calling it directly instead of using the previous mechanism?
Moreover storing the selected font as an index is not wise when we take into account future updates since we will be forced to add new fonts only at the end of the list. I suggest to store the font.family string in the db and then compute the index.
Kill Animals (kill-animals) wrote : | # |
> Sorry for the intrusion but I'd like to share my two cents on this merge
> proposal.
>
> First of all I agree with David that we should not overwhelm the users with
> settings but I also think that font selection might be worthy (on the desktop
> they are mandatory on the phone maybe not).
>
> Anyway I really think the implementation might use some work. Before we were
> using a Q_PROPERTY to set the font. Why are you making setVTFont Q_INVOKABLE
> and calling it directly instead of using the previous mechanism?
>
> Moreover storing the selected font as an index is not wise when we take into
> account future updates since we will be forced to add new fonts only at the
> end of the list. I suggest to store the font.family string in the db and then
> compute the index.
No no; Intrude !
> First of all I agree with David that we should not overwhelm the users with
> settings but I also think that font selection might be worthy (on the desktop
> they are mandatory on the phone maybe not).
We could put an "Advanced Options" selection at the bottom; what do you think about that?
> Anyway I really think the implementation might use some work. Before we were
> using a Q_PROPERTY to set the font. Why are you making setVTFont Q_INVOKABLE
> and calling it directly instead of using the previous mechanism?
Uhm, I copied the mechanism that was being used for setting the font size, which was done by someone else. Q_INVOKABLE (Although I initially researched it, and wondered why it was not being utilized for this) is not used for the font. I do not know why, but needless to say; it is not in my merge at all. Could you please clarify your comments? Perhaps point to the code you are speaking of?
> Moreover storing the selected font as an index is not wise when we take into
> account future updates since we will be forced to add new fonts only at the
> end of the list. I suggest to store the font.family string in the db and then
> compute the index.
Oh I see what you mean. I do not think that actually will cause anything to break though. The font is not being read as an index; the font is being read as a string. The font is being written as an index, and that write is only triggered on an index change.
ergo
The user will have to physically select the font to something else.
When he physically selects the font, the index will be corrected at that point, updating to the current list.
After the index is changed, the model[index] returns the font selected to the database.
This triggers the configChanged
The configChanged triggers a read to the database, which returns the appropriate string.
Filippo Scognamiglio (flscogna) wrote : | # |
Sorry for the previous fast comment, but I wanted to write that before launch! :D
> We could put an "Advanced Options" selection at the bottom; what do you think about that?
Yeah, that might be the sweet spot; Anyway might be interesting to have the opinion of a UX expert (I'm definitely not).
>Uhm, I copied the mechanism that was being used for setting the font size, which was done by >someone else. Q_INVOKABLE (Although I initially researched it, and wondered why it was not being >utilized for this) is not used for the font. I do not know why, but needless to say; it is not in >my merge at all. Could you please clarify your comments? Perhaps point to the code you are >speaking of?
Q_INVOKABLE are functions that can be called from the QtQuick side. In this case you are directly calling setVTFont(const QString& s, int n) from QML:
Terminal.qml:236 font.family: kterm.setVTFont
What you are doing it is calling the invokable function setVTFont(font, size), grab the return type (void) and assign that to the property font.family. That might even work but it is extremely convoluted.
The solution I propose is to get rid of the overloaded setVTFont(font, size) and using property assignments as you are doing here.
Terminal.qml:88 kterm.font.
Terminal.qml:89 kterm.colorScheme = jsConf.
Terminal.qml:90 kterm.font.family = jsConf.
The property will then trigger the setVTFont(font) function, preserving the plugin interface.
I really hope that's clear enough (I still have issues explaining non trivial concepts in english).
>Oh I see what you mean. I do not think that actually will cause anything to break though. The >font is not being read as an index; the font is being read as a string. The font is being >written as an index, and that write is only triggered on an index change.
Forget that, I'm an idiot. You was suggesting you to do exactly what you did! Sorry :)
I just noticed the changes to TerminalDisply.h... Awesome! :D
Kill Animals (kill-animals) wrote : | # |
> you are doing it is calling the invokable function
This is what I don't get though, and trust me; I WAS CONFUSED
There is no Q_INVOKABLE for setVTFont's class.
It's invoked... SOMEHOW! but for the life of me I could not figure out where or how it was done.
The Q_INVOKABLE macro only appears in two places:
http://
Also (I Think)
font.family: kterm.setVTFont
Is initiated in the constructor; changing it on the fly if I recall, does not work; you require some signal handles which are in the configs scope.
To everything else; sounds fine though.
T
Filippo Scognamiglio (flscogna) wrote : | # |
>There is no Q_INVOKABLE for setVTFont's class.
I believe that it works anyway because setVTFont is declared as a public
slot and not a public method. (some reminiscences in by brain).
>Also (I Think)
>font.family: kterm.setVTFont
>getFontStyle(), kterm.font.
>Is initiated in the constructor; changing it on the fly if I recall, does
not work; you require some signal handles which are in the configs scope.
That's true but as a side effect. Writing "font.family: kterm.setVTFont()",
is read as: set to font.family what is returned by the function
kterm.setVTFont().
This is not what happens. The function kterm.setVTFont() doesn't return
anything but sets the font itself. If you want to call it this way the
proper place to put it is in Component.
What's wrong with "font.family: jsConf.
2014-09-24 14:50 GMT+02:00 Akiva <email address hidden>:
> > you are doing it is calling the invokable function
>
> This is what I don't get though, and trust me; I WAS CONFUSED
> There is no Q_INVOKABLE for setVTFont's class.
> It's invoked... SOMEHOW! but for the life of me I could not figure out
> where or how it was done.
>
> The Q_INVOKABLE macro only appears in two places:
> http://
>
> Also (I Think)
> font.family: kterm.setVTFont
> Is initiated in the constructor; changing it on the fly if I recall, does
> not work; you require some signal handles which are in the configs scope.
>
> To everything else; sounds fine though.
>
>
> T
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~akiva/ubuntu-terminal-app/1349749workaround-select-font-added-to-preferences
> into lp:ubuntu-terminal-app.
>
Kill Animals (kill-animals) wrote : | # |
> I believe that it works anyway because setVTFont is declared as a public
slot and not a public method. (some reminiscences in by brain).
Good golly! I wish someone told me it was that easy... Bloody macros uglying up my code
> That's true but as a side effect. Writing "font.family: kterm.setVTFont()",
is read as: set to font.family what is returned by the function
kterm.setVTFont().
Oh yah thats true; I am not setting a property; I am sending a signal. Good point; I'll move it on over to onCompleted.
> What's wrong with "font.family: jsConf.
Doesn't work ; its the same as "font.family: "Ubuntu Mono"" which also was not working...
Kill Animals (kill-animals) wrote : | # |
So you made me question myself, and so I downloaded the branch, took out the font.family and removed
To no consequence that I could see. Everything still worked fine; even after starting and stopping the app. Perhaps this is only important if you have nothing to start with. I don't know how to test this though.
Perhaps though these should just be removed if they arent doing anything.
Filippo Scognamiglio (flscogna) wrote : | # |
Sorry for the late response.
> Perhaps though these should just be removed if they arent doing anything.
Agreed, since those are set only on construction we should simply put everything in Component.
We still need to remove the overloaded setVTFont(font, size) since I think that's unnecessary code duplicatoin and might be replaced by something like that in Component.
Component.
kterm.
kterm.
//Something else
}
>Doesn't work ; its the same as "font.family: "Ubuntu Mono"" which also was not working...
This is surely a problem with how we are initializing the plugin. It is something that might be worth checking in the future, but if we can force them from Component.
Kill Animals (kill-animals) wrote : | # |
> Agreed, since those are set only on construction we should simply put everything in Component.
Sounds good.
> We still need to remove the overloaded setVTFont(font, size) since I think that's unnecessary code duplicatoin and might be replaced by something like that in Component.
Component.
kterm.
kterm.
//Something else
}
I'll have to look at it. Remember; I overloaded the function on purpose because I needed a way to set the font on the fly, and to set the font, I need QFont, which requires size and family parameters. Component.
Either way, if I can eliminate the overload, i'll do it.
> This is surely a problem with how we are initializing the plugin. It is something that might be worth checking in the future, but if we can force them from Component.
Yah I guess it does need to be fixed. Was font.xxxx defined in this program? If that is the case, then I can't imagine it being too difficult. Either way; worst case scenario leaves us with this small patch.
In the spirit of keeping merges small, can we patch the "Advanced Options" in a future patch?
Kill Animals (kill-animals) wrote : | # |
@flippo
Okay so... good catch. I am seriously embarrassed; I did not realize that I overloaded the function for something that I was doing earlier, but took out.
Jeepers :P
Okay updating the code.
- 152. By Kill Animals
-
Took out overloaded function setVtFont(string, int) -- was mistakenly left in. Thanks for pointing that out.
Took out property settings, and had them defined only on completion of the kterm component.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:152
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Before going further into a more detailed review, a few style nitpicks:
Filippo Scognamiglio (flscogna) wrote : | # |
Very good work Akiva. Now the pedantic me is really happy! :)
- 153. By Kill Animals
-
Fixed Style via David Planella's suggestions.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:153
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Filippo Scognamiglio (flscogna) wrote : | # |
Wow, you also fixed some styling issues I introduced. Thank you Akiva!
Kill Animals (kill-animals) wrote : | # |
Good to hear it. You can thank David for the styling though; hes pretty good with that in my experience.
- 154. By Kill Animals
-
Merged with Trunk; Tested on Emulator; Took out Dejavu Sans Mono because I believe it was actually just reverting to monospace.
- 155. By Kill Animals
-
took out translations for the select font, because I do not think that the filename, which depends on the string, will change on other computers.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:154
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:155
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'po/com.ubuntu.terminal.pot' | |||
2 | --- po/com.ubuntu.terminal.pot 2014-10-06 12:22:53 +0000 | |||
3 | +++ po/com.ubuntu.terminal.pot 2014-10-07 11:18:20 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | msgstr "" | 8 | msgstr "" |
6 | 9 | "Project-Id-Version: \n" | 9 | "Project-Id-Version: \n" |
7 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
9 | 11 | "POT-Creation-Date: 2014-09-26 08:27-0700\n" | 11 | "POT-Creation-Date: 2014-10-07 04:16-0700\n" |
10 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | @@ -52,38 +52,42 @@ | |||
14 | 52 | msgstr "" | 52 | msgstr "" |
15 | 53 | 53 | ||
16 | 54 | #: ../src/app/qml/Configs.qml:69 | 54 | #: ../src/app/qml/Configs.qml:69 |
29 | 55 | msgid "Color scheme" | 55 | msgid "Color Scheme:" |
30 | 56 | msgstr "" | 56 | msgstr "" |
31 | 57 | 57 | ||
32 | 58 | #: ../src/app/qml/Configs.qml:85 | 58 | #: ../src/app/qml/Configs.qml:81 |
33 | 59 | msgid "Font size" | 59 | msgid "Select Font:" |
34 | 60 | msgstr "" | 60 | msgstr "" |
35 | 61 | 61 | ||
36 | 62 | #: ../src/app/qml/Configs.qml:108 | 62 | #: ../src/app/qml/Configs.qml:113 |
37 | 63 | msgid "Enable effects:" | 63 | msgid "Font Size:" |
38 | 64 | msgstr "" | 64 | msgstr "" |
39 | 65 | 65 | ||
40 | 66 | #: ../src/app/qml/Configs.qml:126 | 66 | #: ../src/app/qml/Configs.qml:136 |
41 | 67 | msgid "Enable Effects:" | ||
42 | 68 | msgstr "" | ||
43 | 69 | |||
44 | 70 | #: ../src/app/qml/Configs.qml:155 | ||
45 | 67 | msgid "Screen color" | 71 | msgid "Screen color" |
46 | 68 | msgstr "" | 72 | msgstr "" |
47 | 69 | 73 | ||
49 | 70 | #: ../src/app/qml/Configs.qml:139 | 74 | #: ../src/app/qml/Configs.qml:168 |
50 | 71 | msgid "Color intensity" | 75 | msgid "Color intensity" |
51 | 72 | msgstr "" | 76 | msgstr "" |
52 | 73 | 77 | ||
54 | 74 | #: ../src/app/qml/Configs.qml:167 | 78 | #: ../src/app/qml/Configs.qml:196 |
55 | 75 | msgid "Bloom" | 79 | msgid "Bloom" |
56 | 76 | msgstr "" | 80 | msgstr "" |
57 | 77 | 81 | ||
59 | 78 | #: ../src/app/qml/Configs.qml:195 | 82 | #: ../src/app/qml/Configs.qml:224 |
60 | 79 | msgid "Curvature" | 83 | msgid "Curvature" |
61 | 80 | msgstr "" | 84 | msgstr "" |
62 | 81 | 85 | ||
64 | 82 | #: ../src/app/qml/Configs.qml:223 | 86 | #: ../src/app/qml/Configs.qml:252 |
65 | 83 | msgid "Noise" | 87 | msgid "Noise" |
66 | 84 | msgstr "" | 88 | msgstr "" |
67 | 85 | 89 | ||
69 | 86 | #: ../src/app/qml/Configs.qml:251 | 90 | #: ../src/app/qml/Configs.qml:280 |
70 | 87 | msgid "Jitter" | 91 | msgid "Jitter" |
71 | 88 | msgstr "" | 92 | msgstr "" |
72 | 89 | 93 | ||
73 | 90 | 94 | ||
74 | === modified file 'src/app/qml/Configs.qml' | |||
75 | --- src/app/qml/Configs.qml 2014-10-06 12:22:53 +0000 | |||
76 | +++ src/app/qml/Configs.qml 2014-10-07 11:18:20 +0000 | |||
77 | @@ -5,8 +5,8 @@ | |||
78 | 5 | 5 | ||
79 | 6 | Item { | 6 | Item { |
80 | 7 | id: mparent | 7 | id: mparent |
83 | 8 | JsConfig{id: jsConf } | 8 | JsConfig {id: jsConf } |
84 | 9 | ColorDialog{ | 9 | ColorDialog { |
85 | 10 | id: colorDialog | 10 | id: colorDialog |
86 | 11 | selectedColor: jsConf.getScreenColor(); | 11 | selectedColor: jsConf.getScreenColor(); |
87 | 12 | onSelectedColorChanged: { | 12 | onSelectedColorChanged: { |
88 | @@ -66,7 +66,7 @@ | |||
89 | 66 | } | 66 | } |
90 | 67 | } | 67 | } |
91 | 68 | 68 | ||
93 | 69 | text: i18n.tr("Color scheme") + ":" | 69 | text: i18n.tr("Color Scheme:") |
94 | 70 | onSelectedIndexChanged: { | 70 | onSelectedIndexChanged: { |
95 | 71 | if(colorSchemeLoaded) { | 71 | if(colorSchemeLoaded) { |
96 | 72 | var val = model[selectedIndex]; | 72 | var val = model[selectedIndex]; |
97 | @@ -76,16 +76,44 @@ | |||
98 | 76 | } | 76 | } |
99 | 77 | } | 77 | } |
100 | 78 | 78 | ||
101 | 79 | ListItem.ItemSelector { | ||
102 | 80 | id: selectFont | ||
103 | 81 | text: i18n.tr("Select Font:") | ||
104 | 82 | width: parent.width | ||
105 | 83 | function getIndex() { | ||
106 | 84 | var i = 0; | ||
107 | 85 | while (jsConf.getFontStyle() !== model[i]) { | ||
108 | 86 | i += 1; | ||
109 | 87 | if (i > model.length) { | ||
110 | 88 | return 0 | ||
111 | 89 | } | ||
112 | 90 | } | ||
113 | 91 | return i | ||
114 | 92 | } | ||
115 | 93 | |||
116 | 94 | selectedIndex: getIndex() | ||
117 | 95 | model: [ | ||
118 | 96 | "Droid Sans Mono", | ||
119 | 97 | "Liberation Mono", | ||
120 | 98 | "Monospace", | ||
121 | 99 | "Ubuntu Mono" | ||
122 | 100 | ] | ||
123 | 101 | onSelectedIndexChanged: { | ||
124 | 102 | jsConf.setFontStyle(model[selectedIndex]); | ||
125 | 103 | configChanged(true); | ||
126 | 104 | } | ||
127 | 105 | } | ||
128 | 106 | |||
129 | 79 | Label { | 107 | Label { |
130 | 80 | anchors { | 108 | anchors { |
131 | 81 | left: parent.left | 109 | left: parent.left |
132 | 82 | leftMargin: units.gu(2) | 110 | leftMargin: units.gu(2) |
133 | 83 | } | 111 | } |
134 | 84 | 112 | ||
136 | 85 | text: i18n.tr("Font size") + ":" | 113 | text: i18n.tr("Font Size:") |
137 | 86 | } | 114 | } |
138 | 87 | 115 | ||
140 | 88 | Slider{ | 116 | Slider { |
141 | 89 | id: slFont | 117 | id: slFont |
142 | 90 | objectName: "slFont" | 118 | objectName: "slFont" |
143 | 91 | anchors { | 119 | anchors { |
144 | @@ -105,7 +133,7 @@ | |||
145 | 105 | ListItem.ThinDivider { } | 133 | ListItem.ThinDivider { } |
146 | 106 | 134 | ||
147 | 107 | ListItem.Standard { | 135 | ListItem.Standard { |
149 | 108 | text: i18n.tr("Enable effects:") | 136 | text: i18n.tr("Enable Effects:") |
150 | 109 | control: Switch { | 137 | control: Switch { |
151 | 110 | id: effectsEnableSwitch | 138 | id: effectsEnableSwitch |
152 | 111 | onCheckedChanged: { | 139 | onCheckedChanged: { |
153 | @@ -113,6 +141,7 @@ | |||
154 | 113 | } | 141 | } |
155 | 114 | } | 142 | } |
156 | 115 | } | 143 | } |
157 | 144 | |||
158 | 116 | Column { | 145 | Column { |
159 | 117 | id: effectsColumn | 146 | id: effectsColumn |
160 | 118 | width: parent.width | 147 | width: parent.width |
161 | 119 | 148 | ||
162 | === modified file 'src/app/qml/Terminal.qml' | |||
163 | --- src/app/qml/Terminal.qml 2014-09-20 10:54:37 +0000 | |||
164 | +++ src/app/qml/Terminal.qml 2014-10-07 11:18:20 +0000 | |||
165 | @@ -8,7 +8,7 @@ | |||
166 | 8 | id: mparent | 8 | id: mparent |
167 | 9 | anchors.fill: parent | 9 | anchors.fill: parent |
168 | 10 | 10 | ||
170 | 11 | function hideFocus(){ | 11 | function hideFocus() { |
171 | 12 | kterm.focus = false; | 12 | kterm.focus = false; |
172 | 13 | } | 13 | } |
173 | 14 | 14 | ||
174 | @@ -22,8 +22,8 @@ | |||
175 | 22 | 22 | ||
176 | 23 | //property int headerHeight: units.gu(10); | 23 | //property int headerHeight: units.gu(10); |
177 | 24 | 24 | ||
180 | 25 | function showExtraPanel(i){ | 25 | function showExtraPanel(i) { |
181 | 26 | switch (i){ | 26 | switch (i) { |
182 | 27 | case 1: | 27 | case 1: |
183 | 28 | kbCtrl.visible = true; | 28 | kbCtrl.visible = true; |
184 | 29 | kbFn.visible = false; | 29 | kbFn.visible = false; |
185 | @@ -87,6 +87,7 @@ | |||
186 | 87 | onConfigChanged: { | 87 | onConfigChanged: { |
187 | 88 | kterm.font.pointSize = jsConf.getFontSize(); | 88 | kterm.font.pointSize = jsConf.getFontSize(); |
188 | 89 | kterm.colorScheme = jsConf.getColorScheme(); | 89 | kterm.colorScheme = jsConf.getColorScheme(); |
189 | 90 | kterm.font.family = jsConf.getFontStyle(); | ||
190 | 90 | } | 91 | } |
191 | 91 | } | 92 | } |
192 | 92 | 93 | ||
193 | @@ -95,7 +96,7 @@ | |||
194 | 95 | onActiveChanged: hideFocus(); | 96 | onActiveChanged: hideFocus(); |
195 | 96 | } | 97 | } |
196 | 97 | 98 | ||
198 | 98 | JsConfig{id: jsConf } | 99 | JsConfig {id: jsConf } |
199 | 99 | 100 | ||
200 | 100 | 101 | ||
201 | 101 | Column { | 102 | Column { |
202 | @@ -121,7 +122,7 @@ | |||
203 | 121 | objectName: "kbCtrl" | 122 | objectName: "kbCtrl" |
204 | 122 | visible: false | 123 | visible: false |
205 | 123 | width: parent.width | 124 | width: parent.width |
207 | 124 | anchors{ | 125 | anchors { |
208 | 125 | left: parent.left | 126 | left: parent.left |
209 | 126 | leftMargin: units.gu(3) | 127 | leftMargin: units.gu(3) |
210 | 127 | } | 128 | } |
211 | @@ -137,7 +138,7 @@ | |||
212 | 137 | objectName: "kbFn" | 138 | objectName: "kbFn" |
213 | 138 | visible: false | 139 | visible: false |
214 | 139 | width: parent.width | 140 | width: parent.width |
216 | 140 | anchors{ | 141 | anchors { |
217 | 141 | left: parent.left | 142 | left: parent.left |
218 | 142 | leftMargin: units.gu(0.5) | 143 | leftMargin: units.gu(0.5) |
219 | 143 | } | 144 | } |
220 | @@ -154,7 +155,7 @@ | |||
221 | 154 | objectName: "kbScrl" | 155 | objectName: "kbScrl" |
222 | 155 | visible: false | 156 | visible: false |
223 | 156 | width: parent.width | 157 | width: parent.width |
225 | 157 | anchors{ | 158 | anchors { |
226 | 158 | left: parent.left | 159 | left: parent.left |
227 | 159 | leftMargin: units.gu(1) | 160 | leftMargin: units.gu(1) |
228 | 160 | } | 161 | } |
229 | @@ -220,7 +221,7 @@ | |||
230 | 220 | } | 221 | } |
231 | 221 | } | 222 | } |
232 | 222 | 223 | ||
234 | 223 | Item{ | 224 | Item { |
235 | 224 | id: ktermContainer | 225 | id: ktermContainer |
236 | 225 | anchors.fill: parent | 226 | anchors.fill: parent |
237 | 226 | 227 | ||
238 | @@ -232,10 +233,7 @@ | |||
239 | 232 | /// FONT SIZE = 24 (FINE FOR GNEXUS) | 233 | /// FONT SIZE = 24 (FINE FOR GNEXUS) |
240 | 233 | /// FONT SIZE = 12 (FINE FOR DESKTOP) | 234 | /// FONT SIZE = 12 (FINE FOR DESKTOP) |
241 | 234 | ////////////////////////////////////// | 235 | ////////////////////////////////////// |
242 | 235 | font.family: "Ubuntu Mono" | ||
243 | 236 | font.pointSize: jsConf.getFontSize() //units.gu(1.5) | ||
244 | 237 | 236 | ||
245 | 238 | colorScheme: jsConf.getColorScheme() //"DarkPastels" | ||
246 | 239 | width: parent.width | 237 | width: parent.width |
247 | 240 | height: Qt.inputMethod.visible ? parent.height - Qt.inputMethod.keyboardRectangle.height : parent.height | 238 | height: Qt.inputMethod.visible ? parent.height - Qt.inputMethod.keyboardRectangle.height : parent.height |
248 | 241 | 239 | ||
249 | @@ -250,13 +248,17 @@ | |||
250 | 250 | } | 248 | } |
251 | 251 | 249 | ||
252 | 252 | Component.onCompleted: { | 250 | Component.onCompleted: { |
253 | 251 | kterm.font.pointSize = jsConf.getFontSize(); | ||
254 | 252 | kterm.colorScheme = jsConf.getColorScheme(); | ||
255 | 253 | kterm.font.family = jsConf.getFontStyle(); | ||
256 | 254 | |||
257 | 253 | // Change directory to $HOME | 255 | // Change directory to $HOME |
258 | 254 | ksession.sendText("cd $HOME;clear;\n"); | 256 | ksession.sendText("cd $HOME;clear;\n"); |
259 | 255 | } | 257 | } |
260 | 256 | } | 258 | } |
261 | 257 | } | 259 | } |
262 | 258 | 260 | ||
264 | 259 | Loader{ | 261 | Loader { |
265 | 260 | id: graphicalTerminal | 262 | id: graphicalTerminal |
266 | 261 | z: 1.1 | 263 | z: 1.1 |
267 | 262 | active: true | 264 | active: true |
268 | @@ -267,7 +269,7 @@ | |||
269 | 267 | updateGraphicalParams(); | 269 | updateGraphicalParams(); |
270 | 268 | } | 270 | } |
271 | 269 | 271 | ||
273 | 270 | function updateGraphicalParams(){ | 272 | function updateGraphicalParams() { |
274 | 271 | active = jsConf.getEffectsEnabled(); | 273 | active = jsConf.getEffectsEnabled(); |
275 | 272 | item.bloom = jsConf.getBloom(); | 274 | item.bloom = jsConf.getBloom(); |
276 | 273 | item.noise_strength = jsConf.getNoiseStrenght() * 0.8; | 275 | item.noise_strength = jsConf.getNoiseStrenght() * 0.8; |
277 | 274 | 276 | ||
278 | === modified file 'src/app/qml/config/JsConfig.qml' | |||
279 | --- src/app/qml/config/JsConfig.qml 2014-09-20 10:54:37 +0000 | |||
280 | +++ src/app/qml/config/JsConfig.qml 2014-10-07 11:18:20 +0000 | |||
281 | @@ -33,6 +33,15 @@ | |||
282 | 33 | setSetting("fontSize", Math.round(size).toString() ); | 33 | setSetting("fontSize", Math.round(size).toString() ); |
283 | 34 | } | 34 | } |
284 | 35 | 35 | ||
285 | 36 | //FontStyle | ||
286 | 37 | function getFontStyle(){ | ||
287 | 38 | return getSetting("fontStyle", "Ubuntu Mono") | ||
288 | 39 | } | ||
289 | 40 | |||
290 | 41 | function setFontStyle(style){ | ||
291 | 42 | setSetting("fontStyle", style) | ||
292 | 43 | } | ||
293 | 44 | |||
294 | 36 | //Effects global switch | 45 | //Effects global switch |
295 | 37 | function getEffectsEnabled(){ | 46 | function getEffectsEnabled(){ |
296 | 38 | return getSetting("effectsEnabled", "true") === "true"; | 47 | return getSetting("effectsEnabled", "true") === "true"; |
PASSED: Continuous integration, rev:150 91.189. 93.70:8080/ job/ubuntu- terminal- app-ci/ 103/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 485 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 485/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/ubuntu- terminal- app-utopic- amd64-ci/ 47
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- terminal- app-ci/ 103/rebuild
http://