Refactored frames
| @@ -21,9 +21,28 @@ OTHER_FILES += \ | |||||||
|     $$PWD/qml/cool-old-term/HighlightArea.qml \ |     $$PWD/qml/cool-old-term/HighlightArea.qml \ | ||||||
|     $$PWD/qml/cool-old-term/ShaderSettings.qml \ |     $$PWD/qml/cool-old-term/ShaderSettings.qml \ | ||||||
|     $$PWD/qml/images/frame.png \ |     $$PWD/qml/images/frame.png \ | ||||||
|     qml/cool-old-term/SettingsWindow.qml \ |     $$PWD/qml/cool-old-term/SettingsWindow.qml \ | ||||||
|     qml/cool-old-term/SettingComponent.qml \ |     $$PWD/qml/cool-old-term/SettingComponent.qml \ | ||||||
|     qml/cool-old-term/ColorButton.qml \ |     $$PWD/qml/cool-old-term/ColorButton.qml \ | ||||||
|     qml/cool-old-term/TerminalFrame.qml \ |     $$PWD/qml/cool-old-term/TerminalFrame.qml \ | ||||||
|     qml/cool-old-term/WhiteFrameShader.qml \ |     $$PWD/qml/cool-old-term/WhiteFrameShader.qml \ | ||||||
|     qml/cool-old-term/NoFrameShader.qml |     $$PWD/qml/cool-old-term/NoFrameShader.qml \ | ||||||
|  |     $$PWD/qml/cool-old-term/WhiteSimpleFrame.qml \ | ||||||
|  |     qml/cool-old-term/BlackRoughFrame.qml \ | ||||||
|  |     qml/cool-old-term/Frames/BlackRoughFrame.qml \ | ||||||
|  |     qml/cool-old-term/Frames/NoFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/Frames/WhiteFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/Frames/WhiteSimpleFrame.qml \ | ||||||
|  |     qml/cool-old-term/Frames/TerminalFrame.qml \ | ||||||
|  |     qml/cool-old-term/Frames/utils/NoFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/Frames/utils/TerminalFrame.qml \ | ||||||
|  |     qml/cool-old-term/Frames/utils/WhiteFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/frames/WhiteSimpleFrame.qml \ | ||||||
|  |     qml/cool-old-term/frames/BlackRoughFrame.qml \ | ||||||
|  |     qml/cool-old-term/frames/utils/NoFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/frames/utils/TerminalFrame.qml \ | ||||||
|  |     qml/cool-old-term/frames/utils/WhiteFrameShader.qml \ | ||||||
|  |     qml/cool-old-term/frames/images/screen-frame.png \ | ||||||
|  |     qml/cool-old-term/frames/images/screen-frame-normals.png \ | ||||||
|  |     qml/cool-old-term/frames/images/black-frame.png \ | ||||||
|  |     qml/cool-old-term/frames/images/black-frame-normals.png | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| import QtQuick 2.0 | import QtQuick 2.1 | ||||||
|  |  | ||||||
| Item{ | Item{ | ||||||
|     property real ambient_light: 0.2 |     property real ambient_light: 0.2 | ||||||
|   | |||||||
							
								
								
									
										19
									
								
								qml/cool-old-term/frames/BlackRoughFrame.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,19 @@ | |||||||
|  | import QtQuick 2.1 | ||||||
|  | import "utils" | ||||||
|  |  | ||||||
|  | TerminalFrame{ | ||||||
|  |     id: frame | ||||||
|  |     z: 2.1 | ||||||
|  |     anchors.fill: parent | ||||||
|  |     addedWidth: 200 | ||||||
|  |     addedHeight: 370 | ||||||
|  |     borderLeft: 148 | ||||||
|  |     borderRight: 148 | ||||||
|  |     borderTop: 232 | ||||||
|  |     borderBottom: 232 | ||||||
|  |     imageSource: "../images/black-frame.png" | ||||||
|  |     normalsSource: "../images/black-frame-normals.png" | ||||||
|  |     sourceRect: Qt.rect(-80, -90, terminal.width + 160, terminal.height + 180 ) | ||||||
|  |  | ||||||
|  |     shaderString: "WhiteFrameShader.qml" | ||||||
|  | } | ||||||
							
								
								
									
										19
									
								
								qml/cool-old-term/frames/WhiteSimpleFrame.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,19 @@ | |||||||
|  | import QtQuick 2.0 | ||||||
|  | import "utils" | ||||||
|  |  | ||||||
|  | TerminalFrame{ | ||||||
|  |     id: frame | ||||||
|  |     z: 2.1 | ||||||
|  |     anchors.fill: parent | ||||||
|  |     addedWidth: 140 | ||||||
|  |     addedHeight: 140 | ||||||
|  |     borderLeft: 116 | ||||||
|  |     borderRight: 116 | ||||||
|  |     borderTop: 116 | ||||||
|  |     borderBottom: 116 | ||||||
|  |     imageSource: "../images/screen-frame.png" | ||||||
|  |     normalsSource: "../images/screen-frame-normals.png" | ||||||
|  |     sourceRect: Qt.rect(-65, -75, terminal.width + 130, terminal.height + 150) | ||||||
|  |  | ||||||
|  |     shaderString: "WhiteFrameShader.qml" | ||||||
|  | } | ||||||
| Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB | 
| Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB | 
| Before Width: | Height: | Size: 646 KiB After Width: | Height: | Size: 646 KiB | 
| Before Width: | Height: | Size: 571 KiB After Width: | Height: | Size: 571 KiB | 
| @@ -180,7 +180,7 @@ ApplicationWindow{ | |||||||
|                             //vec4 color = texture2D(source, coords); |                             //vec4 color = texture2D(source, coords); | ||||||
|                             float color = (blurredColor(source, coords).r + texture2D(source, coords).r) * 0.5; |                             float color = (blurredColor(source, coords).r + texture2D(source, coords).r) * 0.5; | ||||||
|                             float scanline_alpha = getScanlineIntensity(coords) * scanlines; |                             float scanline_alpha = getScanlineIntensity(coords) * scanlines; | ||||||
|                             //float inside = step(0.0, coords.x) * step(-1.0, -coords.x) * step(0.0, coords.y) * step(-1.0, -coords.y); |                             //float inside = step(0.0, coords.x) * step(-1.0, -coords.x)  * step(0.0, coords.y) * step(-1.0, -coords.y); | ||||||
|                             float noise = stepNoise(coords) * noise_strength; |                             float noise = stepNoise(coords) * noise_strength; | ||||||
|                             float randomPass = randomPass(coords) * glowing_line_strength; |                             float randomPass = randomPass(coords) * glowing_line_strength; | ||||||
|                             color += noise + randomPass; |                             color += noise + randomPass; | ||||||
| @@ -190,38 +190,14 @@ ApplicationWindow{ | |||||||
|                         }" |                         }" | ||||||
|         } |         } | ||||||
|  |  | ||||||
| //        TerminalFrame{ |         Loader{ | ||||||
| //            id: frame |             property rect sourceRect | ||||||
| //            z: 2.1 |  | ||||||
| //            anchors.fill: parent |  | ||||||
| //            addedWidth: 140 |  | ||||||
| //            addedHeight: 140 |  | ||||||
| //            borderLeft: 116 |  | ||||||
| //            borderRight: 116 |  | ||||||
| //            borderTop: 116 |  | ||||||
| //            borderBottom: 116 |  | ||||||
| //            imageSource: "../images/screen-frame.png" |  | ||||||
| //            normalsSource: "../images/screen-frame-normals.png" |  | ||||||
| //            sourceRect: Qt.rect(-65, -75, terminal.width + 130, terminal.height + 150) |  | ||||||
|  |  | ||||||
| //            shaderString: "WhiteFrameShader.qml" |  | ||||||
| //        } |  | ||||||
|  |  | ||||||
|         TerminalFrame{ |  | ||||||
|             id: frame |             id: frame | ||||||
|             z: 2.1 |  | ||||||
|             anchors.fill: parent |             anchors.fill: parent | ||||||
|             addedWidth: 200 |             z: 2.1 | ||||||
|             addedHeight: 370 |             source: "./frames/WhiteSimpleFrame.qml" | ||||||
|             borderLeft: 148 |             onLoaded: sourceRect = item.sourceRect; | ||||||
|             borderRight: 148 |  | ||||||
|             borderTop: 232 |  | ||||||
|             borderBottom: 232 |  | ||||||
|             imageSource: "../images/black-frame.png" |  | ||||||
|             normalsSource: "../images/black-frame-normals.png" |  | ||||||
|             sourceRect: Qt.rect(-80, -90, terminal.width + 160, terminal.height + 180 ) |  | ||||||
|  |  | ||||||
|             shaderString: "WhiteFrameShader.qml" |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         TerminalScreen { |         TerminalScreen { | ||||||
|   | |||||||