Skip to content

Commit

Permalink
Added text input.
Browse files Browse the repository at this point in the history
  • Loading branch information
mireq committed May 18, 2014
1 parent 822a75f commit ec3f071
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/keyboardview/keyboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,33 @@ Item {
anchors.fill: parent
}

BorderImage {
source: "qrc:/gfx/keyboard/panel_bg.png"
height: childrenRect.height + 40
border { left: 9; top: 9; right: 9; bottom: 9 }
anchors {
left: parent.left
right: parent.right
top: parent.top
margins: 20
}

TextEdit {
id: textInput
font.pixelSize: 30
color: "white"
anchors { left: parent.left; right: parent.right; top: parent.top; margins: 20 }
clip: true
}
}

Keyboard {
id: keyboard
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
height: Math.round(width / 3)

Component.onCompleted: keyboard.dispatcher.setFocusObject(textInput)

ShaderEffectSource {
id: contentBlurSource
sourceItem: content
Expand Down
1 change: 1 addition & 0 deletions examples/keyboardview/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<file alias="modes/Symbols.qml">../../qml/modes/Symbols.qml</file>
<file alias="gfx/keyboard/bg.jpg">../../gfx/bg.jpg</file>
<file alias="gfx/keyboard/keyboard_bg.png">../../gfx/keyboard_bg.png</file>
<file alias="gfx/keyboard/panel_bg.png">../../gfx/panel_bg.png</file>
<file alias="gfx/keyboard/preview_bg.png">../../gfx/preview_bg.png</file>
<file alias="gfx/keyboard/btn.png">../../gfx/btn.png</file>
<file alias="gfx/keyboard/btn_pressed.png">../../gfx/btn_pressed.png</file>
Expand Down
Binary file added gfx/panel_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions gfx/panel_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ec3f071

Please sign in to comment.