mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/edit: fix broken screen repositioning
In commit622e5aab69
("mobile/cleanup: remove more noisy debug output") I had good intentions, but missed the fact that in order to access the 'verbose' variable from QML I needed to use manager.verboseEnabled. The resulting syntax error went unnoticed and broke the screen repositioning when the keyboard opens on mobile devices. Worse, I called a non existing method to do the logging of debug information. And to top it all off, when I fixed the positioning algorithm in commit765c4f9704
("mobile/UI: fix the logic to keep input visible"), I forgot to fix the near identical logic for the TextArea for the notes. Fail on so many levels. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f29534e07f
commit
e1c269f54c
2 changed files with 18 additions and 13 deletions
|
@ -65,8 +65,8 @@ Controls.TextField {
|
|||
// make sure there's enough space for the input field above the keyboard and action button (and that it's not too far up, either)
|
||||
var positionInFlickable = stf.mapToItem(flickable.contentItem, 0, 0)
|
||||
var stfY = positionInFlickable.y
|
||||
if (verbose)
|
||||
manager.appendTextToLogFile("position check: lower edge of view is " + (0 + flickable.contentY + flickable.height) + " and text field is at " + stfY)
|
||||
if (manager.verboseEnabebled)
|
||||
manager.appendTextToLog("position check: lower edge of view is " + (0 + flickable.contentY + flickable.height) + " and text field is at " + stfY)
|
||||
if (stfY + stf.height > flickable.contentY + flickable.height - 3 * Kirigami.Units.gridUnit || stfY < flickable.contentY)
|
||||
flickable.contentY = Math.max(0, 3 * Kirigami.Units.gridUnit + stfY + stf.height - flickable.height)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue