Merge lp:~hiroshidi/ubuntu-terminal-app/app-rev220513 into lp:ubuntu-terminal-app

Proposed by Dmitry Zagnoyko
Status: Merged
Approved by: Michael Hall
Approved revision: 11
Merged at revision: 9
Proposed branch: lp:~hiroshidi/ubuntu-terminal-app/app-rev220513
Merge into: lp:ubuntu-terminal-app
Diff against target: 219 lines (+62/-58)
4 files modified
Terminal.qml (+16/-3)
debian/changelog (+7/-0)
extraPanel/CircleMenu.qml (+33/-53)
ubuntu-terminal-app.qml (+6/-2)
To merge this branch: bzr merge lp:~hiroshidi/ubuntu-terminal-app/app-rev220513
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Michael Hall Approve
Review via email: mp+165664@code.launchpad.net

Commit message

Version bump (0.5):
- Added landscape mode
- Fixed click effects on Circle Menu

Description of the change

Shader item replaced with equivalent Circular Gradient item: this fix issue with shader effects on some devices.

Added landscape mode.

To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote :

Looks good to me

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Terminal.qml'
2--- Terminal.qml 2013-05-20 10:09:26 +0000
3+++ Terminal.qml 2013-05-24 16:32:27 +0000
4@@ -9,8 +9,16 @@
5 height: Qt.inputMethod.visible ? parent.height - Qt.inputMethod.keyboardRectangle.height : parent.height
6 width: parent.width
7
8+ function hideFocus(){
9+ kterm.focus = false;
10+ }
11+
12+ onWidthChanged: {
13+ hideFocus();
14+ }
15+
16 onHeightChanged: {
17- screenRow.vheight = height
18+ screenRow.vheight = height;
19 }
20
21 //property int headerHeight: units.gu(10);
22@@ -47,10 +55,15 @@
23 target: pgConf
24 onConfigChanged: {
25 kterm.font.pointSize = jsConf.getFontSize();
26- kterm.colorScheme = jsConf.getColorSheme()
27+ kterm.colorScheme = jsConf.getColorSheme();
28 }
29 }
30
31+ Connections {
32+ target: Qt.application
33+ onActiveChanged: hideFocus();
34+ }
35+
36 JsConfig{id: jsConf }
37
38
39@@ -134,7 +147,7 @@
40 circleButtonLable: "CTRL +"
41 sideButtons: ["A", "C", "D", "S", "X", "Z"]
42
43- //onOutsideClicked: visible = false;
44+
45 onCircleButtonClicked: console.log("Circle button clicked")
46 onSideButtonClicked: {
47 switch (index) {
48
49=== modified file 'debian/changelog'
50--- debian/changelog 2013-05-20 10:09:26 +0000
51+++ debian/changelog 2013-05-24 16:32:27 +0000
52@@ -1,3 +1,10 @@
53+ubuntu-terminal-app (0.5) raring; urgency=low
54+
55+ * Added landscape mode
56+ * Fixed click effect on Circle Menu
57+
58+ -- Dmitry Zagnoyko <hiroshidi@gmail.com> Fri, 24 May 2013 19:07:40 +0300
59+
60 ubuntu-terminal-app (0.4) raring; urgency=low
61
62 * Widget uses only available space
63
64=== modified file 'extraPanel/CircleMenu.qml'
65--- extraPanel/CircleMenu.qml 2013-05-20 10:09:26 +0000
66+++ extraPanel/CircleMenu.qml 2013-05-24 16:32:27 +0000
67@@ -1,5 +1,6 @@
68 import QtQuick 2.0
69 import Ubuntu.Components 0.1
70+import QtGraphicalEffects 1.0
71
72 Item {
73 id: mparent
74@@ -21,6 +22,7 @@
75 width: btnTorus.radius*2
76 height: units.gu(0.25)
77 color: "grey"
78+ antialiasing: true
79 x: 0
80 y: btnTorus.radius - height/2
81 rotation: (index * marea.anglePerSegment + marea.anglePerSegment/2) * 180 / Math.PI
82@@ -56,66 +58,42 @@
83 anchors.fill: parent
84 radius: width/2
85 color: "lightgrey"
86+ antialiasing: true
87 }
88
89- // For some reason won't works proper on device
90- // Works perfect on PC
91- ShaderEffect{
92- id: effect
93- anchors.fill: parent
94-
95- property real anglePerSegment: (2 * Math.PI) / sideButtons.length
96- property real selSegment: -1
97- property real segCount: sideButtons.length
98- property real pi: Math.PI
99- property real r: 1 //units.gu(1)
100- property color color: "#85838388"
101-
102- property variant source: ShaderEffectSource {
103- sourceItem: btnTorus;
104- hideSource: true
105- }
106-
107- fragmentShader:
108- "varying highp vec2 qt_TexCoord0;
109- uniform sampler2D source;
110-
111- uniform highp float anglePerSegment;
112- uniform highp float selSegment;
113- uniform highp float segCount;
114- uniform highp vec4 color;
115- uniform highp float pi;
116- uniform highp float r;
117-
118- void main(void)
119- {
120- highp float a = 0.0;
121-
122- if (qt_TexCoord0.x != 0.0 || qt_TexCoord0.y != 0.0) {
123- a = atan((-1.0)*(qt_TexCoord0.y - r*0.5), qt_TexCoord0.x - r*0.5);
124- if (a < 0.0) a = 2.0 * pi + a;
125- }
126-
127- if ( selSegment >= 0.0 ) {
128- if ( ( ( selSegment * anglePerSegment - anglePerSegment*0.5 ) < a &&
129- ( (selSegment + 1.0) * anglePerSegment - anglePerSegment*0.5) > a ) ||
130- ( selSegment == 0.0 && ( segCount * anglePerSegment - anglePerSegment*0.5 ) < a &&
131- ( (segCount + 1.0) * anglePerSegment - anglePerSegment*0.5) > a ) )
132- {
133- gl_FragColor = color * texture2D(source, qt_TexCoord0);
134- }
135- else
136- gl_FragColor = texture2D( source, qt_TexCoord0 );
137- }
138- else
139- gl_FragColor = texture2D( source, qt_TexCoord0 );
140-
141- }"
142+ ConicalGradient {
143+ id: effect
144+ anchors.fill: parent
145+ visible: selSegment != -1
146+ source: btnTorus
147+ rotation: {
148+ var angel = marea.anglePerSegment * ( 180 / Math.PI);
149+ return ((sideButtons.length - selSegment) * angel +
150+ (90 + angel/2)) - angel;
151+ }
152+
153+ property real posPerSegment: 1/sideButtons.length
154+ property int selSegment: -1
155+ property color color: "#85838388"
156+
157+ gradient: Gradient {
158+ GradientStop { position: 0; color: "transparent" }
159+ GradientStop {
160+ position: 0.001
161+ color: effect.color
162+ }
163+ GradientStop {
164+ position: effect.posPerSegment - 0.001
165+ color: effect.color
166+ }
167+ GradientStop { position: effect.posPerSegment; color: "transparent" }
168+ }
169
170 }
171
172 Rectangle {
173 color: "grey"
174+ antialiasing: true
175 z: 91
176 anchors{
177 verticalCenter: parent.verticalCenter
178@@ -130,6 +108,7 @@
179 Rectangle {
180 id: shdwCircle
181 color: "#85838388"
182+ antialiasing: true
183 visible: false
184 z: 93
185 anchors{
186@@ -145,6 +124,7 @@
187 Rectangle {
188 id: btnCircle
189 color: "lightgrey"
190+ antialiasing: true
191 z: 92
192 anchors{
193 verticalCenter: parent.verticalCenter
194
195=== modified file 'ubuntu-terminal-app.qml'
196--- ubuntu-terminal-app.qml 2013-05-20 10:09:26 +0000
197+++ ubuntu-terminal-app.qml 2013-05-24 16:32:27 +0000
198@@ -8,8 +8,8 @@
199 id: mview
200 objectName: "terminal"
201 applicationName: "ubuntu-terminal-app"
202- //automaticOrientation: true
203-
204+ automaticOrientation: true
205+
206 width: units.gu(50)
207 height: units.gu(75)
208
209@@ -47,6 +47,10 @@
210 title: i18n.tr("Terminal")
211 page: Page {
212
213+ onWidthChanged: {
214+ header.visible = width < height;
215+ }
216+
217 Terminal { id: pgTerm }
218
219 tools: ToolbarActions {

Subscribers

People subscribed via source and target branches