Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maliit] Add MultiTouchArea, Fix scaling. FIX maliit-plugins #1 #2

Merged
merged 1 commit into from
Mar 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 11 additions & 4 deletions nemo-keyboard/nemo-keyboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ import QtQuick.Window 2.2
Item {
id: canvas

//width: MInputMethodQuick.screenWidth
//height: MInputMethodQuick.screenHeight
width: Screen.desktopAvailableWidth
height: Screen.desktopAvailableHeight
width: MInputMethodQuick.screenWidth
height: MInputMethodQuick.screenHeight
//width: Screen.desktopAvailableWidth
//height: Screen.desktopAvailableHeight

property bool portraitRotated: width > height
property bool portraitLayout: portraitRotated ?
(MInputMethodQuick.appOrientation == 90 || MInputMethodQuick.appOrientation == 270) :
(MInputMethodQuick.appOrientation == 0 || MInputMethodQuick.appOrientation == 180)

function updateIMArea() {
if (!MInputMethodQuick.active)
Expand Down Expand Up @@ -94,6 +99,8 @@ Item {
height: root.landscape ? canvas.width/2 : canvas.height/3
anchors.horizontalCenter: parent.horizontalCenter

portraitMode: portraitLayout

onHeightChanged: {
if (MInputMethodQuick.active)
y = -height
Expand Down
1 change: 1 addition & 0 deletions nemo-keyboard/org/nemomobile/CharacterKey.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ KeyBase {
property int fontSize: Theme.fontSizeMedium
property alias text: key_label.text
property string imagesrc: bgImage.source
key: Qt.Key_Multi_key

BorderImage {
id: bgImage
Expand Down
8 changes: 4 additions & 4 deletions nemo-keyboard/org/nemomobile/EnglishLandscape.qml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ Column {
property variant accents_row2: ["aäàâáãå", "", "dð", "", "", "", "", "", ""]
property variant accents_row3: ["", "", "cç", "", "", "nñ", ""]

property int topPadding: UI.landscapeVerticalPadding
property int bottomPadding: UI.landscapeVerticalPadding
property int leftPadding: UI.landscapeHorizontalPadding
property int rightPadding: UI.landscapeHorizontalPadding
property int topPadding: Theme.itemSpacingExtraSmall
property int bottomPadding: topPadding
property int leftPadding: Theme.itemSpacingExtraSmall/2
property int rightPadding: leftPadding
property int keyHeight: keyArea.height / 4

Row { //Row 1
Expand Down
8 changes: 4 additions & 4 deletions nemo-keyboard/org/nemomobile/EnglishPortrait.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ Column {
width: parent.width
height: parent.height

property int topPadding: UI.portraitVerticalPadding
property int bottomPadding: UI.portraitVerticalPadding
property int leftPadding: UI.portraitHorizontalPadding
property int rightPadding: UI.portraitHorizontalPadding
property int topPadding: Theme.itemSpacingExtraSmall
property int bottomPadding: topPadding
property int leftPadding: Theme.itemSpacingExtraSmall/2
property int rightPadding: leftPadding

property bool isShifted
property bool isShiftLocked
Expand Down
14 changes: 9 additions & 5 deletions nemo-keyboard/org/nemomobile/FunctionKey.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ KeyBase {
property string imagesrc: bgimg.source
//property alias text:text

topPadding: UI.portraitVerticalPadding
bottomPadding: UI.portraitVerticalPadding
leftPadding: UI.portraitHorizontalPadding
rightPadding: UI.portraitHorizontalPadding
topPadding: Theme.itemSpacingExtraSmall
bottomPadding: topPadding
leftPadding: Theme.itemSpacingExtraSmall/2
rightPadding: leftPadding

showPopper: false

Expand All @@ -71,16 +71,20 @@ KeyBase {
anchors.centerIn: parent
source: icon
//width: parent.width/2
height: parent.height/1.5
anchors.horizontalCenterOffset: (leftPadding - rightPadding) / 2
//height: parent.height/1.5
sourceSize.width: (sourceWidth == -1) ? width : sourceWidth
sourceSize.height: (sourceHeight == -1) ? height : sourceHeight
}
Text {
id: text
anchors.centerIn: parent
anchors.horizontalCenterOffset: Math.round((leftPadding - rightPadding) / 2)
width: parent.width - leftPadding - rightPadding - 4
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "sans"
fontSizeMode: Text.HorizontalFit
font.pixelSize: Theme.fontSizeSmall
//font.bold: true
color: Theme.textColor//UI.TEXT_COLOR
Expand Down